Skip to content

Instantly share code, notes, and snippets.

@gilbarbara
Last active April 2, 2018 21:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gilbarbara/8e60803ad32c6062f28d to your computer and use it in GitHub Desktop.
Save gilbarbara/8e60803ad32c6062f28d to your computer and use it in GitHub Desktop.
.eslintrc configuration file ES2015
{
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"spread": true,
"templateStrings": true
},
"env": {
"amd": true,
"browser": true,
"jquery": true,
"mocha": true,
"node": true
},
"globals": {
"$": true,
"Modernizr": false
},
"rules": {
"strict": 0,
// Possible Errors
"comma-dangle": 2,
"no-cond-assign": 0,
"no-console": 0,
"no-debugger": 2,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-empty": 2,
"no-empty-character-class": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 1,
"no-extra-parens": 0,
"no-extra-semi": 1,
"no-inner-declarations": 1,
"no-invalid-regexp": 1,
"no-irregular-whitespace": 1,
"no-obj-calls": 2,
"no-regex-spaces": 2,
"no-sparse-arrays": 2,
"no-unreachable": 2,
"valid-jsdoc": [
2,
{
"prefer": {
"return": "returns"
},
"requireParamDescription": false,
"requireReturn": false,
"requireReturnDescription": false
}
],
"valid-typeof": 2,
// Best Practices
"block-scoped-var": 1,
"curly": 1,
"default-case": 1,
"dot-location": [1, "property"],
"dot-notation": 1,
"eqeqeq": 1,
"guard-for-in": 1,
"no-alert": 2,
"no-caller": 1,
"no-else-return": 1,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 1,
"no-floating-decimal": 2,
"no-implicit-coercion": [1, {"boolean": true, "number": false, "string": true}],
"no-implied-eval": 2,
"no-invalid-this": 1,
"no-loop-func": 0,
"no-multi-spaces": [
1,
{
"exceptions": {
"VariableDeclarator": true
}
}
],
"no-multi-str": 1,
"no-native-reassign": 2,
"no-new": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-param-reassign": 0,
"no-redeclare": 1,
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 2,
"no-unused-expressions": 1,
"no-useless-concat": 1,
"no-void": 2,
"no-warning-comments": 0,
"no-with": 1,
"radix": 2,
"vars-on-top": 0,
"wrap-iife": 2,
"yoda": [
2,
"never",
{
"exceptRange": true
}
],
// Variables
"no-shadow": 1,
"no-undef": 1,
"no-undefined": 0,
"no-unused-vars": [
0,
{
"vars": "all",
"args": "after-used"
}
],
"no-use-before-define": 2,
// Stylistic Issues
"brace-style": [
1,
"stroustrup",
{
"allowSingleLine": true
}
],
"camelcase": 0,
"comma-spacing": 1,
"comma-style": [1, "last"],
"consistent-return": 0,
"consistent-this": [1, "self"],
"eol-last": 1,
"key-spacing": 1,
"lines-around-comment": [0, { "beforeBlockComment": true, "beforeLineComment": true }],
"linebreak-style": [1, "unix"],
"max-nested-callbacks": [2, 4],
"new-cap": 2,
"new-parens": 2,
"newline-after-var": 0,
"no-array-constructor": 2,
"no-continue": 2,
"no-lonely-if": 1,
"no-mixed-spaces-and-tabs": [1, "smart-tabs"],
"no-multiple-empty-lines": [
1,
{
"max": 1
}
],
"no-nested-ternary": 0,
"no-spaced-func": 1,
"no-trailing-spaces": 1,
"no-underscore-dangle": 0,
"no-unneeded-ternary": 0,
"object-curly-spacing": [1, "always"],
"one-var": 0,
"padded-blocks": 0,
"quote-props": [1, "as-needed"],
"quotes": [1, "single"],
"semi": 1,
"semi-spacing": [
1,
{
"before": false,
"after": true
}
],
"space-after-keywords": 1,
"space-before-blocks": 1,
"space-before-function-paren": 1,
"space-before-keywords": 1,
"space-infix-ops": 1,
"space-return-throw-case": 1,
"space-unary-ops": 1,
// Node
"callback-return": [1, ["callback", "cb", "next"]],
"handle-callback-err": 1,
"no-mixed-requires": 0,
//Es6
"arrow-parens": 0,
"arrow-spacing": [
1,
{
"before": true,
"after": true
}
],
"constructor-super": 1,
"generator-star-spacing": [2, "after"],
"no-class-assign": 2,
"no-const-assign": 2,
"no-this-before-super": 2,
"object-shorthand": [0, "always"],
"prefer-const": 0,
"prefer-spread": 1,
"require-yield": 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment