-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
62 lines (62 loc) · 1.72 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
module.exports = {
env: {
browser: true,
jest: true,
},
extends: [
'airbnb',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:prettier/recommended',
'prettier/react',
'prettier/@typescript-eslint',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json'],
},
plugins: ['@typescript-eslint', 'react-hooks'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'all',
ignoreRestSiblings: false,
argsIgnorePattern: '^_',
},
],
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/*.config.{js,ts}',
'**/*.spec.{ts,tsx}',
'**/.storybook/**/*.{ts,tsx}',
'**/*.stories.{ts,tsx}',
'**/__fixtures__/**/*.{ts,tsx}',
],
},
],
'import/extensions': ['error', 'never'],
'import/order': ['error', { 'newlines-between': 'always' }],
'import/prefer-default-export': 0,
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
'react/jsx-key': ['error', { checkFragmentShorthand: true }],
'react/jsx-props-no-spreading': 0,
'react/prop-types': 0,
},
settings: {
'import/resolver': {
node: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
paths: ['./src', './node_modules'],
},
},
},
}