Skip to content

Instantly share code, notes, and snippets.

@matmunn
Created September 9, 2018 22:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matmunn/a761f6798dd64012f471706429220f26 to your computer and use it in GitHub Desktop.
Save matmunn/a761f6798dd64012f471706429220f26 to your computer and use it in GitHub Desktop.
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
},
},
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"plugins": [
"react",
],
"extends": "eslint:recommended",
"rules": {
"array-bracket-spacing": [2, "never"],
"block-scoped-var": 2,
"block-spacing": 2,
"brace-style": [2, "1tbs"],
"camelcase": [2, {"properties": "never"}],
"comma-dangle": [2, "always-multiline"],
"comma-spacing": [2, {"before": false, "after": true}],
"comma-style": [2, "last"],
"complexity": [2, 10],
"curly": 2,
"default-case": 2,
"dot-location": [2, "property"],
"dot-notation": 2,
"id-length": [2, {
"min": 3,
"properties": "never",
"exceptions": ["x", "y", "z", "_", "_s", "id", "fs", "q", "Id", "$"]
}],
"indent": [2, 4],
"jsx-quotes": 2,
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
"max-len": [2, 80, 4, { "ignoreUrls": true }],
"new-parens": 2,
"newline-after-var": 2,
"no-alert": 2,
"no-caller": 2,
"no-console": 0,
"no-eval": 2,
"no-floating-decimal": 2,
"no-implied-eval": 2,
"no-irregular-whitespace": 2,
"no-labels": 2,
"no-loop-func": 2,
"no-mixed-requires": 2,
"no-multi-spaces": 2,
"no-native-reassign": 2,
"no-proto": 2,
"no-return-assign": 2,
/* FIXME: Broken by an update to one of eslints dependencies */
"no-redeclare": 0,
"no-spaced-func": 2,
"no-trailing-spaces": 2,
/* broken with flow interfaces
* https://github.com/babel/babel-eslint/issues/132#issuecomment-112815926 */
"no-undef": 0,
"no-unneeded-ternary": 2,
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
"no-use-before-define": 0, // Doesn't work at the moment
"no-useless-call": 2,
"no-useless-concat": 2,
/* "object-curly-spacing": 2, */
"one-var": [2, {
"uninitialized": "always",
"initialized": "never"
}],
"no-var": 2,
"operator-assignment": [2, "always"],
"operator-linebreak": [2, "after", { "overrides": { ":": "before" }}],
"prefer-arrow-callback": 2,
"prefer-spread": 2,
// "quotes": [2, "double"], // Not handling backticks
"keyword-spacing": 2,
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, "never"],
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"space-unary-ops": [2, { "words": true, "nonwords": false }],
// spaced-comment doesn't work with flow-escape comments like /*::`*/
// "spaced-comment": [2, "always"],
"strict": [2, "global"],
"valid-jsdoc": 2,
"react/jsx-boolean-value": [2, "always"],
"react/jsx-closing-bracket-location": 2,
"react/jsx-curly-spacing": 2,
"react/jsx-indent-props": 2,
"react/jsx-max-props-per-line": 2,
"react/jsx-no-duplicate-props": 2,
"react/jsx-no-undef": 2,
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/no-did-update-set-state": 2,
"react/no-multi-comp": 0, /* Composing components out of small pieces is a good thing */
"react/no-unknown-property": 2,
"react/no-did-mount-set-state": 0, /* ismorphic rendering does not play nice with this rule */
"react/prop-types": 0, // Does not track proptypes across inheritance / mixins / composition
"react/react-in-jsx-scope": 2,
"react/self-closing-comp": 2,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment