-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
108 lines (108 loc) · 3.3 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
105
106
107
108
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
'env': {
browser: true,
es2021: true,
node: true,
},
ignorePatterns: [
'node_modules/',
'.next/',
'.vscode/',
'public/',
'LICENSE',
// by default we always ignore our tests folder
// to ensure the tests dont trigger errors in
// staging / production deployments
// comment out the next line to have eslint check
// the test files (in development)
'tests/eslint/',
],
reportUnusedDisableDirectives: true,
overrides: [
{
files: ['**/*.ts?(x)', '**/*.md?(x)'],
extends: [
'next/core-web-vitals',
],
},
{
files: ['**/*.ts?(x)'],
extends: [
'plugin:@react-three/recommended',
// https://typescript-eslint.io/users/configs#recommended-configurations
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
warnOnUnsupportedTypeScriptVersion: true,
project: './tsconfig.json',
},
plugins: [
'@typescript-eslint',
],
rules: {
quotes: [
'error',
'single',
{ "allowTemplateLiterals": true },
],
semi: [
'error',
'never',
],
'@typescript-eslint/naming-convention': [
'error',
{
'selector': 'interface',
'format': [
'PascalCase',
],
'custom': {
'regex': '^I[A-Z]',
'match': true,
},
}
],
'@typescript-eslint/consistent-indexed-object-style': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': 'allow-with-description',
'ts-nocheck': false,
'ts-check': false,
minimumDescriptionLength: 3,
},
],
},
},
{
files: ['**/*.md?(x)'],
extends: [
'plugin:mdx/recommended',
],
parser: 'eslint-mdx',
parserOptions: {
markdownExtensions: ['*.md, *.mdx'],
},
settings: {
'mdx/code-blocks': false,
'mdx/remark': true,
},
rules: {
'react/no-unescaped-entities': 0,
}
// markdown rules get configured in remarkrc.mjs
},
],
}