Skip to content

Instantly share code, notes, and snippets.

@fand fand/.eslintrc
Created Sep 30, 2015

Embed
What would you like to do?
厳し目のeslintrcできた
{
"parser": "babel-eslint",
"env": {
"es6" : true,
"node" : true,
"browser" : true,
"mocha" : true,
},
"globals": {
"sinon": true,
},
"ecmaFeatures" : {
"jsx": true,
"objectLiteralShorthandMethods" : true
},
"plugins": [
"react"
],
"extends": "eslint:recommended",
"rules": {
// Possible Errors
"comma-dangle" : [2, "always-multiline"],
"no-console" : 0,
"no-extra-semi" : 2,
"valid-jsdoc" : 2,
"no-unexpected-multiline" : 2,
// Best Practices
"block-scoped-var" : 2,
"complexity" : [2, 10],
"consistent-return" : 1,
"curly" : 2,
"default-case" : 2,
"dot-notation" : [1, {"allowKeywords": true }],
"dot-location" : [2, "property"],
"eqeqeq" : [2, "allow-null"],
"guard-for-in" : 1,
"no-alert" : 2,
"no-caller" : 2,
"no-empty-label" : 2,
"no-eval" : 2,
"no-extend-native" : 2,
"no-extra-bind" : 2,
"no-floating-decimal" : 2,
"no-implied-eval" : 2,
"no-invalid-this" : 1,
"no-iterator" : 2,
"no-labels" : 1,
"no-lone-blocks" : 2,
"no-loop-func" : 1,
"no-multi-str" : 2,
"no-native-reassign" : 2,
"no-new-func" : 2,
"no-new-wrappers" : 2,
"no-new" : 1,
"no-octal-escape" : 2,
"no-param-reassign" : [2, {"props": true}],
"no-proto" : 2,
"no-return-assign" : 2,
"no-script-url" : 2,
"no-self-compare" : 2,
"no-sequences" : 2,
"no-throw-literal" : 1,
"no-unused-expressions" : 2,
"no-useless-call" : 2,
"no-useless-concat" : 1,
"no-void" : 2,
"no-warning-comments" : [1, { "terms": ["todo", "fixme", "xxx"] }],
"no-with" : 2,
"radix" : 2,
"yoda" : [2, "never", { "exceptRange": true }],
// Strict
"strict" : [2, "global"],
// Variables
"no-delete-var" : 2,
"no-label-var" : 2,
"no-shadow-restricted-names" : 2,
"no-shadow" : 2,
"no-undef-init" : 2,
"no-undef" : 2,
"no-unused-vars" : 2,
"no-use-before-define" : 2,
// Node.js and CommonJS
"callback-return" : 1,
"global-require" : 1,
"handle-callback-err" : 2,
"no-mixed-requires" : [2, true],
"no-new-require" : 1,
"no-path-concat" : 1,
"no-process-exit" : 1,
"no-sync" : 1,
// Stylistic Issues
"array-bracket-spacing" : [2, "never"],
"block-spacing" : [2, "always"],
"brace-style" : [2, "stroustrup", { "allowSingleLine": true }],
"camelcase" : [2, {"properties": "always"}],
"comma-spacing" : 2,
"comma-style" : [2, "last"],
"computed-property-spacing" : [2, "never"],
"consistent-this" : [2, "self"],
"eol-last" : 2,
"func-style" : [2, "expression"],
"indent" : [2, 2, {"SwitchCase": 0}],
"jsx-quotes" : [2, "prefer-double"],
"key-spacing" : [2,
{ "align" : "colon", "beforeColon" : true, "afterColon" : true }
],
"lines-around-comment" : [2,
{ "beforeBlockComment" : true, "beforeLineComment" : false }
],
"linebreak-style" : [2, "unix"],
"max-nested-callbacks" : [2, 3],
"new-cap" : 2,
"new-parens" : 2,
"newline-after-var" : 1,
"no-array-constructor" : 2,
"no-continue" : 1,
"no-lonely-if" : 2,
"no-mixed-spaces-and-tabs" : 2,
"no-multiple-empty-lines" : [2, {"max": 2}],
"no-nested-ternary" : 2,
"no-new-object" : 2,
"no-spaced-func" : 2,
"no-ternary" : 1,
"no-trailing-spaces" : 2,
"no-underscore-dangle" : 1,
"no-unneeded-ternary" : 2,
"object-curly-spacing" : [2, "always"],
"operator-assignment" : [2, "always"],
"operator-linebreak" : [2, "after"],
"quote-props" : [2, "as-needed"],
"quotes" : [2, "single", "avoid-escape"],
"semi-spacing" : [2, {"before": false, "after": true}],
"semi" : [2, "always"],
"sort-vars" : 2,
"space-before-keywords" : 2,
"space-after-keywords" : 2,
"space-before-blocks" : 2,
"space-before-function-paren" : 2,
"space-in-parens" : [2, "never"],
"space-infix-ops" : 2,
"space-return-throw-case" : 2,
"space-unary-ops" : [1, { "words": true, "nonwords": false }],
"spaced-comment" : [2, "always"],
// ES6
"arrow-parens" : 0,
"arrow-spacing" : 2,
"constructor-super" : 2,
"generator-star-spacing" : [2, {"before": false, "after": true}],
"no-class-assign" : 2,
"no-const-assign" : 2,
"no-dupe-class-members" : 2,
"no-this-before-super" : 2,
"no-var" : 0,
"object-shorthand" : [2, "always"],
"prefer-arrow-callback" : 2,
"prefer-const" : 2,
"prefer-spread" : 2,
"prefer-reflect" : 2,
"prefer-template" : 2,
"require-yield" : 2,
// React
"react/display-name" : [2, {"acceptTranspilerName" : true}],
"react/forbid-prop-types" : 1,
"react/jsx-boolean-value" : [1, "always"],
"react/jsx-closing-bracket-location" : [2, "after-props"],
"react/jsx-curly-spacing" : [2, "never", {"allowMultiline": false}],
"react/jsx-indent-props" : [2, 2],
"react/jsx-max-props-per-line" : [2, {maximum: 3}],
"react/jsx-no-duplicate-props" : 2,
"react/jsx-no-literals" : 2,
"react/jsx-no-undef" : 2,
"react/jsx-sort-prop-types" : 0,
"react/jsx-sort-props" : 0,
"react/jsx-uses-react" : 2,
"react/jsx-uses-vars" : 2,
"react/no-danger" : 1,
"react/no-did-mount-set-state" : 1,
"react/no-did-update-set-state" : 2,
"react/no-direct-mutation-state" : 2,
"react/no-multi-comp" : 1,
"react/no-set-state" : 1,
"react/no-unknown-property" : 2,
"react/prop-types" : 1,
"react/react-in-jsx-scope" : 2,
"react/require-extension" : 0,
"react/self-closing-comp" : 2,
"react/sort-comp" : 1,
"react/wrap-multilines" : 2,
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.