Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
62 lines (61 loc) · 1.57 KB
/
Copy patheslint.config.js
File metadata and controls
62 lines (61 loc) · 1.57 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
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from 'globals';
export default tseslint.config(
{
ignores: ['dist/**', 'node_modules/**'],
},
js.configs.recommended,
{
files: ['**/*.ts'],
extends: [...tseslint.configs.recommended],
rules: {
// Parsing/creating plists is inherently dynamic (arbitrary nested
// dicts/arrays of unknown shape); `any` is the honest type here, not a
// shortcut.
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.node,
},
},
rules: {
'array-callback-return': 'error',
'eqeqeq': ['error', 'smart'],
'no-caller': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-implied-eval': 'error',
'no-lonely-if': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-proto': 'error',
'no-return-assign': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-template-curly-in-string': 'error',
'no-throw-literal': 'error',
'no-unmodified-loop-condition': 'error',
'no-unneeded-ternary': 'error',
'no-useless-concat': 'error',
'no-useless-return': 'error',
'no-var': 'error',
'prefer-const': 'error',
'prefer-promise-reject-errors': 'error',
'radix': 'error',
},
},
{
files: ['test/**'],
languageOptions: {
globals: {
...globals.node,
},
},
},
);