@kasoa/oxlint-config 0.0.5 → 0.0.6
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/README.md +8 -5
- package/dist/src/base/index.d.ts +2 -43
- package/dist/src/base/index.d.ts.map +1 -1
- package/dist/src/base/index.js +103 -20
- package/dist/src/node/index.d.ts +2 -60
- package/dist/src/node/index.d.ts.map +1 -1
- package/dist/src/node/index.js +1 -17
- package/dist/src/react/index.d.ts +2 -62
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/react/index.js +19 -17
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Kasoa's Oxlint config
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
Install Oxlint,
|
|
7
|
+
Install Oxlint, type-aware linting support, and the config:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
pnpm add -D @kasoa/oxlint-config oxlint oxlint-tsgolint
|
|
@@ -15,6 +15,7 @@ pnpm add -D @kasoa/oxlint-config oxlint oxlint-tsgolint
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
17
|
Import the desired config in your `oxlint.config.ts`. Extend it with project-specific overrides as needed.
|
|
18
|
+
The shared presets enable type-aware linting by default.
|
|
18
19
|
|
|
19
20
|
### React Projects
|
|
20
21
|
|
|
@@ -28,6 +29,8 @@ export { react as default } from "@kasoa/oxlint-config/react";
|
|
|
28
29
|
export { node as default } from "@kasoa/oxlint-config/node";
|
|
29
30
|
```
|
|
30
31
|
|
|
32
|
+
This preset is intended for server-side runtimes such as Node.js, Bun, and Workers-style server code.
|
|
33
|
+
|
|
31
34
|
### Base Config
|
|
32
35
|
|
|
33
36
|
```ts
|
|
@@ -58,7 +61,7 @@ Type-aware linting is expected by default:
|
|
|
58
61
|
```json
|
|
59
62
|
{
|
|
60
63
|
"scripts": {
|
|
61
|
-
"lint": "oxlint --
|
|
64
|
+
"lint": "oxlint --fix .",
|
|
62
65
|
"format": "oxfmt ."
|
|
63
66
|
}
|
|
64
67
|
}
|
|
@@ -66,9 +69,9 @@ Type-aware linting is expected by default:
|
|
|
66
69
|
|
|
67
70
|
## Configurations
|
|
68
71
|
|
|
69
|
-
- **`base`**: Core rules for TypeScript-first code quality.
|
|
70
|
-
- **`node`**: Extends `base` with
|
|
71
|
-
- **`react`**: Extends `base` with React,
|
|
72
|
+
- **`base`**: Core rules for TypeScript-first code quality, promise usage, import graph safety, and Vitest.
|
|
73
|
+
- **`node`**: Extends `base` with server-runtime `node` plugin rules without assuming Node globals by default.
|
|
74
|
+
- **`react`**: Extends `base` with React, React performance, and JSX a11y rules.
|
|
72
75
|
|
|
73
76
|
## Author
|
|
74
77
|
|
package/dist/src/base/index.d.ts
CHANGED
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
ignorePatterns: string[];
|
|
4
|
-
rules: {
|
|
5
|
-
"default-case-last": "error";
|
|
6
|
-
eqeqeq: "error";
|
|
7
|
-
"grouped-accessor-pairs": string[];
|
|
8
|
-
"max-params": "warn";
|
|
9
|
-
"no-alert": "error";
|
|
10
|
-
"no-console": (string | {
|
|
11
|
-
allow: string[];
|
|
12
|
-
})[];
|
|
13
|
-
"no-constructor-return": "error";
|
|
14
|
-
"no-else-return": (string | {
|
|
15
|
-
allowElseIf: boolean;
|
|
16
|
-
})[];
|
|
17
|
-
"no-param-reassign": (string | {
|
|
18
|
-
props: boolean;
|
|
19
|
-
})[];
|
|
20
|
-
"no-unneeded-ternary": "error";
|
|
21
|
-
"no-useless-return": "error";
|
|
22
|
-
"prefer-template": "error";
|
|
23
|
-
"typescript/ban-ts-comment": (string | {
|
|
24
|
-
minimumDescriptionLength: number;
|
|
25
|
-
})[];
|
|
26
|
-
"typescript/consistent-type-imports": "error";
|
|
27
|
-
"typescript/no-explicit-any": "warn";
|
|
28
|
-
"typescript/no-floating-promises": "error";
|
|
29
|
-
"typescript/no-misused-promises": "error";
|
|
30
|
-
"typescript/no-unsafe-assignment": "warn";
|
|
31
|
-
"typescript/no-unsafe-call": "warn";
|
|
32
|
-
"typescript/no-unsafe-member-access": "warn";
|
|
33
|
-
"typescript/no-unsafe-return": "warn";
|
|
34
|
-
"typescript/no-require-imports": "off";
|
|
35
|
-
"typescript/require-array-sort-compare": "error";
|
|
36
|
-
"typescript/switch-exhaustiveness-check": "error";
|
|
37
|
-
"typescript/await-thenable": "error";
|
|
38
|
-
"getter-return": "error";
|
|
39
|
-
"no-undef": "error";
|
|
40
|
-
"no-unreachable": "error";
|
|
41
|
-
"typescript/prefer-optional-chain": "warn";
|
|
42
|
-
};
|
|
43
|
-
};
|
|
1
|
+
import type { OxlintConfig } from "oxlint";
|
|
2
|
+
export declare const base: OxlintConfig;
|
|
44
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAG3C,eAAO,MAAM,IAAI,EAAE,YAwHjB,CAAC"}
|
package/dist/src/base/index.js
CHANGED
|
@@ -1,36 +1,119 @@
|
|
|
1
1
|
import { defineConfig } from "oxlint";
|
|
2
2
|
export const base = defineConfig({
|
|
3
|
-
plugins: ["typescript", "unicorn", "oxc", "import"],
|
|
4
|
-
|
|
3
|
+
plugins: ["typescript", "unicorn", "oxc", "import", "promise", "vitest"],
|
|
4
|
+
options: {
|
|
5
|
+
typeAware: true,
|
|
6
|
+
},
|
|
7
|
+
categories: {
|
|
8
|
+
correctness: "error",
|
|
9
|
+
suspicious: "error",
|
|
10
|
+
pedantic: "error",
|
|
11
|
+
perf: "error",
|
|
12
|
+
style: "error",
|
|
13
|
+
},
|
|
5
14
|
rules: {
|
|
15
|
+
"func-style": "off",
|
|
16
|
+
"id-length": "off",
|
|
17
|
+
"capitalized-comments": "off",
|
|
18
|
+
"init-declarations": "off",
|
|
19
|
+
"no-magic-numbers": "off",
|
|
20
|
+
"no-ternary": "off",
|
|
21
|
+
"sort-imports": "off",
|
|
22
|
+
"sort-keys": "off",
|
|
23
|
+
"vars-on-top": "off",
|
|
24
|
+
complexity: ["error", { max: 10 }],
|
|
6
25
|
"default-case-last": "error",
|
|
7
26
|
eqeqeq: "error",
|
|
27
|
+
"getter-return": "error",
|
|
8
28
|
"grouped-accessor-pairs": ["error", "getBeforeSet"],
|
|
9
|
-
"max-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
29
|
+
"max-classes-per-file": ["error", { max: 1 }],
|
|
30
|
+
"max-depth": ["error", { max: 3 }],
|
|
31
|
+
"max-lines-per-function": ["error", { max: 50, skipBlankLines: true, skipComments: true }],
|
|
32
|
+
"max-nested-callbacks": ["error", { max: 3 }],
|
|
33
|
+
"max-params": ["error", { max: 3 }],
|
|
34
|
+
"max-statements": ["error", { max: 10 }],
|
|
35
|
+
"no-console": ["error", { allow: ["info", "warn", "error"] }],
|
|
36
|
+
"no-duplicate-imports": ["error", { allowSeparateTypeImports: true }],
|
|
37
|
+
"no-param-reassign": ["error", { props: true }],
|
|
38
|
+
"no-undef": "error",
|
|
15
39
|
"no-unneeded-ternary": "error",
|
|
40
|
+
"no-unreachable": "error",
|
|
16
41
|
"no-useless-return": "error",
|
|
17
42
|
"prefer-template": "error",
|
|
43
|
+
"import/exports-last": "off",
|
|
44
|
+
"import/group-exports": "off",
|
|
45
|
+
"import/no-named-export": "off",
|
|
46
|
+
"import/no-namespace": "off",
|
|
47
|
+
"import/no-nodejs-modules": "off",
|
|
48
|
+
"import/prefer-default-export": "off",
|
|
49
|
+
"typescript/consistent-type-definitions": "off",
|
|
50
|
+
"import/no-cycle": "error",
|
|
18
51
|
"typescript/ban-ts-comment": ["error", { minimumDescriptionLength: 10 }],
|
|
19
|
-
"typescript/consistent-
|
|
20
|
-
"typescript/
|
|
52
|
+
"typescript/consistent-return": "error",
|
|
53
|
+
"typescript/consistent-type-exports": "error",
|
|
54
|
+
"typescript/consistent-type-imports": [
|
|
55
|
+
"error",
|
|
56
|
+
{ prefer: "type-imports", fixStyle: "separate-type-imports" },
|
|
57
|
+
],
|
|
58
|
+
"typescript/dot-notation": "error",
|
|
59
|
+
"typescript/no-confusing-void-expression": "error",
|
|
60
|
+
"typescript/no-explicit-any": "error",
|
|
21
61
|
"typescript/no-floating-promises": "error",
|
|
22
62
|
"typescript/no-misused-promises": "error",
|
|
23
|
-
"typescript/no-
|
|
24
|
-
"typescript/no-
|
|
25
|
-
"typescript/no-
|
|
26
|
-
"typescript/no-
|
|
27
|
-
"typescript/no-
|
|
63
|
+
"typescript/no-misused-spread": "error",
|
|
64
|
+
"typescript/no-require-imports": "error",
|
|
65
|
+
"typescript/no-unnecessary-condition": "error",
|
|
66
|
+
"typescript/no-unnecessary-qualifier": "error",
|
|
67
|
+
"typescript/no-unnecessary-type-arguments": "error",
|
|
68
|
+
"typescript/no-unnecessary-type-assertion": "error",
|
|
69
|
+
"typescript/no-unnecessary-type-parameters": "error",
|
|
70
|
+
"typescript/no-unsafe-argument": "error",
|
|
71
|
+
"typescript/no-unsafe-assignment": "error",
|
|
72
|
+
"typescript/no-unsafe-call": "error",
|
|
73
|
+
"typescript/no-unsafe-member-access": "error",
|
|
74
|
+
"typescript/no-unsafe-return": "error",
|
|
75
|
+
"typescript/no-useless-default-assignment": "error",
|
|
76
|
+
"typescript/non-nullable-type-assertion-style": "error",
|
|
77
|
+
"typescript/only-throw-error": "error",
|
|
78
|
+
"typescript/prefer-find": "error",
|
|
79
|
+
"typescript/prefer-nullish-coalescing": "error",
|
|
80
|
+
"typescript/prefer-optional-chain": "error",
|
|
81
|
+
"typescript/prefer-readonly": "error",
|
|
82
|
+
"typescript/prefer-readonly-parameter-types": "error",
|
|
83
|
+
"typescript/prefer-regexp-exec": "error",
|
|
84
|
+
"typescript/promise-function-async": "error",
|
|
28
85
|
"typescript/require-array-sort-compare": "error",
|
|
86
|
+
"typescript/restrict-plus-operands": "error",
|
|
87
|
+
"typescript/restrict-template-expressions": "error",
|
|
88
|
+
"typescript/return-await": "error",
|
|
89
|
+
"typescript/strict-boolean-expressions": "error",
|
|
90
|
+
"typescript/strict-void-return": "error",
|
|
29
91
|
"typescript/switch-exhaustiveness-check": "error",
|
|
30
|
-
"typescript/
|
|
31
|
-
"
|
|
32
|
-
"no-
|
|
33
|
-
"
|
|
34
|
-
"typescript/prefer-optional-chain": "warn",
|
|
92
|
+
"typescript/unbound-method": "error",
|
|
93
|
+
"typescript/use-unknown-in-catch-callback-variable": "error",
|
|
94
|
+
"unicorn/no-null": "off",
|
|
95
|
+
"unicorn/filename-case": ["error", { case: "kebabCase" }],
|
|
35
96
|
},
|
|
97
|
+
overrides: [
|
|
98
|
+
{
|
|
99
|
+
files: ["**/*.{cjs,cts}"],
|
|
100
|
+
env: {
|
|
101
|
+
node: true,
|
|
102
|
+
},
|
|
103
|
+
rules: {
|
|
104
|
+
"typescript/no-require-imports": "off",
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
files: ["**/tests/**", "**/__tests__/**", "**/*.{test,spec}.{js,jsx,ts,tsx,mjs,cjs,mts,cts}"],
|
|
109
|
+
env: {
|
|
110
|
+
vitest: true,
|
|
111
|
+
},
|
|
112
|
+
rules: {
|
|
113
|
+
"max-lines-per-function": ["error", { max: 75, skipBlankLines: true, skipComments: true }],
|
|
114
|
+
"vitest/no-importing-vitest-globals": "off",
|
|
115
|
+
"vitest/max-nested-describe": ["error", { max: 3 }],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
],
|
|
36
119
|
});
|
package/dist/src/node/index.d.ts
CHANGED
|
@@ -1,61 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
plugins: ("import" | "node" | "oxc" | "typescript" | "unicorn" | "vitest")[];
|
|
4
|
-
env: {
|
|
5
|
-
node: true;
|
|
6
|
-
vitest: true;
|
|
7
|
-
};
|
|
8
|
-
rules: {
|
|
9
|
-
"default-case-last": "error";
|
|
10
|
-
eqeqeq: "error";
|
|
11
|
-
"grouped-accessor-pairs": string[];
|
|
12
|
-
"max-params": "warn";
|
|
13
|
-
"no-alert": "error";
|
|
14
|
-
"no-console": (string | {
|
|
15
|
-
allow: string[];
|
|
16
|
-
})[];
|
|
17
|
-
"no-constructor-return": "error";
|
|
18
|
-
"no-else-return": (string | {
|
|
19
|
-
allowElseIf: boolean;
|
|
20
|
-
})[];
|
|
21
|
-
"no-param-reassign": (string | {
|
|
22
|
-
props: boolean;
|
|
23
|
-
})[];
|
|
24
|
-
"no-unneeded-ternary": "error";
|
|
25
|
-
"no-useless-return": "error";
|
|
26
|
-
"prefer-template": "error";
|
|
27
|
-
"typescript/ban-ts-comment": (string | {
|
|
28
|
-
minimumDescriptionLength: number;
|
|
29
|
-
})[];
|
|
30
|
-
"typescript/consistent-type-imports": "error";
|
|
31
|
-
"typescript/no-explicit-any": "warn";
|
|
32
|
-
"typescript/no-floating-promises": "error";
|
|
33
|
-
"typescript/no-misused-promises": "error";
|
|
34
|
-
"typescript/no-unsafe-assignment": "warn";
|
|
35
|
-
"typescript/no-unsafe-call": "warn";
|
|
36
|
-
"typescript/no-unsafe-member-access": "warn";
|
|
37
|
-
"typescript/no-unsafe-return": "warn";
|
|
38
|
-
"typescript/no-require-imports": "off";
|
|
39
|
-
"typescript/require-array-sort-compare": "error";
|
|
40
|
-
"typescript/switch-exhaustiveness-check": "error";
|
|
41
|
-
"typescript/await-thenable": "error";
|
|
42
|
-
"getter-return": "error";
|
|
43
|
-
"no-undef": "error";
|
|
44
|
-
"no-unreachable": "error";
|
|
45
|
-
"typescript/prefer-optional-chain": "warn";
|
|
46
|
-
"import/no-cycle": "error";
|
|
47
|
-
"node/no-exports-assign": "error";
|
|
48
|
-
"vitest/no-focused-tests": "error";
|
|
49
|
-
"vitest/no-disabled-tests": "error";
|
|
50
|
-
"vitest/no-standalone-expect": "error";
|
|
51
|
-
};
|
|
52
|
-
overrides: {
|
|
53
|
-
files: string[];
|
|
54
|
-
rules: {
|
|
55
|
-
"vitest/max-nested-describe": (string | {
|
|
56
|
-
max: number;
|
|
57
|
-
})[];
|
|
58
|
-
};
|
|
59
|
-
}[];
|
|
60
|
-
};
|
|
1
|
+
import type { OxlintConfig } from "oxlint";
|
|
2
|
+
export declare const node: OxlintConfig;
|
|
61
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAI3C,eAAO,MAAM,IAAI,EAAE,YAOjB,CAAC"}
|
package/dist/src/node/index.js
CHANGED
|
@@ -2,25 +2,9 @@ import { defineConfig } from "oxlint";
|
|
|
2
2
|
import { base } from "../base/index.js";
|
|
3
3
|
export const node = defineConfig({
|
|
4
4
|
...base,
|
|
5
|
-
plugins: [...base.plugins, "node"
|
|
6
|
-
env: {
|
|
7
|
-
node: true,
|
|
8
|
-
vitest: true,
|
|
9
|
-
},
|
|
5
|
+
plugins: [...(base.plugins ?? []), "node"],
|
|
10
6
|
rules: {
|
|
11
7
|
...base.rules,
|
|
12
|
-
"import/no-cycle": "error",
|
|
13
8
|
"node/no-exports-assign": "error",
|
|
14
|
-
"vitest/no-focused-tests": "error",
|
|
15
|
-
"vitest/no-disabled-tests": "error",
|
|
16
|
-
"vitest/no-standalone-expect": "error",
|
|
17
9
|
},
|
|
18
|
-
overrides: [
|
|
19
|
-
{
|
|
20
|
-
files: ["**/tests/**", "**/*.test.{ts,tsx}", "**/*.spec.{ts,tsx}"],
|
|
21
|
-
rules: {
|
|
22
|
-
"vitest/max-nested-describe": ["warn", { max: 3 }],
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
10
|
});
|
|
@@ -1,63 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
plugins: ("import" | "jsx-a11y" | "oxc" | "react" | "typescript" | "unicorn" | "vitest")[];
|
|
4
|
-
env: {
|
|
5
|
-
vitest: true;
|
|
6
|
-
};
|
|
7
|
-
rules: {
|
|
8
|
-
"default-case-last": "error";
|
|
9
|
-
eqeqeq: "error";
|
|
10
|
-
"grouped-accessor-pairs": string[];
|
|
11
|
-
"max-params": "warn";
|
|
12
|
-
"no-alert": "error";
|
|
13
|
-
"no-console": (string | {
|
|
14
|
-
allow: string[];
|
|
15
|
-
})[];
|
|
16
|
-
"no-constructor-return": "error";
|
|
17
|
-
"no-else-return": (string | {
|
|
18
|
-
allowElseIf: boolean;
|
|
19
|
-
})[];
|
|
20
|
-
"no-param-reassign": (string | {
|
|
21
|
-
props: boolean;
|
|
22
|
-
})[];
|
|
23
|
-
"no-unneeded-ternary": "error";
|
|
24
|
-
"no-useless-return": "error";
|
|
25
|
-
"prefer-template": "error";
|
|
26
|
-
"typescript/ban-ts-comment": (string | {
|
|
27
|
-
minimumDescriptionLength: number;
|
|
28
|
-
})[];
|
|
29
|
-
"typescript/consistent-type-imports": "error";
|
|
30
|
-
"typescript/no-explicit-any": "warn";
|
|
31
|
-
"typescript/no-floating-promises": "error";
|
|
32
|
-
"typescript/no-misused-promises": "error";
|
|
33
|
-
"typescript/no-unsafe-assignment": "warn";
|
|
34
|
-
"typescript/no-unsafe-call": "warn";
|
|
35
|
-
"typescript/no-unsafe-member-access": "warn";
|
|
36
|
-
"typescript/no-unsafe-return": "warn";
|
|
37
|
-
"typescript/no-require-imports": "off";
|
|
38
|
-
"typescript/require-array-sort-compare": "error";
|
|
39
|
-
"typescript/switch-exhaustiveness-check": "error";
|
|
40
|
-
"typescript/await-thenable": "error";
|
|
41
|
-
"getter-return": "error";
|
|
42
|
-
"no-undef": "error";
|
|
43
|
-
"no-unreachable": "error";
|
|
44
|
-
"typescript/prefer-optional-chain": "warn";
|
|
45
|
-
"import/no-cycle": "error";
|
|
46
|
-
"react/jsx-key": "error";
|
|
47
|
-
"react/no-direct-mutation-state": "error";
|
|
48
|
-
"react/no-unknown-property": "error";
|
|
49
|
-
"jsx-a11y/alt-text": "error";
|
|
50
|
-
"vitest/no-focused-tests": "error";
|
|
51
|
-
"vitest/no-disabled-tests": "error";
|
|
52
|
-
"vitest/no-standalone-expect": "error";
|
|
53
|
-
};
|
|
54
|
-
overrides: {
|
|
55
|
-
files: string[];
|
|
56
|
-
rules: {
|
|
57
|
-
"vitest/max-nested-describe": (string | {
|
|
58
|
-
max: number;
|
|
59
|
-
})[];
|
|
60
|
-
};
|
|
61
|
-
}[];
|
|
62
|
-
};
|
|
1
|
+
import type { OxlintConfig } from "oxlint";
|
|
2
|
+
export declare const react: OxlintConfig;
|
|
63
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAI3C,eAAO,MAAM,KAAK,EAAE,YA6BlB,CAAC"}
|
package/dist/src/react/index.js
CHANGED
|
@@ -2,27 +2,29 @@ import { defineConfig } from "oxlint";
|
|
|
2
2
|
import { base } from "../base/index.js";
|
|
3
3
|
export const react = defineConfig({
|
|
4
4
|
...base,
|
|
5
|
-
plugins: [...base.plugins, "react", "
|
|
6
|
-
env: {
|
|
7
|
-
vitest: true,
|
|
8
|
-
},
|
|
5
|
+
plugins: [...(base.plugins ?? []), "react", "react-perf", "jsx-a11y"],
|
|
9
6
|
rules: {
|
|
10
7
|
...base.rules,
|
|
11
|
-
"
|
|
8
|
+
"jsx-a11y/alt-text": "error",
|
|
9
|
+
"react/jsx-props-no-spreading": "off",
|
|
10
|
+
"react/exhaustive-deps": "error",
|
|
12
11
|
"react/jsx-key": "error",
|
|
12
|
+
"react/jsx-max-depth": ["error", { max: 4 }],
|
|
13
|
+
"react/jsx-no-constructed-context-values": "error",
|
|
14
|
+
"react/jsx-no-duplicate-props": "error",
|
|
15
|
+
"react/jsx-no-undef": "error",
|
|
16
|
+
"react/no-array-index-key": "error",
|
|
17
|
+
"react/no-children-prop": "error",
|
|
18
|
+
"react/no-danger-with-children": "error",
|
|
13
19
|
"react/no-direct-mutation-state": "error",
|
|
20
|
+
"react/no-find-dom-node": "error",
|
|
21
|
+
"react/no-string-refs": "error",
|
|
22
|
+
"react/no-unsafe": "error",
|
|
14
23
|
"react/no-unknown-property": "error",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
24
|
+
"react/void-dom-elements-no-children": "error",
|
|
25
|
+
"react-perf/jsx-no-jsx-as-prop": "error",
|
|
26
|
+
"react-perf/jsx-no-new-array-as-prop": "error",
|
|
27
|
+
"react-perf/jsx-no-new-function-as-prop": "error",
|
|
28
|
+
"react-perf/jsx-no-new-object-as-prop": "error",
|
|
19
29
|
},
|
|
20
|
-
overrides: [
|
|
21
|
-
{
|
|
22
|
-
files: ["**/tests/**", "**/*.test.{ts,tsx}", "**/*.spec.{ts,tsx}"],
|
|
23
|
-
rules: {
|
|
24
|
-
"vitest/max-nested-describe": ["warn", { max: 3 }],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
30
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kasoa/oxlint-config",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Kasoa's Oxlint configurations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kasoa",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^25.3.0",
|
|
39
39
|
"@typescript/native-preview": "^7.0.0-dev.20260224.1",
|
|
40
|
-
"oxfmt": "^0.
|
|
41
|
-
"oxlint": "^1.
|
|
42
|
-
"oxlint-tsgolint": "^0.
|
|
40
|
+
"oxfmt": "^0.36.0",
|
|
41
|
+
"oxlint": "^1.51.0",
|
|
42
|
+
"oxlint-tsgolint": "^0.16.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"oxlint": ">=1.
|
|
46
|
-
"oxlint-tsgolint": ">=0.
|
|
45
|
+
"oxlint": ">=1.51.0 <2",
|
|
46
|
+
"oxlint-tsgolint": ">=0.16.0 <1"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"node": ">=24"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"scripts": {
|
|
52
52
|
"dev": "tsgo --watch",
|
|
53
53
|
"build": "tsgo",
|
|
54
|
-
"lint": "oxlint --
|
|
54
|
+
"lint": "oxlint --fix .",
|
|
55
55
|
"format": "oxfmt .",
|
|
56
56
|
"typecheck": "tsgo --noEmit",
|
|
57
57
|
"test": "echo 'No tests'"
|