@4mbl/lint 0.0.0-alpha.a78f42b → 0.0.0-alpha.a82a736
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +165 -0
- package/bin/cli.js +31 -3
- package/dist/base.d.ts +48 -16
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +18 -2
- package/dist/base.js.map +1 -1
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +23 -0
- package/dist/config.js.map +1 -0
- package/dist/next.d.ts.map +1 -1
- package/dist/next.js +49 -37
- package/dist/next.js.map +1 -1
- package/dist/node.d.ts +2 -306
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +11 -3
- package/dist/node.js.map +1 -1
- package/dist/react.d.ts +2 -418
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +55 -31
- package/dist/react.js.map +1 -1
- package/package.json +5 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,170 @@
|
|
|
1
1
|
# @4mbl/lint
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.32
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 02f7629: Upgrade dependencies
|
|
8
|
+
|
|
9
|
+
## 1.0.0-beta.31
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- ab2e6d6: [base] Disable eslint/one-var rule
|
|
14
|
+
|
|
15
|
+
## 1.0.0-beta.30
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 10abc93: Upgrade dependencies
|
|
20
|
+
|
|
21
|
+
## 1.0.0-beta.29
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- fec850c: Migrate to native React Compiler rules
|
|
26
|
+
|
|
27
|
+
## 1.0.0-beta.28
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- cd19ade: Preserve all config properties when extending presets
|
|
32
|
+
|
|
33
|
+
## 1.0.0-beta.27
|
|
34
|
+
|
|
35
|
+
### Minor Changes
|
|
36
|
+
|
|
37
|
+
- 10abc93: Upgrade dependencies
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- dcfb4b0: [react] Preserve inherited plugins.
|
|
42
|
+
- f48a223: [react] Scope JSX rules in React preset
|
|
43
|
+
|
|
44
|
+
## 1.0.0-beta.26
|
|
45
|
+
|
|
46
|
+
### Minor Changes
|
|
47
|
+
|
|
48
|
+
- 10abc93: Upgrade dependencies
|
|
49
|
+
|
|
50
|
+
## 1.0.0-beta.25
|
|
51
|
+
|
|
52
|
+
### Minor Changes
|
|
53
|
+
|
|
54
|
+
- b812b8d: Upgrade dependencies
|
|
55
|
+
|
|
56
|
+
## 1.0.0-beta.24
|
|
57
|
+
|
|
58
|
+
### Minor Changes
|
|
59
|
+
|
|
60
|
+
- c713974: [base] Enable type-check within oxlint
|
|
61
|
+
- 87a9f36: Upgrade dependencies
|
|
62
|
+
|
|
63
|
+
## 1.0.0-beta.23
|
|
64
|
+
|
|
65
|
+
### Minor Changes
|
|
66
|
+
|
|
67
|
+
- 09239e5: Upgrade dependencies
|
|
68
|
+
|
|
69
|
+
## 1.0.0-beta.22
|
|
70
|
+
|
|
71
|
+
### Minor Changes
|
|
72
|
+
|
|
73
|
+
- 75f5fe2: Upgrade dependencies
|
|
74
|
+
|
|
75
|
+
## 1.0.0-beta.21
|
|
76
|
+
|
|
77
|
+
### Minor Changes
|
|
78
|
+
|
|
79
|
+
- ae2bb06: [base] Disable unicorn/max-nested-calls rule
|
|
80
|
+
|
|
81
|
+
## 1.0.0-beta.20
|
|
82
|
+
|
|
83
|
+
### Minor Changes
|
|
84
|
+
|
|
85
|
+
- 0a0c233: Upgrade dependencies
|
|
86
|
+
|
|
87
|
+
## 1.0.0-beta.19
|
|
88
|
+
|
|
89
|
+
### Minor Changes
|
|
90
|
+
|
|
91
|
+
- 4d35fb5: [react] Disable react/jsx-no-literals rule
|
|
92
|
+
|
|
93
|
+
## 1.0.0-beta.18
|
|
94
|
+
|
|
95
|
+
### Minor Changes
|
|
96
|
+
|
|
97
|
+
- a50c3f4: Upgrade dependencies
|
|
98
|
+
|
|
99
|
+
## 1.0.0-beta.17
|
|
100
|
+
|
|
101
|
+
### Minor Changes
|
|
102
|
+
|
|
103
|
+
- f0f62f4: Upgrade dependencies
|
|
104
|
+
|
|
105
|
+
## 1.0.0-beta.16
|
|
106
|
+
|
|
107
|
+
### Minor Changes
|
|
108
|
+
|
|
109
|
+
- b303b6f: Upgrade dependencies
|
|
110
|
+
|
|
111
|
+
## 1.0.0-beta.15
|
|
112
|
+
|
|
113
|
+
### Minor Changes
|
|
114
|
+
|
|
115
|
+
- aa95edc: Upgrade dependencies
|
|
116
|
+
|
|
117
|
+
## 1.0.0-beta.14
|
|
118
|
+
|
|
119
|
+
### Minor Changes
|
|
120
|
+
|
|
121
|
+
- e34f9fe: Enable import plugin in base
|
|
122
|
+
- 5586655: Disable some import plugin rules in base
|
|
123
|
+
- 9b2b412: Disable `no-nodejs-modules` in node
|
|
124
|
+
|
|
125
|
+
## 1.0.0-beta.13
|
|
126
|
+
|
|
127
|
+
### Minor Changes
|
|
128
|
+
|
|
129
|
+
- dd66007: Pin dependencies to ensure future compatibility
|
|
130
|
+
- 0feb87d: Remove unused dependencies and inline trivial imports
|
|
131
|
+
- 1d98a33: Disable `react/forbid-component-props` and `react/forbid-dom-props` to ensure Tailwind compatibility
|
|
132
|
+
- a9085f2: Extend inherited plugins in child presets
|
|
133
|
+
- 014d999: Allow `eslint/no-underscore-dangle` for `__dirname` and `__filename` in node
|
|
134
|
+
|
|
135
|
+
## 1.0.0-beta.12
|
|
136
|
+
|
|
137
|
+
### Minor Changes
|
|
138
|
+
|
|
139
|
+
- aee0259: Upgrade dependencies
|
|
140
|
+
|
|
141
|
+
## 1.0.0-beta.11
|
|
142
|
+
|
|
143
|
+
### Minor Changes
|
|
144
|
+
|
|
145
|
+
- 20b3dae: Use native rules for React when possible
|
|
146
|
+
|
|
147
|
+
## 1.0.0-beta.10
|
|
148
|
+
|
|
149
|
+
### Minor Changes
|
|
150
|
+
|
|
151
|
+
- 007a287: Configure more rules to reduce noise
|
|
152
|
+
- 007a287: Use native only-export-components rule instead of js plugin
|
|
153
|
+
- 007a287: Use correct namespace for Next.js rules
|
|
154
|
+
|
|
155
|
+
## 1.0.0-beta.9
|
|
156
|
+
|
|
157
|
+
### Minor Changes
|
|
158
|
+
|
|
159
|
+
- 491164e: Add --help flag to cli
|
|
160
|
+
- 491164e: Fallback to Oxlint config lookup if no preset is passed to CLI and Oxlint config exists within working directory.
|
|
161
|
+
|
|
162
|
+
## 1.0.0-beta.8
|
|
163
|
+
|
|
164
|
+
### Minor Changes
|
|
165
|
+
|
|
166
|
+
- a78f42b: Configure rules to reduce noise
|
|
167
|
+
|
|
3
168
|
## 1.0.0-beta.7
|
|
4
169
|
|
|
5
170
|
### Minor Changes
|
package/bin/cli.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { spawnSync } from 'node:child_process';
|
|
4
|
+
import { existsSync } from 'node:fs';
|
|
4
5
|
import path from 'node:path';
|
|
5
6
|
import { fileURLToPath } from 'node:url';
|
|
6
7
|
|
|
@@ -15,11 +16,38 @@ const wrapperArgs =
|
|
|
15
16
|
separatorIndex === -1 ? rawArgs : rawArgs.slice(0, separatorIndex);
|
|
16
17
|
const toolArgs = separatorIndex === -1 ? [] : rawArgs.slice(separatorIndex + 1);
|
|
17
18
|
|
|
19
|
+
if (wrapperArgs.includes('--help') || rawArgs.includes('-h')) {
|
|
20
|
+
console.log(`
|
|
21
|
+
Usage:
|
|
22
|
+
lint [options] -- [oxlint options]
|
|
23
|
+
|
|
24
|
+
Options:
|
|
25
|
+
--preset <name> Use a preset config (default: base if no config within cwd)
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
lint
|
|
29
|
+
lint --preset node
|
|
30
|
+
lint -- src --fix
|
|
31
|
+
|
|
32
|
+
Notes:
|
|
33
|
+
Everything after "--" is passed directly to oxlint.
|
|
34
|
+
`);
|
|
35
|
+
|
|
36
|
+
process.exit(0);
|
|
37
|
+
}
|
|
38
|
+
|
|
18
39
|
const presetArgIndex = wrapperArgs.findIndex((a) => a === '--preset');
|
|
40
|
+
|
|
19
41
|
const presetName =
|
|
20
|
-
presetArgIndex !== -1
|
|
42
|
+
presetArgIndex !== -1
|
|
43
|
+
? wrapperArgs[presetArgIndex + 1]
|
|
44
|
+
: !existsSync('./oxlint.config.ts') && !existsSync('./.oxlintrc.json')
|
|
45
|
+
? 'base'
|
|
46
|
+
: undefined;
|
|
21
47
|
|
|
22
|
-
const configPath =
|
|
48
|
+
const configPath = presetName
|
|
49
|
+
? path.resolve(__dirname, `../dist/${presetName}.js`)
|
|
50
|
+
: undefined;
|
|
23
51
|
|
|
24
52
|
const hasPath = toolArgs.some((a) => !a.startsWith('-'));
|
|
25
53
|
const hasMaxWarn = toolArgs.some((a) => a.startsWith('--max-warnings'));
|
|
@@ -28,7 +56,7 @@ const hasReportUnused = toolArgs.some((a) =>
|
|
|
28
56
|
);
|
|
29
57
|
|
|
30
58
|
const finalArgs = [
|
|
31
|
-
'--config',
|
|
59
|
+
configPath ? '--config' : undefined,
|
|
32
60
|
configPath,
|
|
33
61
|
hasPath ? undefined : 'src',
|
|
34
62
|
hasMaxWarn ? undefined : '--max-warnings=0',
|
package/dist/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineConfig, type OxlintConfig } from 'oxlint';
|
|
2
2
|
type BaseOptions = {};
|
|
3
3
|
declare function baseConfig(_options?: Partial<BaseOptions>): {
|
|
4
|
-
plugins: ("
|
|
4
|
+
plugins: ("import" | "typescript" | "unicorn")[];
|
|
5
5
|
jsPlugins: never[];
|
|
6
6
|
categories: {
|
|
7
7
|
correctness: "error";
|
|
@@ -17,6 +17,7 @@ declare function baseConfig(_options?: Partial<BaseOptions>): {
|
|
|
17
17
|
};
|
|
18
18
|
options: {
|
|
19
19
|
typeAware: true;
|
|
20
|
+
typeCheck: true;
|
|
20
21
|
};
|
|
21
22
|
rules: {
|
|
22
23
|
'eslint/no-var': "warn";
|
|
@@ -43,7 +44,7 @@ declare function baseConfig(_options?: Partial<BaseOptions>): {
|
|
|
43
44
|
'eslint/no-ex-assign': "error";
|
|
44
45
|
'eslint/no-extra-boolean-cast': "error";
|
|
45
46
|
'eslint/no-fallthrough': ["error", {
|
|
46
|
-
allowEmptyCase:
|
|
47
|
+
allowEmptyCase: true;
|
|
47
48
|
}];
|
|
48
49
|
'eslint/no-func-assign': "error";
|
|
49
50
|
'eslint/no-global-assign': "error";
|
|
@@ -91,7 +92,7 @@ declare function baseConfig(_options?: Partial<BaseOptions>): {
|
|
|
91
92
|
'typescript/prefer-as-const': "error";
|
|
92
93
|
'typescript/triple-slash-reference': "error";
|
|
93
94
|
'typescript/explicit-member-accessibility': ["warn", {
|
|
94
|
-
accessibility:
|
|
95
|
+
accessibility: "no-public";
|
|
95
96
|
}];
|
|
96
97
|
'eslint/id-length': "off";
|
|
97
98
|
'eslint/sort-keys': "off";
|
|
@@ -101,34 +102,49 @@ declare function baseConfig(_options?: Partial<BaseOptions>): {
|
|
|
101
102
|
'eslint/max-params': "off";
|
|
102
103
|
'eslint/no-ternary': "off";
|
|
103
104
|
'eslint/curly': "warn";
|
|
104
|
-
'typescript/consistent-type-definitions': ["warn",
|
|
105
|
+
'typescript/consistent-type-definitions': ["warn", "type"];
|
|
105
106
|
'eslint/max-statements': "off";
|
|
106
107
|
'typescript/consistent-return': "off";
|
|
107
108
|
'unicorn/switch-case-braces': "warn";
|
|
108
109
|
'typescript/prefer-regexp-exec': "warn";
|
|
109
110
|
'eslint/init-declarations': "off";
|
|
110
|
-
'unicorn/no-null': "
|
|
111
|
+
'unicorn/no-null': "off";
|
|
111
112
|
'eslint/no-undefined': "off";
|
|
112
113
|
'eslint/no-console': "off";
|
|
113
114
|
'eslint/no-continue': "off";
|
|
114
115
|
'eslint/no-implicit-coercion': ["warn", {
|
|
115
|
-
allow:
|
|
116
|
+
allow: "!!"[];
|
|
116
117
|
}];
|
|
117
118
|
'eslint/no-plusplus': "off";
|
|
118
119
|
'eslint/no-void': "off";
|
|
119
120
|
'eslint/no-nested-ternary': "off";
|
|
120
121
|
'eslint/no-empty-function': ["warn", {
|
|
121
|
-
allow:
|
|
122
|
+
allow: "constructors"[];
|
|
122
123
|
}];
|
|
124
|
+
'unicorn/no-instanceof-builtins': "off";
|
|
125
|
+
'unicorn/prefer-spread': "off";
|
|
126
|
+
'eslint/new-cap': "off";
|
|
127
|
+
'unicorn/no-await-expression-member': "off";
|
|
123
128
|
'eslint/no-duplicate-imports': ["warn", {
|
|
124
|
-
allowSeparateTypeImports:
|
|
129
|
+
allowSeparateTypeImports: true;
|
|
125
130
|
}];
|
|
131
|
+
'import/no-named-export': "off";
|
|
132
|
+
'import/no-default-export': "off";
|
|
133
|
+
'import/prefer-default-export': "off";
|
|
134
|
+
'import/no-namespace': "off";
|
|
135
|
+
'import/exports-last': "off";
|
|
136
|
+
'import/no-unassigned-import': "off";
|
|
137
|
+
'import/group-exports': "off";
|
|
138
|
+
'import/consistent-type-specifier-style': "off";
|
|
126
139
|
'unicorn/no-new-array': "off";
|
|
127
140
|
'eslint/no-array-constructor': "warn";
|
|
128
141
|
'typescript/explicit-function-return-type': "off";
|
|
129
142
|
'typescript/explicit-module-boundary-types': "off";
|
|
130
143
|
'unicorn/no-anonymous-default-export': "off";
|
|
131
144
|
'eslint/sort-imports': "off";
|
|
145
|
+
'import/no-relative-parent-imports': "off";
|
|
146
|
+
'unicorn/max-nested-calls': "off";
|
|
147
|
+
'eslint/one-var': "off";
|
|
132
148
|
'eslint/no-magic-numbers': "off";
|
|
133
149
|
'unicorn/prefer-modern-math-apis': "off";
|
|
134
150
|
'eslint/no-use-before-define': "off";
|
|
@@ -150,7 +166,7 @@ declare function baseConfig(_options?: Partial<BaseOptions>): {
|
|
|
150
166
|
};
|
|
151
167
|
export { type OxlintConfig, defineConfig, baseConfig };
|
|
152
168
|
declare const _default: {
|
|
153
|
-
plugins: ("
|
|
169
|
+
plugins: ("import" | "typescript" | "unicorn")[];
|
|
154
170
|
jsPlugins: never[];
|
|
155
171
|
categories: {
|
|
156
172
|
correctness: "error";
|
|
@@ -166,6 +182,7 @@ declare const _default: {
|
|
|
166
182
|
};
|
|
167
183
|
options: {
|
|
168
184
|
typeAware: true;
|
|
185
|
+
typeCheck: true;
|
|
169
186
|
};
|
|
170
187
|
rules: {
|
|
171
188
|
'eslint/no-var': "warn";
|
|
@@ -192,7 +209,7 @@ declare const _default: {
|
|
|
192
209
|
'eslint/no-ex-assign': "error";
|
|
193
210
|
'eslint/no-extra-boolean-cast': "error";
|
|
194
211
|
'eslint/no-fallthrough': ["error", {
|
|
195
|
-
allowEmptyCase:
|
|
212
|
+
allowEmptyCase: true;
|
|
196
213
|
}];
|
|
197
214
|
'eslint/no-func-assign': "error";
|
|
198
215
|
'eslint/no-global-assign': "error";
|
|
@@ -240,7 +257,7 @@ declare const _default: {
|
|
|
240
257
|
'typescript/prefer-as-const': "error";
|
|
241
258
|
'typescript/triple-slash-reference': "error";
|
|
242
259
|
'typescript/explicit-member-accessibility': ["warn", {
|
|
243
|
-
accessibility:
|
|
260
|
+
accessibility: "no-public";
|
|
244
261
|
}];
|
|
245
262
|
'eslint/id-length': "off";
|
|
246
263
|
'eslint/sort-keys': "off";
|
|
@@ -250,34 +267,49 @@ declare const _default: {
|
|
|
250
267
|
'eslint/max-params': "off";
|
|
251
268
|
'eslint/no-ternary': "off";
|
|
252
269
|
'eslint/curly': "warn";
|
|
253
|
-
'typescript/consistent-type-definitions': ["warn",
|
|
270
|
+
'typescript/consistent-type-definitions': ["warn", "type"];
|
|
254
271
|
'eslint/max-statements': "off";
|
|
255
272
|
'typescript/consistent-return': "off";
|
|
256
273
|
'unicorn/switch-case-braces': "warn";
|
|
257
274
|
'typescript/prefer-regexp-exec': "warn";
|
|
258
275
|
'eslint/init-declarations': "off";
|
|
259
|
-
'unicorn/no-null': "
|
|
276
|
+
'unicorn/no-null': "off";
|
|
260
277
|
'eslint/no-undefined': "off";
|
|
261
278
|
'eslint/no-console': "off";
|
|
262
279
|
'eslint/no-continue': "off";
|
|
263
280
|
'eslint/no-implicit-coercion': ["warn", {
|
|
264
|
-
allow:
|
|
281
|
+
allow: "!!"[];
|
|
265
282
|
}];
|
|
266
283
|
'eslint/no-plusplus': "off";
|
|
267
284
|
'eslint/no-void': "off";
|
|
268
285
|
'eslint/no-nested-ternary': "off";
|
|
269
286
|
'eslint/no-empty-function': ["warn", {
|
|
270
|
-
allow:
|
|
287
|
+
allow: "constructors"[];
|
|
271
288
|
}];
|
|
289
|
+
'unicorn/no-instanceof-builtins': "off";
|
|
290
|
+
'unicorn/prefer-spread': "off";
|
|
291
|
+
'eslint/new-cap': "off";
|
|
292
|
+
'unicorn/no-await-expression-member': "off";
|
|
272
293
|
'eslint/no-duplicate-imports': ["warn", {
|
|
273
|
-
allowSeparateTypeImports:
|
|
294
|
+
allowSeparateTypeImports: true;
|
|
274
295
|
}];
|
|
296
|
+
'import/no-named-export': "off";
|
|
297
|
+
'import/no-default-export': "off";
|
|
298
|
+
'import/prefer-default-export': "off";
|
|
299
|
+
'import/no-namespace': "off";
|
|
300
|
+
'import/exports-last': "off";
|
|
301
|
+
'import/no-unassigned-import': "off";
|
|
302
|
+
'import/group-exports': "off";
|
|
303
|
+
'import/consistent-type-specifier-style': "off";
|
|
275
304
|
'unicorn/no-new-array': "off";
|
|
276
305
|
'eslint/no-array-constructor': "warn";
|
|
277
306
|
'typescript/explicit-function-return-type': "off";
|
|
278
307
|
'typescript/explicit-module-boundary-types': "off";
|
|
279
308
|
'unicorn/no-anonymous-default-export': "off";
|
|
280
309
|
'eslint/sort-imports': "off";
|
|
310
|
+
'import/no-relative-parent-imports': "off";
|
|
311
|
+
'unicorn/max-nested-calls': "off";
|
|
312
|
+
'eslint/one-var': "off";
|
|
281
313
|
'eslint/no-magic-numbers': "off";
|
|
282
314
|
'unicorn/prefer-modern-math-apis': "off";
|
|
283
315
|
'eslint/no-use-before-define': "off";
|
package/dist/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEzD,KAAK,WAAW,GAAG,EAAE,CAAC;AAItB,iBAAS,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEzD,KAAK,WAAW,GAAG,EAAE,CAAC;AAItB,iBAAS,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4LlD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/base.js
CHANGED
|
@@ -3,7 +3,7 @@ import { defineConfig } from 'oxlint';
|
|
|
3
3
|
function baseConfig(_options) {
|
|
4
4
|
// const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
5
5
|
return defineConfig({
|
|
6
|
-
plugins: ['typescript', 'unicorn'],
|
|
6
|
+
plugins: ['import', 'typescript', 'unicorn'],
|
|
7
7
|
jsPlugins: [],
|
|
8
8
|
categories: {
|
|
9
9
|
correctness: 'error',
|
|
@@ -19,6 +19,7 @@ function baseConfig(_options) {
|
|
|
19
19
|
},
|
|
20
20
|
options: {
|
|
21
21
|
typeAware: true,
|
|
22
|
+
typeCheck: true,
|
|
22
23
|
},
|
|
23
24
|
rules: {
|
|
24
25
|
//* ERRORS - base rules that are always mistakes
|
|
@@ -114,7 +115,7 @@ function baseConfig(_options) {
|
|
|
114
115
|
'unicorn/switch-case-braces': 'warn',
|
|
115
116
|
'typescript/prefer-regexp-exec': 'warn',
|
|
116
117
|
'eslint/init-declarations': 'off',
|
|
117
|
-
'unicorn/no-null': '
|
|
118
|
+
'unicorn/no-null': 'off', // too strict, for example JSON.stringify requires null parameter, null is also required in react
|
|
118
119
|
'eslint/no-undefined': 'off', // undefined is necessary
|
|
119
120
|
'eslint/no-console': 'off', // browser is no longer the only environment js is run on
|
|
120
121
|
'eslint/no-continue': 'off', // early-continue is useful
|
|
@@ -123,10 +124,22 @@ function baseConfig(_options) {
|
|
|
123
124
|
'eslint/no-void': 'off', // void is useful for explicitly indicating floating promises
|
|
124
125
|
'eslint/no-nested-ternary': 'off', // ternaries are cleaner and necessary due to lack of match expressions
|
|
125
126
|
'eslint/no-empty-function': ['warn', { allow: ['constructors'] }], // empty constructors are allowed for explicit singleton pattern
|
|
127
|
+
'unicorn/no-instanceof-builtins': 'off', // better typesafety than using `typeof`
|
|
128
|
+
'unicorn/prefer-spread': 'off', // conflicts with other rules
|
|
129
|
+
'eslint/new-cap': 'off', // false positives
|
|
130
|
+
'unicorn/no-await-expression-member': 'off', // accessing await result directly is more desired than slight readability improvement
|
|
126
131
|
'eslint/no-duplicate-imports': [
|
|
127
132
|
'warn',
|
|
128
133
|
{ allowSeparateTypeImports: true },
|
|
129
134
|
],
|
|
135
|
+
'import/no-named-export': 'off',
|
|
136
|
+
'import/no-default-export': 'off',
|
|
137
|
+
'import/prefer-default-export': 'off',
|
|
138
|
+
'import/no-namespace': 'off', // star imports are still pretty necessary
|
|
139
|
+
'import/exports-last': 'off', // star imports are still pretty necessary
|
|
140
|
+
'import/no-unassigned-import': 'off', // required for css imports
|
|
141
|
+
'import/group-exports': 'off', // co-locating export statement with the function it exports is more readable
|
|
142
|
+
'import/consistent-type-specifier-style': 'off', // single import per file is more readable
|
|
130
143
|
// Array.from() is slower than new Array()
|
|
131
144
|
// https://jsperf.app/tatuse
|
|
132
145
|
'unicorn/no-new-array': 'off',
|
|
@@ -137,6 +150,9 @@ function baseConfig(_options) {
|
|
|
137
150
|
// may revisit
|
|
138
151
|
'unicorn/no-anonymous-default-export': 'off',
|
|
139
152
|
'eslint/sort-imports': 'off', // consider when oxfmt is setup
|
|
153
|
+
'import/no-relative-parent-imports': 'off',
|
|
154
|
+
'unicorn/max-nested-calls': 'off',
|
|
155
|
+
'eslint/one-var': 'off', // consider enforcing one separate variable declarations
|
|
140
156
|
// currently produces too many false positives
|
|
141
157
|
'eslint/no-magic-numbers': 'off',
|
|
142
158
|
'unicorn/prefer-modern-math-apis': 'off',
|
package/dist/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AAIzD,2CAA2C;AAE3C,SAAS,UAAU,CAAC,QAA+B;IACjD,mDAAmD;IAEnD,OAAO,YAAY,CAAC;QAClB,OAAO,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AAIzD,2CAA2C;AAE3C,SAAS,UAAU,CAAC,QAA+B;IACjD,mDAAmD;IAEnD,OAAO,YAAY,CAAC;QAClB,OAAO,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,CAAC;QAC5C,SAAS,EA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AAO,EAAgB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEzD,iBAAS,YAAY,CACnB,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,GACpC,YAAY,CAmBd;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineConfig } from 'oxlint';
|
|
2
|
+
function extendConfig(parent, config) {
|
|
3
|
+
return defineConfig({
|
|
4
|
+
...config,
|
|
5
|
+
extends: [parent],
|
|
6
|
+
categories: { ...parent.categories, ...config.categories },
|
|
7
|
+
env: { ...parent.env, ...config.env },
|
|
8
|
+
globals: { ...parent.globals, ...config.globals },
|
|
9
|
+
ignorePatterns: [
|
|
10
|
+
...(parent.ignorePatterns ?? []),
|
|
11
|
+
...(config.ignorePatterns ?? []),
|
|
12
|
+
],
|
|
13
|
+
jsPlugins: [
|
|
14
|
+
...(parent.jsPlugins ?? []),
|
|
15
|
+
...(config.jsPlugins ?? []),
|
|
16
|
+
],
|
|
17
|
+
options: { ...parent.options, ...config.options },
|
|
18
|
+
plugins: config.plugins ?? [],
|
|
19
|
+
settings: { ...parent.settings, ...config.settings },
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export { extendConfig };
|
|
23
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,MAAM,QAAQ,CAAC;AAEzD,SAAS,YAAY,CACnB,MAAoB,EACpB,MAAqC;IAErC,OAAO,YAAY,CAAC;QAClB,GAAG,MAAM;QACT,OAAO,EAAE,CAAC,MAAM,CAAC;QACjB,UAAU,EAAE,EAAE,GAAG,MAAM,CAAC,UAAU,EAAE,GAAG,MAAM,CAAC,UAAU,EAAE;QAC1D,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE;QACrC,OAAO,EAAE,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE;QACjD,cAAc,EAAE;YACd,GAAG,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC;YAChC,GAAG,CAAC,MAAM,CAAC,cAAc,IAAI,EAAE,CAAC;SACjC;QACD,SAAS,EAAE;YACT,GAAG,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;YAC3B,GAAG,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;SAC5B;QACD,OAAO,EAAE,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE;QACjD,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE;QAC7B,QAAQ,EAAE,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE;KACrD,CAAC,CAAC;AACL,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/next.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../src/next.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEzD,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,YAAY,CAAC;AAE5D,KAAK,WAAW,GAAG,YAAY,GAAG;IAChC;;;;;;;OAOG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAIF,iBAAS,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,gBAyEjD;AAED,OAAO,EAAE,KAAK,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/next.js
CHANGED
|
@@ -1,51 +1,63 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import process from 'node:process';
|
|
3
3
|
import { defineConfig } from 'oxlint';
|
|
4
|
+
import { extendConfig } from './config.js';
|
|
4
5
|
import { reactConfig } from './react.js';
|
|
5
|
-
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
6
6
|
const DEFAULT_OPTIONS = { uiPath: 'src/components/ui/' };
|
|
7
7
|
function nextConfig(options) {
|
|
8
8
|
const opts = { ...DEFAULT_OPTIONS, ...options };
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const react = reactConfig(options);
|
|
10
|
+
return extendConfig(react, {
|
|
11
11
|
plugins: ['nextjs'],
|
|
12
12
|
rules: {
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
},
|
|
34
|
-
ignorePatterns: ['.next/**', 'out/**', 'build/**', 'next-env.d.ts'],
|
|
35
|
-
overrides: [
|
|
13
|
+
'nextjs/google-font-display': 'warn',
|
|
14
|
+
'nextjs/google-font-preconnect': 'warn',
|
|
15
|
+
'nextjs/next-script-for-ga': 'warn',
|
|
16
|
+
'nextjs/no-async-client-component': 'warn',
|
|
17
|
+
'nextjs/no-before-interactive-script-outside-document': 'warn',
|
|
18
|
+
'nextjs/no-css-tags': 'warn',
|
|
19
|
+
'nextjs/no-head-element': 'warn',
|
|
20
|
+
'nextjs/no-html-link-for-pages': 'error',
|
|
21
|
+
'nextjs/no-page-custom-font': 'warn',
|
|
22
|
+
'nextjs/no-styled-jsx-in-document': 'warn',
|
|
23
|
+
'nextjs/no-sync-scripts': 'error',
|
|
24
|
+
'nextjs/no-title-in-document-head': 'warn',
|
|
25
|
+
'nextjs/no-typos': 'warn',
|
|
26
|
+
'nextjs/no-unwanted-polyfillio': 'warn',
|
|
27
|
+
'nextjs/inline-script-id': 'error',
|
|
28
|
+
'nextjs/no-assign-module-variable': 'error',
|
|
29
|
+
'nextjs/no-document-import-in-page': 'error',
|
|
30
|
+
'nextjs/no-duplicate-head': 'error',
|
|
31
|
+
'nextjs/no-head-import-in-document': 'error',
|
|
32
|
+
'nextjs/no-script-component-in-head': 'error',
|
|
36
33
|
// ignores warnings for special exports in page and layout files
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
'react/only-export-components': [
|
|
35
|
+
'warn',
|
|
36
|
+
{
|
|
37
|
+
// https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/src/index.ts
|
|
38
|
+
allowExportNames: [
|
|
39
|
+
// removed in next@16.0.0: https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#version-history
|
|
40
|
+
// 'experimental_ppr',
|
|
41
|
+
'dynamic',
|
|
42
|
+
'dynamicParams',
|
|
43
|
+
'revalidate',
|
|
44
|
+
'fetchCache',
|
|
45
|
+
'runtime',
|
|
46
|
+
'preferredRegion',
|
|
47
|
+
'maxDuration',
|
|
48
|
+
'metadata',
|
|
49
|
+
'generateMetadata',
|
|
50
|
+
'viewport',
|
|
51
|
+
'generateViewport',
|
|
52
|
+
'generateImageMetadata',
|
|
53
|
+
'generateSitemaps',
|
|
54
|
+
'generateStaticParams',
|
|
46
55
|
],
|
|
47
56
|
},
|
|
48
|
-
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
ignorePatterns: ['.next/**', 'out/**', 'build/**', 'next-env.d.ts'],
|
|
60
|
+
overrides: [
|
|
49
61
|
opts.uiPath === null
|
|
50
62
|
? { files: [], rules: {} }
|
|
51
63
|
: {
|
|
@@ -53,7 +65,7 @@ function nextConfig(options) {
|
|
|
53
65
|
`${path.resolve(process.cwd(), opts.uiPath)}/**/*.{js,jsx,mjs,ts,tsx,mts,cts}`.replaceAll('//', '/'),
|
|
54
66
|
],
|
|
55
67
|
rules: {
|
|
56
|
-
'react
|
|
68
|
+
'react/only-export-components': 'off',
|
|
57
69
|
},
|
|
58
70
|
},
|
|
59
71
|
],
|