|
1 | 1 | { |
2 | 2 | "$schema": "./node_modules/oxlint/configuration_schema.json", |
3 | 3 | "plugins": [ |
4 | | - "typescript" |
| 4 | + "typescript", |
| 5 | + "oxc", |
| 6 | + "promise", |
| 7 | + "import" |
| 8 | + // these rule sets may be added later |
| 9 | + // "vitest" |
| 10 | + // "react" |
5 | 11 | ], |
6 | 12 | "categories": { |
7 | 13 | "correctness": "error" |
|
23 | 29 | "**/production/**/*", |
24 | 30 | "**/public/**/*", |
25 | 31 | "**/.next/**/*", |
26 | | - "**/*env.d.ts", |
27 | 32 | "**/.pnp.cjs" |
28 | 33 | ], |
| 34 | + // see: https://oxc.rs/docs/guide/usage/linter/rules.html |
29 | 35 | "rules": { |
30 | 36 | "eqeqeq": "error", |
31 | 37 | // currently in oxlint's nursery (=under development) |
32 | | - "constructor-super": "error", |
33 | | - // currently unsupported by oxlint |
34 | | - "dot-notation": "error", |
35 | | - "for-direction": "error", |
36 | | - // currently in oxlint's nursery (=under development) |
37 | 38 | "getter-return": "error", |
38 | 39 | "guard-for-in": "error", |
39 | | - // currently unsupported by oxlint |
40 | | - "new-parens": "error", |
41 | | - "no-async-promise-executor": "error", |
| 40 | + "no-array-constructor": "error", |
42 | 41 | "no-bitwise": "error", |
43 | | - "no-caller": "error", |
44 | 42 | "no-case-declarations": "error", |
45 | | - "no-class-assign": "error", |
46 | | - "no-compare-neg-zero": "error", |
47 | | - "no-cond-assign": "error", |
48 | | - "no-const-assign": "error", |
49 | | - "no-constant-binary-expression": "error", |
50 | | - "no-constant-condition": "error", |
51 | | - "no-control-regex": "error", |
52 | | - "no-debugger": "error", |
53 | | - "no-delete-var": "error", |
54 | | - // currently unsupported by oxlint |
55 | | - "no-dupe-args": "error", |
56 | | - "no-dupe-class-members": "error", |
57 | | - "no-dupe-else-if": "error", |
58 | | - "no-dupe-keys": "error", |
59 | | - "no-duplicate-case": "error", |
60 | 43 | "no-empty": "error", |
61 | 44 | "no-empty-character-class": "error", |
62 | 45 | "no-empty-pattern": "error", |
63 | 46 | "no-empty-static-block": "error", |
64 | | - "no-eval": "error", |
65 | | - "no-ex-assign": "error", |
66 | 47 | "no-explicit-any": "error", |
67 | | - "no-extra-boolean-cast": "error", |
68 | 48 | "no-fallthrough": "error", |
69 | | - "no-func-assign": "error", |
70 | | - "no-global-assign": "error", |
71 | 49 | "no-import-assign": "error", |
72 | 50 | "no-inner-declarations": "off", |
73 | | - "no-invalid-regexp": "error", |
74 | | - "no-irregular-whitespace": "error", |
75 | 51 | "no-labels": "error", |
76 | | - "no-loss-of-precision": "error", |
77 | | - // currently in oxlint's nursery (=under development) |
78 | 52 | "no-misleading-character-class": "error", |
79 | | - // currently unsupported by oxlint |
80 | | - "no-multiple-empty-lines": ["error", { |
81 | | - "max": 1 |
82 | | - }], |
83 | | - "no-new-native-nonconstructor": "error", |
84 | 53 | "no-new-wrappers": "error", |
85 | | - "no-nonoctal-decimal-escape": "error", |
86 | | - "no-obj-calls": "error", |
87 | | - // currently unsupported by oxlint |
88 | | - "no-octal": "error", |
89 | 54 | "no-prototype-builtins": "error", |
90 | 55 | "no-redeclare": "error", |
91 | 56 | "no-regex-spaces": "error", |
92 | | - "no-self-assign": "error", |
93 | | - "no-setter-return": "error", |
94 | | - "no-shadow-restricted-names": "error", |
95 | | - "no-sparse-arrays": "error", |
96 | | - "no-this-before-super": "error", |
97 | 57 | "no-throw-literal": "error", |
98 | | - // currently unsupported by oxlint |
99 | | - "no-trailing-spaces": "error", |
100 | | - // currently in oxlint's nursery (=under development) |
101 | | - "no-undef": "off", |
102 | 58 | "no-unexpected-multiline": "error", |
103 | 59 | // currently in oxlint's nursery (=under development) |
104 | 60 | "no-unreachable": "error", |
105 | | - "no-unsafe-finally": "error", |
106 | | - "no-unsafe-negation": "error", |
107 | | - "no-unsafe-optional-chaining": "error", |
108 | | - "no-unused-labels": "error", |
109 | | - "no-unused-private-class-members": "error", |
110 | 61 | "no-unused-vars": [ |
111 | 62 | "error", |
112 | 63 | { |
|
115 | 66 | "varsIgnorePattern": "^_" |
116 | 67 | } |
117 | 68 | ], |
118 | | - "no-useless-backreference": "error", |
119 | | - "no-useless-catch": "error", |
120 | | - "no-useless-escape": "error", |
121 | 69 | "no-var": "error", |
122 | | - "no-var-requires": "error", |
123 | | - "no-with": "error", |
124 | | - // currently unsupported by oxlint |
125 | 70 | "prefer-const": "error", |
126 | 71 | "prefer-rest-params": "error", |
127 | 72 | "prefer-spread": "error", |
128 | | - // currently unsupported by oxlint |
129 | | - "quotes": [2, "single", { |
130 | | - "avoidEscape": true |
131 | | - }], |
132 | | - "require-yield": "error", |
133 | | - // currently unsupported by oxlint |
134 | | - "semi": [2, "always"], |
135 | | - // currently unsupported by oxlint |
136 | | - "space-before-function-paren": ["error", { |
137 | | - "anonymous": "never", |
138 | | - "asyncArrow": "always", |
139 | | - "named": "never" |
140 | | - }], |
141 | | - "use-isnan": "error", |
142 | | - "valid-typeof": "error", |
143 | | - "@typescript-eslint/ban-ts-comment": "error", |
144 | | - "no-array-constructor": "error", |
145 | | - "@typescript-eslint/adjacent-overload-signatures": "error", |
146 | | - "@typescript-eslint/array-type": [ |
| 73 | + |
| 74 | + // all typescript related rules |
| 75 | + "typescript/adjacent-overload-signatures": "error", |
| 76 | + "typescript/array-type": [ |
147 | 77 | "error", |
148 | 78 | { |
149 | 79 | "default": "array-simple" |
150 | 80 | } |
151 | 81 | ], |
152 | | - "@typescript-eslint/no-duplicate-enum-values": "error", |
153 | | - "@typescript-eslint/no-empty-object-type": "error", |
154 | | - "@typescript-eslint/no-extra-non-null-assertion": "error", |
155 | | - "@typescript-eslint/no-misused-new": "error", |
156 | | - "@typescript-eslint/no-namespace": "off", |
157 | | - "@typescript-eslint/no-non-null-assertion": "off", |
158 | | - "@typescript-eslint/no-non-null-asserted-optional-chain": "error", |
159 | | - "@typescript-eslint/prefer-for-of": "error", |
160 | | - "@typescript-eslint/no-require-imports": "error", |
161 | | - "@typescript-eslint/no-this-alias": "error", |
162 | | - "@typescript-eslint/no-unnecessary-type-constraint": "error", |
163 | | - "@typescript-eslint/no-unsafe-declaration-merging": "error", |
164 | | - "@typescript-eslint/no-unsafe-function-type": "error", |
165 | | - "@typescript-eslint/no-unused-expressions": "error", |
166 | | - "@typescript-eslint/no-unnecessary-condition": "error", |
167 | | - "@typescript-eslint/no-wrapper-object-types": "error", |
168 | | - "@typescript-eslint/parameter-properties": "error", |
169 | | - "@typescript-eslint/prefer-as-const": "error", |
170 | | - "@typescript-eslint/prefer-namespace-keyword": "error", |
171 | | - "@typescript-eslint/strict-boolean-expressions": "error", |
172 | | - "@typescript-eslint/triple-slash-reference": "error", |
| 82 | + "typescript/ban-ts-comment": "error", |
| 83 | + // currently in oxlint's nursery (=under development) |
| 84 | + "typescript/dot-notation": "error", |
| 85 | + "typescript/no-empty-object-type": "error", |
| 86 | + "typescript/no-namespace": "off", |
| 87 | + // currently in oxlint's nursery (=under development) |
| 88 | + "typescript/no-unnecessary-condition": "error", |
| 89 | + "typescript/no-unnecessary-type-constraint": "error", |
| 90 | + "typescript/no-unsafe-function-type": "error", |
| 91 | + "typescript/no-unused-expressions": "error", |
| 92 | + "typescript/no-non-null-assertion": "off", |
| 93 | + "typescript/no-require-imports": "error", |
| 94 | + "typescript/no-var-requires": "error", |
| 95 | + "typescript/parameter-properties": "error", |
| 96 | + "typescript/prefer-for-of": "error", |
| 97 | + "typescript/prefer-namespace-keyword": "error", |
| 98 | + "typescript/prefer-nullish-coalescing": "error", |
| 99 | + // currently in oxlint's nursery (=under development) |
| 100 | + "typescript/prefer-optional-chain": "error", |
| 101 | + "typescript/strict-boolean-expressions": [ |
| 102 | + "error", |
| 103 | + { |
| 104 | + "allowString": false, |
| 105 | + "allowNumber": false, |
| 106 | + "allowNullableObject": false |
| 107 | + } |
| 108 | + ], |
| 109 | + "typescript/triple-slash-reference": "error", |
| 110 | + // all import related rules |
| 111 | + "import/no-duplicates": "error", |
| 112 | + "import/first": "error", |
| 113 | + "import/export": "error", |
| 114 | + "import/default": "error", |
| 115 | + "import/named": "error", |
| 116 | + "import/no-unresolved": "error" |
173 | 117 | } |
174 | 118 | } |
0 commit comments