Browse Source

lint: Add first draft of my global eslint config.

master
Nick Plekhanov 9 years ago
parent
commit
4c59c8f09c
  1. 115
      javascript/.eslintrc.js

115
javascript/.eslintrc.js

@ -0,0 +1,115 @@
module.exports = {
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"env": {
"browser": true,
"es6": true,
"node": true
},
"plugins": [
"react"
],
"rules": {
"accessor-pairs": 2,
"arrow-parens": [1, "always"],
"arrow-spacing": [1, { "before": true, "after": true }],
"block-spacing": [1, "always"],
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"comma-dangle": [1, "never"],
"comma-spacing": [1, { "before": false, "after": true }],
"comma-style": [1, "last"],
"constructor-super": 2,
"curly": [1, "multi-line"],
"dot-location": [1, "property"],
"eol-last": 1,
"eqeqeq": [2, "allow-null"],
"generator-star-spacing": [1, "after"],
"handle-callback-err": [2, "^(err|error)$" ],
"indent": [1, 2, { "SwitchCase": 1 }],
"jsx-quotes": [1, "prefer-single"],
"key-spacing": [1, { "beforeColon": false, "afterColon": true }],
"keyword-spacing": [1, { "before": true, "after": true }],
"new-cap": [2, { "newIsCap": true, "capIsNew": false }],
"new-parens": 2,
"no-caller": 2,
"no-class-assign": 2,
"no-const-assign": 2,
"no-debugger": 1,
"no-delete-var": 2,
"no-dupe-args": 2,
"no-dupe-class-members": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-empty-character-class": 2,
"no-empty-pattern": 1,
"no-eval": 2,
"no-ex-assign": 2,
"no-extra-bind": 2,
"no-extra-boolean-cast": 2,
"no-fallthrough": 1,
"no-floating-decimal": 2,
"no-func-assign": 2,
"no-implied-eval": 2,
"no-inner-declarations": [2, "functions"],
"no-invalid-regexp": 2,
"no-irregular-whitespace": 2,
"no-label-var": 2,
"no-lone-blocks": 2,
"no-mixed-spaces-and-tabs": 1,
"no-multi-spaces": 1,
"no-multiple-empty-lines": [1, { "max": 1 }],
"no-native-reassign": 2,
"no-negated-in-lhs": 1,
"no-new": 1,
"no-new-func": 1,
"no-new-symbol": 2,
"no-new-wrappers": 1,
"no-obj-calls": 2,
"no-octal": 2,
"no-octal-escape": 2,
"no-path-concat": 1,
"no-proto": 2,
"no-redeclare": 1,
"no-regex-spaces": 1,
"no-self-assign": 2,
"no-self-compare": 2,
"no-shadow-restricted-names": 2,
"no-spaced-func": 2,
"no-sparse-arrays": 2,
"no-this-before-super": 2,
"no-throw-literal": 1,
"no-trailing-spaces": 1,
"no-undef": 1,
"no-undef-init": 1,
"no-unexpected-multiline": 1,
"no-unneeded-ternary": [1, { "defaultAssignment": false }],
"no-unreachable": 2,
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
"no-useless-call": 1,
"no-useless-constructor": 1,
"no-whitespace-before-property": 1,
"one-var": [1, "never"],
"operator-linebreak": [1, "after", { "overrides": { "?": "before", ":": "before" } }],
"padded-blocks": [1, "never"],
"quotes": [1, "single", "avoid-escape"],
"semi": [1, "always"],
"semi-spacing": [1, { "before": false, "after": true }],
"space-before-blocks": [1, "always"],
"space-before-function-paren": [1, "never"],
"space-in-parens": [1, "never"],
"space-infix-ops": 1,
"space-unary-ops": [1, { "words": true, "nonwords": false }],
"spaced-comment": [1, "always"],
"template-curly-spacing": [1, "never"],
"use-isnan": 2,
"valid-typeof": 1,
"wrap-iife": [2, "any"],
"yield-star-spacing": [1, "after"],
"promise/param-names": 2
}
};
Loading…
Cancel
Save