-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
85 lines (85 loc) · 2.15 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
/* eslint-disable prettier/prettier */
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'airbnb',
'plugin:prettier/recommended',
'airbnb/hooks',
],
settings: {
react: {
version: 'detect', // Automatically detect the react version
},
'import/resolver': {
alias: {
map: [['@', './src']],
extensions: ['.js', '.css', '.json', '.tsx', '.ts'],
},
typescript: {},
},
},
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020, // Use the latest ecmascript standard
sourceType: 'module', // Allows using import/export statements
ecmaFeatures: {
jsx: true, // Enable JSX since we"re using React
},
},
plugins: ['@typescript-eslint', 'prettier', 'simple-import-sort'],
ignorePatterns: ['*.d.ts'],
rules: {
camelcase: 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'simple-import-sort/sort': 'off',
'@typescript-eslint/indent': [0],
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/camelcase': 'off',
'react/jsx-filename-extension': [0],
'react/jsx-props-no-spreading': [0],
'react/prop-types': [0],
'react/jsx-key': 'error',
'no-use-before-define': 'off',
'import/extensions': 'off',
'import/newline-after-import': 'off',
'import/prefer-default-export': 'warn',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/anchor-is-valid': [
'off',
{
components: ['Link'],
specialLink: ['hrefLeft', 'hrefRight'],
aspects: ['noHref', 'invalidHref', 'preferButton'],
},
],
'no-shadow': 'off',
'prettier/prettier': [
'error',
{
usePrettierrc: true,
},
],
},
globals: {
React: true,
google: true,
mount: true,
mountWithRouter: true,
shallow: true,
shallowWithRouter: true,
context: true,
expect: true,
jsdom: true,
JSX: 'readonly',
},
};