Last active
April 3, 2019 13:08
-
-
Save tobbbe/a602e371ae809674b7a6d334b195ab1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
rules: { | |
"capitalized-comments": "off", | |
"multiline-comment-style": "off", | |
"no-console": "off", | |
"no-await-in-loop": "off", | |
"quote-props": "off", | |
"sort-keys": "off", | |
"arrow-parens": "off", | |
"no-tabs": "off", | |
"no-ternary": "off", | |
"multiline-ternary": "off", | |
"require-jsdoc": "off", | |
"sort-imports": "off", | |
"no-process-env": "off", | |
"func-style": "off", | |
"max-len": "off", | |
"eol-last": "off", | |
"space-before-function-paren": "off", | |
"padded-blocks": "off", | |
"no-inline-comments": "off", | |
"no-extra-parens": "off", | |
"no-magic-numbers": "off", | |
"no-plusplus": "off", | |
"function-paren-newline": "off", | |
"id-length": "off", | |
"array-element-newline": "off", | |
"one-var": "off", | |
"operator-linebreak": "off", | |
"object-property-newline": "off", | |
"react/display-name": "off", | |
"curly": "off", | |
"no-unused-vars": "warn", | |
"brace-style": "stroustrup", | |
"indent": [ | |
"error", | |
"tab", | |
{ | |
"SwitchCase": 1 | |
} | |
], | |
"eqeqeq": [ | |
"error", | |
"always" | |
], | |
"jsx-quotes": [ | |
"error", | |
"prefer-double" | |
], | |
"quotes": [ | |
"error", | |
"single" | |
], | |
"object-curly-spacing": [ | |
"error", | |
"always" | |
], | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm i --save-dev eslint-plugin-react-hooks (eslint is installed with CRA) | |
module.exports = { | |
"extends": [ | |
"react-app", | |
"eslint:all" | |
], | |
"plugins": [ | |
"react-hooks" | |
], | |
"rules": { | |
"react-hooks/rules-of-hooks": "error", | |
"react-hooks/exhaustive-deps": "warn", | |
// + ... see rules file! | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm i --save-dev eslint babel-eslint eslint-plugin-react eslint-plugin-react-hooks | |
module.exports = { | |
"env": { | |
"browser": true, | |
"es6": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended" | |
], | |
"globals": { | |
"Atomics": "readonly", | |
"SharedArrayBuffer": "readonly", | |
"process": "readonly" | |
}, | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaFeatures": { | |
"jsx": true | |
}, | |
"ecmaVersion": 2018, | |
"sourceType": "module" | |
}, | |
"plugins": [ | |
"react", | |
"react-hooks" | |
], | |
"rules": { | |
"react-hooks/rules-of-hooks": "error", | |
"react-hooks/exhaustive-deps": "warn", | |
"react/prop-types": ["off"], | |
// + ... see rules file! | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment