forked from betterplace/fe-technical-challenge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
104 lines (104 loc) · 2.74 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
settings: {
'react': {
version: 'detect',
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: true,
node: true,
},
},
plugins: ['prettier', 'sort-imports-es6-autofix', 'vitest', 'import', 'consistent-default-export-name', 'react'],
rules: {
'react/prop-types': 0,
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'import/no-named-as-default-member': 0,
'import/order': 0,
'import/exports-last': 2,
'import/first': 2,
'import/prefer-default-export': [2, { target: 'any' }],
'import/no-unused-modules': [1, { unusedExports: true }],
'no-empty': [2, { allowEmptyCatch: true }],
'sort-imports-es6-autofix/sort-imports-es6': [
2,
{
ignoreCase: false,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'single', 'all', 'multiple'],
},
],
'consistent-default-export-name/default-export-match-filename': [2, [null, 'camel']],
'consistent-default-export-name/default-import-match-filename': [1, { ignorePaths: ['**/*.module.css'] }],
},
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'plugin:vitest/recommended',
'plugin:import/recommended',
'@betterplace/eslint-config-base',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
],
overrides: [
{
files: ['**/*.{ts,tsx}'],
plugins: ['@typescript-eslint'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/typescript',
],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/ban-types': [
2,
{
extendDefaults: true,
types: {
'{}': false,
},
},
],
'@typescript-eslint/no-unused-vars': [
2,
{
vars: 'all',
args: 'all',
ignoreRestSiblings: true,
varsIgnorePattern: '^[_A-Z]',
argsIgnorePattern: '^_',
caughtErrors: 'none',
},
],
},
},
{
files: ['index.ts', 'server.ts'],
rules: {
'import/prefer-default-export': 0,
},
},
{
files: ['*.config.*'],
rules: {
'import/no-unused-modules': 0,
'consistent-default-export-name/default-import-match-filename': 0,
},
},
],
}