forked from dbharris2/pr-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
76 lines (76 loc) · 2.08 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
module.exports = {
root: true,
extends: [
'eslint:recommended',
'next/core-web-vitals',
'plugin:react-hooks/recommended',
'plugin:relay/recommended',
'plugin:tailwindcss/recommended',
],
overrides: [
{
files: ['**/*.{ts,tsx}'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json'],
},
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'after-used',
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
},
},
],
plugins: [
'@typescript-eslint',
'import',
'no-relative-import-paths',
'react',
'relay',
'simple-import-sort',
'unused-imports',
],
rules: {
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'no-relative-import-paths/no-relative-import-paths': ['error'],
'react/jsx-sort-props': 'error',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': [
'error',
{
groups: [
// Packages `react` related packages come first.
['^react', '^next'],
// External packages.
['^@'],
// Side effect imports.
['^\\u0000'],
// Parent imports. Put `..` last.
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
// Other relative imports. Put same-folder imports and `.` last.
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
// Style imports.
['^.*.(s?css)$'],
],
},
],
'unused-imports/no-unused-imports': 'error',
},
};