-
Notifications
You must be signed in to change notification settings - Fork 17
/
.eslintrc.js
85 lines (81 loc) · 2.02 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module.exports = {
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier", "react", "import"],
env: {
browser: true,
jest: true,
es2021: true,
node: true,
},
"extends": [
'airbnb-base',
"airbnb-typescript",
'prettier',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
'plugin:jest/recommended',
"plugin:storybook/recommended"
],
settings: {
react: {
pragma: 'React',
version: 'detect',
"fragment": "Fragment",
},
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.tsx', '.ts', '.js', '.json'],
},
alias: [
['src', './src'],
],
},
},
'rules': {
'jest/expect-expect': [
'error',
{
assertFunctionNames: ['expect', 'testSaga', 'expectSaga'],
},
],
'import/order': [
'error',
{
'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
'newlines-between': 'always',
'alphabetize': { order: 'asc', caseInsensitive: true },
'warnOnUnassignedImports': true
},
],
'import/default': 'off',
'import/no-extraneous-dependencies': 0,
'import/no-named-as-default-member': 'off',
'import/no-named-as-default': 'off',
'import/extensions': 0,
'import/no-unresolved': 0,
'import/prefer-default-export': 0,
'react/function-component-definition': [
2,
{
namedComponents: "arrow-function",
unnamedComponents: "arrow-function",
},
],
"react/react-in-jsx-scope": "off",
'jsx-a11y/anchor-is-valid': 'off',
"no-param-reassign": 0,
"@typescript-eslint/indent": ["error", 2],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "error",
},
parserOptions: {
sourceType: 'module',
project: './tsconfig.json',
ecmaFeatures: {
jsx: true,
},
},
}