-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
62 lines (62 loc) · 1.64 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: {
amd: true,
browser: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react-hooks/recommended',
'plugin:@next/next/recommended',
'prettier',
'plugin:prettier/recommended', // Make sure this is always the last element in the array.
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: ['simple-import-sort', 'sort-destructure-keys', 'prettier'],
root: true,
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'jsx-a11y/anchor-is-valid': [
'error',
{
aspects: ['invalidHref', 'preferButton'],
components: ['Link'],
specialLink: ['hrefLeft', 'hrefRight'],
},
],
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
'react/jsx-sort-props': [
'error',
{
callbacksLast: true,
ignoreCase: false,
noSortAlphabetically: false,
reservedFirst: true,
shorthandFirst: true,
shorthandLast: false,
},
],
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
'sort-destructure-keys/sort-destructure-keys': 2,
'sort-keys': ['error', 'asc', { caseSensitive: true, minKeys: 2, natural: false }],
},
settings: {
react: {
version: 'detect',
},
},
};