Last active
September 14, 2020 03:59
Star
You must be signed in to star a gist
Common Dev Dependencies and Their Configurations (ESLint and Prettier). Check all four files inside this gist. TL-DR: yarn add -D babel-eslint babel-plugin-module-resolver eslint eslint-config-airbnb eslint-config-prettier eslint-plugin-import eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks gatsby-plugin-eslint eslint-loader…
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
node_modules | |
.next |
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
{ | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true, | |
"node": true, | |
"jest": true | |
}, | |
"plugins": [ | |
"react", | |
"react-hooks", | |
"prettier" | |
], | |
"extends": [ | |
"airbnb", | |
"prettier", | |
"plugin:prettier/recommended", | |
"plugin:react/recommended", | |
"prettier/react" | |
], | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"sourceType": "module", | |
"ecmaVersion": 2018, | |
"allowImportExportEverywhere": false, | |
"codeFrame": false, | |
"ecmaFeatures": { | |
"jsx": true | |
}, | |
}, | |
"settings": { | |
"react": { | |
"version": "detect" | |
} | |
}, | |
"rules": { | |
// React specifics | |
"react/no-unused-prop-types": 0, | |
"react-hooks/rules-of-hooks": "error", | |
"react-hooks/exhaustive-deps": "warn", | |
"react/button-has-type": 0, | |
"react/jsx-filename-extension": ["off"], | |
"react/prop-types": "warn", | |
// ESLint specifics | |
"max-len": ["error", {"code": 100}], | |
"prefer-promise-reject-errors": ["off"], | |
"no-nested-ternary": "off", | |
"no-return-assign": ["off"], | |
"no-shadow": "off", | |
"no-lonely-if": "warn", | |
"consistent-return": "off", | |
"no-use-before-define": "warn", | |
"no-underscore-dangle": "off", | |
"no-unused-vars": "warn", | |
"import/no-unresolved": "off", | |
"no-unused-expressions": "off", | |
"radix": "off", | |
"spaced-comment": "off", | |
"jsx-a11y/alt-text": "warn", | |
"jsx-a11y/click-events-have-key-events": "warn", | |
"jsx-a11y/no-static-element-interactions": "warn", | |
"jsx-a11y/no-noninteractive-element-interactions": "warn", | |
"prettier/prettier": "error", | |
"arrow-parens": ["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
package-lock.json | |
.next | |
node_modules/ |
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
{ | |
"trailingComma": "es5", | |
"tabWidth": 4, | |
"endOfLine": "lf", | |
"printWidth": 100, | |
"semi": true, | |
"singleQuote": true, | |
"arrowParens:": "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
yarn add -D babel-eslint babel-plugin-module-resolver eslint eslint-config-airbnb eslint-config-prettier eslint-plugin-import eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-loader prettier pretty-quick gatsby-plugin-eslint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment