Created
July 18, 2021 21:49
-
-
Save washingtonsoares/b1164c4ddfe67afb88bbbf4be221ef2b to your computer and use it in GitHub Desktop.
Eslint + Prettier
This file contains hidden or 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
| module.exports = { | |
| root: true, | |
| parser: '@typescript-eslint/parser', | |
| parserOptions: { | |
| ecmaVersion: 2020, | |
| sourceType: 'module', | |
| ecmaFeatures: { | |
| jsx: true | |
| } | |
| }, | |
| settings: { | |
| react: { | |
| version: 'detect' | |
| } | |
| }, | |
| extends: [ | |
| 'plugin:react/recommended', | |
| 'plugin:@typescript-eslint/eslint-recommended', | |
| 'plugin:@typescript-eslint/recommended', | |
| 'plugin:react-hooks/recommended', | |
| 'plugin:prettier/recommended' | |
| ], | |
| plugins: ['react-hooks', '@typescript-eslint', 'prettier'], | |
| rules: { | |
| 'react/react-in-jsx-scope': 'off', | |
| 'react/jsx-filename-extension': [1, { extensions: ['.ts', '.tsx'] }], | |
| 'import/no-named-as-default': 0, | |
| 'react-hooks/rules-of-hooks': 'error', | |
| 'react-hooks/exhaustive-deps': 'warn', | |
| 'prettier/prettier': ['error', { singleQuote: true }], | |
| '@typescript-eslint/explicit-member-accessibility': 0, | |
| '@typescript-eslint/explicit-function-return-type': 0, | |
| '@typescript-eslint/no-explicit-any': 1, | |
| '@typescript-eslint/explicit-module-boundary-types': 'off' | |
| } | |
| }; |
This file contains hidden or 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 eslint prettier eslint-plugin-react-hooks @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-react eslint-config-prettier eslint-plugin-prettier --dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment