oxlint-config-awesomeness 3.0.0 → 3.0.2
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/bin/init.js +2 -4
- package/index.js +7 -0
- package/package.json +6 -6
package/bin/init.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { copyFileSync, existsSync } from "node:fs";
|
|
3
|
-
import {
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { resolve } from "node:path";
|
|
5
4
|
import { parseArgs } from "node:util";
|
|
6
5
|
|
|
7
6
|
const HELP = `Usage: npx oxlint-config-awesomeness init [--force]
|
|
@@ -40,6 +39,5 @@ if (existsSync(target) && !values.force) {
|
|
|
40
39
|
process.exit(1);
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
copyFileSync(resolve(here, "template.ts"), target);
|
|
42
|
+
copyFileSync(resolve(import.meta.dirname, "template.ts"), target);
|
|
45
43
|
process.stdout.write(`Created ${target}\nNext: npx oxlint\n`);
|
package/index.js
CHANGED
|
@@ -205,6 +205,8 @@ export default defineConfig({
|
|
|
205
205
|
"error",
|
|
206
206
|
{ allowSeparateTypeImports: true },
|
|
207
207
|
],
|
|
208
|
+
// Require the `v` flag on regex literals — opts into Unicode-aware matching with set notation.
|
|
209
|
+
"eslint/require-unicode-regexp": ["error", { requireFlag: "v" }],
|
|
208
210
|
// Block `@nocommit` markers from reaching main — a hard stop for WIP code.
|
|
209
211
|
"no-warning-comments": ["error", { terms: ["@nocommit"] }],
|
|
210
212
|
|
|
@@ -347,6 +349,11 @@ export default defineConfig({
|
|
|
347
349
|
|
|
348
350
|
// Disabled — incompatible with React 17+ JSX transform and common composition patterns
|
|
349
351
|
|
|
352
|
+
// Three-way deadlock: `[v, setV]` trips `no-unused-vars` if setter unused;
|
|
353
|
+
// `[v, _setV]` trips this rule's strict `[thing, setThing]` naming;
|
|
354
|
+
// `[v]` trips this rule's "must destructure both" requirement.
|
|
355
|
+
// TypeScript already catches setter-name typos via type errors, so the value is low.
|
|
356
|
+
"react/hook-use-state": "off",
|
|
350
357
|
// JSX depth is constrained by composition, not by a magic number.
|
|
351
358
|
"react/jsx-max-depth": "off",
|
|
352
359
|
// React Compiler (`react-hooks-js`) handles memoization — no need to pre-extract context values.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint-config-awesomeness",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Oxlint config with sensible defaults.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"autofix",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"lint": "oxlint ."
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"eslint-plugin-no-only-tests": "^3.
|
|
29
|
-
"eslint-plugin-perfectionist": "^5.
|
|
30
|
-
"eslint-plugin-react-hooks": "^7.
|
|
28
|
+
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
29
|
+
"eslint-plugin-perfectionist": "^5.9.0",
|
|
30
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
31
31
|
"eslint-plugin-unused-imports": "~4.4.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"oxlint": "^1.
|
|
34
|
+
"oxlint": "^1.63.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"oxlint": ">=1.
|
|
37
|
+
"oxlint": ">=1.63.0 <2.0.0"
|
|
38
38
|
},
|
|
39
39
|
"packageManager": "pnpm@10.24.0"
|
|
40
40
|
}
|