@kasoa/oxlint-config 0.0.6 → 0.0.7

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 CHANGED
@@ -15,7 +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
+ The shared presets are strict by default and designed for TypeScript-first projects.
19
19
 
20
20
  ### React Projects
21
21
 
@@ -0,0 +1,3 @@
1
+ import type { OxlintConfig } from "oxlint";
2
+ export declare const base: OxlintConfig;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,119 @@
1
+ import { defineConfig } from "oxlint";
2
+ export const base = defineConfig({
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
+ },
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 }],
25
+ "default-case-last": "error",
26
+ eqeqeq: "error",
27
+ "getter-return": "error",
28
+ "grouped-accessor-pairs": ["error", "getBeforeSet"],
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",
39
+ "no-unneeded-ternary": "error",
40
+ "no-unreachable": "error",
41
+ "no-useless-return": "error",
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",
51
+ "typescript/ban-ts-comment": ["error", { minimumDescriptionLength: 10 }],
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",
61
+ "typescript/no-floating-promises": "error",
62
+ "typescript/no-misused-promises": "error",
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",
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",
91
+ "typescript/switch-exhaustiveness-check": "error",
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" }],
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
+ ],
119
+ });
@@ -0,0 +1,3 @@
1
+ import type { OxlintConfig } from "oxlint";
2
+ export declare const node: OxlintConfig;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,10 @@
1
+ import { defineConfig } from "oxlint";
2
+ import { base } from "../base/index.js";
3
+ export const node = defineConfig({
4
+ ...base,
5
+ plugins: [...(base.plugins ?? []), "node"],
6
+ rules: {
7
+ ...base.rules,
8
+ "node/no-exports-assign": "error",
9
+ },
10
+ });
@@ -0,0 +1,3 @@
1
+ import type { OxlintConfig } from "oxlint";
2
+ export declare const react: OxlintConfig;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,30 @@
1
+ import { defineConfig } from "oxlint";
2
+ import { base } from "../base/index.js";
3
+ export const react = defineConfig({
4
+ ...base,
5
+ plugins: [...(base.plugins ?? []), "react", "react-perf", "jsx-a11y"],
6
+ rules: {
7
+ ...base.rules,
8
+ "jsx-a11y/alt-text": "error",
9
+ "react/jsx-props-no-spreading": "off",
10
+ "react/exhaustive-deps": "error",
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",
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",
23
+ "react/no-unknown-property": "error",
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",
29
+ },
30
+ });
@@ -1 +1 @@
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"}
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,YAgIjB,CAAC"}
@@ -2,6 +2,7 @@ import { defineConfig } from "oxlint";
2
2
  export const base = defineConfig({
3
3
  plugins: ["typescript", "unicorn", "oxc", "import", "promise", "vitest"],
4
4
  options: {
5
+ reportUnusedDisableDirectives: "error",
5
6
  typeAware: true,
6
7
  },
7
8
  categories: {
@@ -32,9 +33,12 @@ export const base = defineConfig({
32
33
  "max-nested-callbacks": ["error", { max: 3 }],
33
34
  "max-params": ["error", { max: 3 }],
34
35
  "max-statements": ["error", { max: 10 }],
36
+ "no-alert": "error",
37
+ "no-bitwise": "error",
35
38
  "no-console": ["error", { allow: ["info", "warn", "error"] }],
36
39
  "no-duplicate-imports": ["error", { allowSeparateTypeImports: true }],
37
40
  "no-param-reassign": ["error", { props: true }],
41
+ "no-plusplus": "error",
38
42
  "no-undef": "error",
39
43
  "no-unneeded-ternary": "error",
40
44
  "no-unreachable": "error",
@@ -57,10 +61,13 @@ export const base = defineConfig({
57
61
  ],
58
62
  "typescript/dot-notation": "error",
59
63
  "typescript/no-confusing-void-expression": "error",
64
+ "typescript/no-dynamic-delete": "error",
65
+ "typescript/no-empty-object-type": "error",
60
66
  "typescript/no-explicit-any": "error",
61
67
  "typescript/no-floating-promises": "error",
62
68
  "typescript/no-misused-promises": "error",
63
69
  "typescript/no-misused-spread": "error",
70
+ "typescript/no-non-null-assertion": "error",
64
71
  "typescript/no-require-imports": "error",
65
72
  "typescript/no-unnecessary-condition": "error",
66
73
  "typescript/no-unnecessary-qualifier": "error",
@@ -91,6 +98,7 @@ export const base = defineConfig({
91
98
  "typescript/switch-exhaustiveness-check": "error",
92
99
  "typescript/unbound-method": "error",
93
100
  "typescript/use-unknown-in-catch-callback-variable": "error",
101
+ "unicorn/no-abusive-eslint-disable": "error",
94
102
  "unicorn/no-null": "off",
95
103
  "unicorn/filename-case": ["error", { case: "kebabCase" }],
96
104
  },
@@ -1 +1 @@
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"}
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,YAgClB,CAAC"}
@@ -15,9 +15,12 @@ export const react = defineConfig({
15
15
  "react/jsx-no-undef": "error",
16
16
  "react/no-array-index-key": "error",
17
17
  "react/no-children-prop": "error",
18
+ "react/no-clone-element": "error",
19
+ "react/no-danger": "error",
18
20
  "react/no-danger-with-children": "error",
19
21
  "react/no-direct-mutation-state": "error",
20
22
  "react/no-find-dom-node": "error",
23
+ "react/no-react-children": "error",
21
24
  "react/no-string-refs": "error",
22
25
  "react/no-unsafe": "error",
23
26
  "react/no-unknown-property": "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kasoa/oxlint-config",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Kasoa's Oxlint configurations",
5
5
  "keywords": [
6
6
  "kasoa",
@@ -35,11 +35,11 @@
35
35
  "access": "public"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/node": "^25.3.0",
39
- "@typescript/native-preview": "^7.0.0-dev.20260224.1",
40
- "oxfmt": "^0.36.0",
41
- "oxlint": "^1.51.0",
42
- "oxlint-tsgolint": "^0.16.0"
38
+ "@types/node": "^25.5.0",
39
+ "@typescript/native-preview": "^7.0.0-dev.20260319.1",
40
+ "oxfmt": "^0.41.0",
41
+ "oxlint": "^1.56.0",
42
+ "oxlint-tsgolint": "^0.17.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "oxlint": ">=1.51.0 <2",