Skip to content

Instantly share code, notes, and snippets.

@tobbbe
Last active April 3, 2019 13:08
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 tobbbe/a602e371ae809674b7a6d334b195ab1a to your computer and use it in GitHub Desktop.
Save tobbbe/a602e371ae809674b7a6d334b195ab1a to your computer and use it in GitHub Desktop.
{
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"
],
}
}
// 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!
}
};
// 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