This repository was archived by the owner on Dec 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
81 lines (80 loc) · 2.3 KB
/
eslint.config.js
File metadata and controls
81 lines (80 loc) · 2.3 KB
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
import globals from 'globals';
import tseslint from 'typescript-eslint';
import pluginReact from 'eslint-plugin-react';
import pluginSecurity from 'eslint-plugin-security';
import pluginImport from 'eslint-plugin-import';
export default [
{
ignores: [
'.dependabot/',
'.git/',
'.vscode/',
'node_modules/',
'public/',
'extension/dist',
'.next/',
'*.js',
'next-env.d.ts',
'.eslintrc.js',
'next.config.js',
],
},
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
globals: {
...globals.browser,
...globals.es2021,
},
parser: tseslint.parser,
parserOptions: {
project: ['tsconfig-all.json'],
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': tseslint.plugin,
react: pluginReact,
security: pluginSecurity,
import: pluginImport,
},
rules: {
// Custom rules
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
types: ['boolean'],
format: ['PascalCase'],
prefix: ['is', 'should', 'has', 'can', 'did', 'will', 'does', 'was', 'were'],
},
],
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/prefer-regexp-exec': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/restrict-template-expressions': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/unbound-method': 1,
'@typescript-eslint/no-misused-promises': 1,
'react/display-name': 1,
'arrow-body-style': ['error', 'as-needed'],
'no-prototype-builtins': 'error',
'no-case-declarations': 0,
'no-useless-escape': 'error',
'object-shorthand': 'error',
'sort-imports': ['error', { ignoreDeclarationSort: true }],
'security/detect-object-injection': 0,
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts'],
},
react: { version: 'detect' },
},
},
];