-
-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathjavascript.ts
More file actions
56 lines (55 loc) · 1.9 KB
/
javascript.ts
File metadata and controls
56 lines (55 loc) · 1.9 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
import type { OxlintConfig } from 'oxlint'
export const javascriptConfig: OxlintConfig = {
rules: {
/** TODO */
'for-direction': 'error',
'no-async-promise-executor': 'error',
'no-case-declarations': 'error',
'no-class-assign': 'error',
'no-compare-neg-zero': 'error',
'no-cond-assign': 'error',
'no-constant-binary-expression': 'error',
'no-constant-condition': 'error',
'no-control-regex': 'error',
'no-debugger': 'error',
'no-delete-var': 'error',
'no-dupe-else-if': 'error',
'no-duplicate-case': 'error',
'no-empty-character-class': 'error',
'no-empty-pattern': 'error',
'no-empty-static-block': 'error',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
'no-fallthrough': 'error',
'no-global-assign': 'error',
'no-invalid-regexp': 'error',
'no-irregular-whitespace': 'error',
'no-loss-of-precision': 'error',
'no-misleading-character-class': 'error',
'no-nonoctal-decimal-escape': 'error',
'no-regex-spaces': 'error',
'no-self-assign': 'error',
/** Warn about variable with identical names in the outer scope */
// 'no-shadow': 'warn', // No implementation yet
'no-shadow-restricted-names': 'error',
'no-sparse-arrays': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-optional-chaining': 'error',
'no-unused-labels': 'error',
'no-unused-private-class-members': 'error',
'no-useless-backreference': 'error',
'no-useless-catch': 'error',
'no-useless-escape': 'error',
/** Prefer let and const */
'no-var': 'error',
'no-with': 'error',
/** Prefer const if never re-assigned */
'prefer-const': 'error',
'require-yield': 'error',
/** Stylistic consistency */
'sort-imports': ['error', { ignoreDeclarationSort: true }],
'use-isnan': 'error',
/** Enforce comparing typeof against valid strings */
'valid-typeof': 'error',
},
}