-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.js
More file actions
56 lines (55 loc) · 1.46 KB
/
Copy patheslint.config.js
File metadata and controls
56 lines (55 loc) · 1.46 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
// @ts-check
const eslint = require('@eslint/js');
const tseslint = require('@typescript-eslint/eslint-plugin');
const tsparser = require('@typescript-eslint/parser');
const globals = require('globals');
module.exports = [
{
ignores: [
'node_modules/**',
'client/node_modules/**',
'client/out/**',
'server/node_modules/**',
'server/out/**',
'out/**',
],
},
{
...eslint.configs.recommended,
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
},
},
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsparser,
globals: {
...globals.node,
...globals.browser,
},
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
...tseslint.configs['recommended'].rules,
'semi': [2, 'always'],
'no-undef': 0, // TypeScript's type checker handles this
'no-redeclare': 0, // @typescript-eslint/no-redeclare handles TS overloads
'no-unused-private-class-members': 1,
'@typescript-eslint/no-unused-vars': [1, {
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_',
'caughtErrorsIgnorePattern': '^_',
}],
'@typescript-eslint/no-explicit-any': 1,
'@typescript-eslint/explicit-module-boundary-types': 1,
'@typescript-eslint/no-non-null-assertion': 1,
'@typescript-eslint/no-unused-expressions': 1,
},
},
];