-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
122 lines (122 loc) · 4.02 KB
/
index.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: [
'eslint:recommended',
'next/core-web-vitals',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:deprecation/recommended',
'plugin:eslint-comments/recommended',
'plugin:import/errors',
'plugin:import/typescript',
'plugin:perfectionist/recommended-natural',
'plugin:unicorn/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
],
parserOptions: {
project: true,
},
plugins: [
'@stylistic',
'only-error',
'prefer-arrow-functions',
'unused-imports',
],
rules: {
'@stylistic/jsx-curly-brace-presence': 'error',
'@stylistic/lines-around-comment': [
'error',
{ afterHashbangComment: true },
],
'@stylistic/padding-line-between-statements': [
'error',
{
blankLine: 'always',
next: ['block-like', 'export', 'return'],
prev: '*',
},
{ blankLine: 'always', next: ['*'], prev: ['block-like'] },
{
blankLine: 'always',
next: ['expression'],
prev: ['block-like', 'const'],
},
{ blankLine: 'never', next: ['const'], prev: ['const'] },
],
'@stylistic/spaced-comment': 'error',
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/default-param-last': 'error',
'@typescript-eslint/method-signature-style': 'error',
'@typescript-eslint/no-confusing-void-expression': [
'error',
{ ignoreArrowShorthand: true },
],
'@typescript-eslint/no-floating-promises': ['error', { ignoreIIFE: true }],
'@typescript-eslint/no-import-type-side-effects': 'error',
'@typescript-eslint/no-misused-promises': 'off',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/prefer-destructuring': 'error',
'@typescript-eslint/return-await': 'error',
'@typescript-eslint/strict-boolean-expressions': [
'error',
{
allowNullableBoolean: true,
allowNullableNumber: true,
allowNullableString: true,
},
],
'@typescript-eslint/switch-exhaustiveness-check': 'error',
curly: 'error',
eqeqeq: ['error', 'always', { null: 'ignore' }],
'func-style': ['error', 'expression', { allowArrowFunctions: true }],
'import/consistent-type-specifier-style': 'error',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-anonymous-default-export': 'error',
'import/no-cycle': 'error',
'import/no-duplicates': 'error',
'import/no-empty-named-blocks': 'error',
'import/no-extraneous-dependencies': 'error',
'import/no-namespace': 'error',
'multiline-comment-style': ['error', 'separate-lines'],
'no-console': 'error',
'no-constant-binary-expression': 'error',
'no-else-return': 'error',
'no-unneeded-ternary': 'error',
'no-useless-rename': 'error',
'no-warning-comments': 'error',
'object-shorthand': 'error',
'prefer-arrow-callback': 'error',
'prefer-arrow-functions/prefer-arrow-functions': [
'error',
{ returnStyle: 'implicit' },
],
'prefer-template': 'error',
'react/jsx-boolean-value': 'error',
'react/jsx-handler-names': 'error',
'react/no-unknown-property': ['error', { ignore: ['tw'] }],
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/self-closing-comp': 'error',
'unicorn/no-nested-ternary': 'off',
'unicorn/no-null': 'off',
'unicorn/prevent-abbreviations': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{
args: 'after-used',
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
vars: 'all',
varsIgnorePattern: '^_',
},
],
yoda: 'error',
},
};