Skip to content

Instantly share code, notes, and snippets.

@wildan3105
Last active September 16, 2017 11:56
Show Gist options
  • Save wildan3105/1223eb765b905bfd06c9be7fa9a1d351 to your computer and use it in GitHub Desktop.
Save wildan3105/1223eb765b905bfd06c9be7fa9a1d351 to your computer and use it in GitHub Desktop.
Airbnb-inspired eslintrc configuration
{
"extends": "eslint:recommended",
"env": {
"es6":true,
"browser": true,
"node": true
},
"rules": {
"arrow-body-style":"error",
"array-bracket-spacing":"error",
"array-callback-return":"error",
"arrow-parens":"error",
"arrow-spacing":"error",
"block-scoped-var": 2,
"brace-style": [2, "1tbs"],
"comma-dangle":["error","never"],
"comma-style":"error",
"computed-property-spacing": [2, "never"],
"curly": 2,
"default-case": 0,
"dot-notation":"error",
"eol-last":"error",
"eqeqeq": ["error", "smart"],
"func-style": ["error", "expression"],
"indent":"error",
"keyword-spacing":"error",
"max-depth": ["error", 4],
"max-len": [1, 120, 2, {"ignoreComments": true}],
"max-statements": [1, 30],
"newline-per-chained-call":"error",
"no-array-constructor":"error",
"no-confusing-arrow":"error",
"no-console":0,
"no-const-assign":"error",
"no-dupe-class-members":"error",
"no-duplicate-imports":"error",
"no-else-return": 0,
"no-eval":"warn",
"no-extend-native": 2,
"no-var":"error",
"no-new-object":"error",
"no-useless-escape":"error",
"no-new-func":"error",
"no-useless-constructor":"error",
"no-iterator":"error",
"no-restricted-syntax":"error",
"no-restricted-properties":"error",
"no-undef":"error",
"no-plusplus":"warn",
"no-nested-ternary":"error",
"no-underscore-dangle":"error",
"no-mixed-spaces-and-tabs": 2,
"no-trailing-spaces": 2,
"no-use-before-define": "error",
"no-whitespace-before-property":"error",
"no-cond-assign": [2, "except-parens"],
"no-unused-vars": [1, {"vars": "local", "args": "none"}],
"no-loop-func":"error",
"object-shorthand":"error",
"object-curly-spacing": [2, "always"],
"prefer-rest-params":"error",
"prefer-spread":"error",
"prefer-arrow-callback":"error",
"prefer-const": "error",
"prefer-template":"error",
"quote-props": [1, "consistent-as-needed"],
"quotes": [1, "single"],
"radix":["error","as-needed"],
"semi": ["error", "always"],
"space-unary-ops": 2,
"spaced-comment":"error",
"space-before-blocks":"error",
"space-in-parens":"error",
"template-curly-spacing":["error","never"],
"wrap-iife":["error","any"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment