@apst/oxlint 0.0.0-dev.20260522.d3790b2c → 0.1.0
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 +41 -0
- package/dist/presets/common/index.d.ts +3 -2
- package/dist/presets/common/index.js +3 -0
- package/dist/presets/common/index.mjs +3 -2
- package/dist/presets/common/plugin/index.d.ts +2 -1
- package/dist/presets/common/plugin/index.js +2 -0
- package/dist/presets/common/plugin/index.js.map +1 -1
- package/dist/presets/common/plugin/index.mjs +2 -1
- package/dist/presets/common/plugin/index.mjs.map +1 -1
- package/dist/presets/common/preset/index.js +4 -1
- package/dist/presets/common/preset/index.js.map +1 -1
- package/dist/presets/common/preset/index.mjs +5 -2
- package/dist/presets/common/preset/index.mjs.map +1 -1
- package/dist/presets/common/rules/stylistic.d.ts +18 -0
- package/dist/presets/common/rules/stylistic.js +16 -0
- package/dist/presets/common/rules/stylistic.js.map +1 -0
- package/dist/presets/common/rules/stylistic.mjs +15 -0
- package/dist/presets/common/rules/stylistic.mjs.map +1 -0
- package/dist/presets/common/rules/typescript.d.ts +2 -2
- package/dist/presets/common/rules/typescript.js +1 -1
- package/dist/presets/common/rules/typescript.js.map +1 -1
- package/dist/presets/common/rules/typescript.mjs +1 -1
- package/dist/presets/common/rules/typescript.mjs.map +1 -1
- package/dist/presets/common/rules/unicorn.d.ts +2 -8
- package/dist/presets/common/rules/unicorn.js +1 -4
- package/dist/presets/common/rules/unicorn.js.map +1 -1
- package/dist/presets/common/rules/unicorn.mjs +1 -4
- package/dist/presets/common/rules/unicorn.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Oxlint Configuration
|
|
2
|
+
|
|
3
|
+
A shareable Oxlint configuration.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Implement the preset into `oxlint.config.ts`:
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { defineConfig } from "@apst/oxlint";
|
|
11
|
+
import { commonPreset } from "@apst/oxlint/presets/common";
|
|
12
|
+
import { reactPreset } from "@apst/oxlint/presets/react";
|
|
13
|
+
|
|
14
|
+
export default defineConfig([
|
|
15
|
+
commonPreset(),
|
|
16
|
+
reactPreset(),
|
|
17
|
+
]);
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
It is possible to override the default configuration by passing an object to the `defineConfig` function:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { defineConfig } from "@apst/oxlint";
|
|
24
|
+
import { IGNORE_PATTERNS_DEFAULT } from "@apst/oxlint/constants/ignore-patterns";
|
|
25
|
+
import { commonPreset } from "@apst/oxlint/presets/common";
|
|
26
|
+
import { reactPreset } from "@apst/oxlint/presets/react";
|
|
27
|
+
|
|
28
|
+
export default defineConfig({
|
|
29
|
+
ignorePatterns: [
|
|
30
|
+
...IGNORE_PATTERNS_DEFAULT,
|
|
31
|
+
// ...
|
|
32
|
+
],
|
|
33
|
+
}, [
|
|
34
|
+
commonPreset(),
|
|
35
|
+
reactPreset(),
|
|
36
|
+
]);
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
This project is licensed under the terms of the MIT license.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { PLUGIN_COMMON } from "./plugin/index.js";
|
|
1
|
+
import { PLUGIN_COMMON, PLUGIN_JS_COMMON } from "./plugin/index.js";
|
|
2
2
|
import { commonPreset } from "./preset/index.js";
|
|
3
3
|
import { RULES_ESLINT, RULES_ESLINT_NURSERY, RULES_ESLINT_PEDANTIC, RULES_ESLINT_PERF, RULES_ESLINT_RESTRICTION, RULES_ESLINT_STYLE, RULES_ESLINT_SUSPICIOUS } from "./rules/eslint.js";
|
|
4
4
|
import { RULES_IMPORT, RULES_IMPORT_CORRECTNESS, RULES_IMPORT_NURSERY, RULES_IMPORT_RESTRICTION, RULES_IMPORT_STYLE, RULES_IMPORT_SUSPICIOUS } from "./rules/import.js";
|
|
5
5
|
import { RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION } from "./rules/oxc.js";
|
|
6
6
|
import { RULES_PROMISE, RULES_PROMISE_CORRECTNESS, RULES_PROMISE_NURSERY, RULES_PROMISE_RESTRICTION, RULES_PROMISE_STYLE, RULES_PROMISE_SUSPICIOUS } from "./rules/promise.js";
|
|
7
|
+
import { RULES_STYLISTIC } from "./rules/stylistic.js";
|
|
7
8
|
import { RULES_TYPESCRIPT, RULES_TYPESCRIPT_NURSERY, RULES_TYPESCRIPT_PEDANTIC, RULES_TYPESCRIPT_RESTRICTION, RULES_TYPESCRIPT_STYLE, RULES_TYPESCRIPT_SUSPICIOUS } from "./rules/typescript.js";
|
|
8
9
|
import { RULES_UNICORN, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS } from "./rules/unicorn.js";
|
|
9
|
-
export { PLUGIN_COMMON, RULES_ESLINT, RULES_ESLINT_NURSERY, RULES_ESLINT_PEDANTIC, RULES_ESLINT_PERF, RULES_ESLINT_RESTRICTION, RULES_ESLINT_STYLE, RULES_ESLINT_SUSPICIOUS, RULES_IMPORT, RULES_IMPORT_CORRECTNESS, RULES_IMPORT_NURSERY, RULES_IMPORT_RESTRICTION, RULES_IMPORT_STYLE, RULES_IMPORT_SUSPICIOUS, RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION, RULES_PROMISE, RULES_PROMISE_CORRECTNESS, RULES_PROMISE_NURSERY, RULES_PROMISE_RESTRICTION, RULES_PROMISE_STYLE, RULES_PROMISE_SUSPICIOUS, RULES_TYPESCRIPT, RULES_TYPESCRIPT_NURSERY, RULES_TYPESCRIPT_PEDANTIC, RULES_TYPESCRIPT_RESTRICTION, RULES_TYPESCRIPT_STYLE, RULES_TYPESCRIPT_SUSPICIOUS, RULES_UNICORN, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS, commonPreset };
|
|
10
|
+
export { PLUGIN_COMMON, PLUGIN_JS_COMMON, RULES_ESLINT, RULES_ESLINT_NURSERY, RULES_ESLINT_PEDANTIC, RULES_ESLINT_PERF, RULES_ESLINT_RESTRICTION, RULES_ESLINT_STYLE, RULES_ESLINT_SUSPICIOUS, RULES_IMPORT, RULES_IMPORT_CORRECTNESS, RULES_IMPORT_NURSERY, RULES_IMPORT_RESTRICTION, RULES_IMPORT_STYLE, RULES_IMPORT_SUSPICIOUS, RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION, RULES_PROMISE, RULES_PROMISE_CORRECTNESS, RULES_PROMISE_NURSERY, RULES_PROMISE_RESTRICTION, RULES_PROMISE_STYLE, RULES_PROMISE_SUSPICIOUS, RULES_STYLISTIC, RULES_TYPESCRIPT, RULES_TYPESCRIPT_NURSERY, RULES_TYPESCRIPT_PEDANTIC, RULES_TYPESCRIPT_RESTRICTION, RULES_TYPESCRIPT_STYLE, RULES_TYPESCRIPT_SUSPICIOUS, RULES_UNICORN, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS, commonPreset };
|
|
@@ -4,11 +4,13 @@ const require_eslint = require('./rules/eslint.js');
|
|
|
4
4
|
const require_import = require('./rules/import.js');
|
|
5
5
|
const require_oxc = require('./rules/oxc.js');
|
|
6
6
|
const require_promise = require('./rules/promise.js');
|
|
7
|
+
const require_stylistic = require('./rules/stylistic.js');
|
|
7
8
|
const require_typescript = require('./rules/typescript.js');
|
|
8
9
|
const require_unicorn = require('./rules/unicorn.js');
|
|
9
10
|
const require_index$1 = require('./preset/index.js');
|
|
10
11
|
|
|
11
12
|
exports.PLUGIN_COMMON = require_index.PLUGIN_COMMON;
|
|
13
|
+
exports.PLUGIN_JS_COMMON = require_index.PLUGIN_JS_COMMON;
|
|
12
14
|
exports.RULES_ESLINT = require_eslint.RULES_ESLINT;
|
|
13
15
|
exports.RULES_ESLINT_NURSERY = require_eslint.RULES_ESLINT_NURSERY;
|
|
14
16
|
exports.RULES_ESLINT_PEDANTIC = require_eslint.RULES_ESLINT_PEDANTIC;
|
|
@@ -31,6 +33,7 @@ exports.RULES_PROMISE_NURSERY = require_promise.RULES_PROMISE_NURSERY;
|
|
|
31
33
|
exports.RULES_PROMISE_RESTRICTION = require_promise.RULES_PROMISE_RESTRICTION;
|
|
32
34
|
exports.RULES_PROMISE_STYLE = require_promise.RULES_PROMISE_STYLE;
|
|
33
35
|
exports.RULES_PROMISE_SUSPICIOUS = require_promise.RULES_PROMISE_SUSPICIOUS;
|
|
36
|
+
exports.RULES_STYLISTIC = require_stylistic.RULES_STYLISTIC;
|
|
34
37
|
exports.RULES_TYPESCRIPT = require_typescript.RULES_TYPESCRIPT;
|
|
35
38
|
exports.RULES_TYPESCRIPT_NURSERY = require_typescript.RULES_TYPESCRIPT_NURSERY;
|
|
36
39
|
exports.RULES_TYPESCRIPT_PEDANTIC = require_typescript.RULES_TYPESCRIPT_PEDANTIC;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { PLUGIN_COMMON } from "./plugin/index.mjs";
|
|
1
|
+
import { PLUGIN_COMMON, PLUGIN_JS_COMMON } from "./plugin/index.mjs";
|
|
2
2
|
import { RULES_ESLINT, RULES_ESLINT_NURSERY, RULES_ESLINT_PEDANTIC, RULES_ESLINT_PERF, RULES_ESLINT_RESTRICTION, RULES_ESLINT_STYLE, RULES_ESLINT_SUSPICIOUS } from "./rules/eslint.mjs";
|
|
3
3
|
import { RULES_IMPORT, RULES_IMPORT_CORRECTNESS, RULES_IMPORT_NURSERY, RULES_IMPORT_RESTRICTION, RULES_IMPORT_STYLE, RULES_IMPORT_SUSPICIOUS } from "./rules/import.mjs";
|
|
4
4
|
import { RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION } from "./rules/oxc.mjs";
|
|
5
5
|
import { RULES_PROMISE, RULES_PROMISE_CORRECTNESS, RULES_PROMISE_NURSERY, RULES_PROMISE_RESTRICTION, RULES_PROMISE_STYLE, RULES_PROMISE_SUSPICIOUS } from "./rules/promise.mjs";
|
|
6
|
+
import { RULES_STYLISTIC } from "./rules/stylistic.mjs";
|
|
6
7
|
import { RULES_TYPESCRIPT, RULES_TYPESCRIPT_NURSERY, RULES_TYPESCRIPT_PEDANTIC, RULES_TYPESCRIPT_RESTRICTION, RULES_TYPESCRIPT_STYLE, RULES_TYPESCRIPT_SUSPICIOUS } from "./rules/typescript.mjs";
|
|
7
8
|
import { RULES_UNICORN, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS } from "./rules/unicorn.mjs";
|
|
8
9
|
import { commonPreset } from "./preset/index.mjs";
|
|
9
10
|
|
|
10
|
-
export { PLUGIN_COMMON, RULES_ESLINT, RULES_ESLINT_NURSERY, RULES_ESLINT_PEDANTIC, RULES_ESLINT_PERF, RULES_ESLINT_RESTRICTION, RULES_ESLINT_STYLE, RULES_ESLINT_SUSPICIOUS, RULES_IMPORT, RULES_IMPORT_CORRECTNESS, RULES_IMPORT_NURSERY, RULES_IMPORT_RESTRICTION, RULES_IMPORT_STYLE, RULES_IMPORT_SUSPICIOUS, RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION, RULES_PROMISE, RULES_PROMISE_CORRECTNESS, RULES_PROMISE_NURSERY, RULES_PROMISE_RESTRICTION, RULES_PROMISE_STYLE, RULES_PROMISE_SUSPICIOUS, RULES_TYPESCRIPT, RULES_TYPESCRIPT_NURSERY, RULES_TYPESCRIPT_PEDANTIC, RULES_TYPESCRIPT_RESTRICTION, RULES_TYPESCRIPT_STYLE, RULES_TYPESCRIPT_SUSPICIOUS, RULES_UNICORN, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS, commonPreset };
|
|
11
|
+
export { PLUGIN_COMMON, PLUGIN_JS_COMMON, RULES_ESLINT, RULES_ESLINT_NURSERY, RULES_ESLINT_PEDANTIC, RULES_ESLINT_PERF, RULES_ESLINT_RESTRICTION, RULES_ESLINT_STYLE, RULES_ESLINT_SUSPICIOUS, RULES_IMPORT, RULES_IMPORT_CORRECTNESS, RULES_IMPORT_NURSERY, RULES_IMPORT_RESTRICTION, RULES_IMPORT_STYLE, RULES_IMPORT_SUSPICIOUS, RULES_OXC, RULES_OXC_NURSERY, RULES_OXC_RESTRICTION, RULES_PROMISE, RULES_PROMISE_CORRECTNESS, RULES_PROMISE_NURSERY, RULES_PROMISE_RESTRICTION, RULES_PROMISE_STYLE, RULES_PROMISE_SUSPICIOUS, RULES_STYLISTIC, RULES_TYPESCRIPT, RULES_TYPESCRIPT_NURSERY, RULES_TYPESCRIPT_PEDANTIC, RULES_TYPESCRIPT_RESTRICTION, RULES_TYPESCRIPT_STYLE, RULES_TYPESCRIPT_SUSPICIOUS, RULES_UNICORN, RULES_UNICORN_PEDANTIC, RULES_UNICORN_RESTRICTION, RULES_UNICORN_STYLE, RULES_UNICORN_SUSPICIOUS, commonPreset };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
declare const PLUGIN_COMMON: ["eslint", "typescript", "unicorn", "oxc", "import", "promise"];
|
|
2
|
-
|
|
2
|
+
declare const PLUGIN_JS_COMMON: readonly ["@stylistic/eslint-plugin"];
|
|
3
|
+
export { PLUGIN_COMMON, PLUGIN_JS_COMMON };
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/presets/common/plugin/index.ts"],"sourcesContent":["import type { LintPlugins } from \"#/@types/oxlint\";\n\nconst PLUGIN_COMMON = [\n \"eslint\",\n \"typescript\",\n \"unicorn\",\n \"oxc\",\n \"import\",\n \"promise\",\n] as const satisfies LintPlugins;\n\nexport { PLUGIN_COMMON };\n"],"mappings":";AAEA,MAAM,gBAAgB;CAClB;CACA;CACA;CACA;CACA;CACA;AACJ"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/presets/common/plugin/index.ts"],"sourcesContent":["import type { LintPlugins } from \"#/@types/oxlint\";\n\nconst PLUGIN_COMMON = [\n \"eslint\",\n \"typescript\",\n \"unicorn\",\n \"oxc\",\n \"import\",\n \"promise\",\n] as const satisfies LintPlugins;\n\nconst PLUGIN_JS_COMMON = [\n \"@stylistic/eslint-plugin\",\n] as const;\n\nexport { PLUGIN_COMMON, PLUGIN_JS_COMMON };\n"],"mappings":";AAEA,MAAM,gBAAgB;CAClB;CACA;CACA;CACA;CACA;CACA;AACJ;AAEA,MAAM,mBAAmB,CACrB,0BACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/common/plugin/index.ts"],"sourcesContent":["import type { LintPlugins } from \"#/@types/oxlint\";\n\nconst PLUGIN_COMMON = [\n \"eslint\",\n \"typescript\",\n \"unicorn\",\n \"oxc\",\n \"import\",\n \"promise\",\n] as const satisfies LintPlugins;\n\nexport { PLUGIN_COMMON };\n"],"mappings":"AAEA,MAAM,gBAAgB;CAClB;CACA;CACA;CACA;CACA;CACA;AACJ"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/common/plugin/index.ts"],"sourcesContent":["import type { LintPlugins } from \"#/@types/oxlint\";\n\nconst PLUGIN_COMMON = [\n \"eslint\",\n \"typescript\",\n \"unicorn\",\n \"oxc\",\n \"import\",\n \"promise\",\n] as const satisfies LintPlugins;\n\nconst PLUGIN_JS_COMMON = [\n \"@stylistic/eslint-plugin\",\n] as const;\n\nexport { PLUGIN_COMMON, PLUGIN_JS_COMMON };\n"],"mappings":"AAEA,MAAM,gBAAgB;CAClB;CACA;CACA;CACA;CACA;CACA;AACJ;AAEA,MAAM,mBAAmB,CACrB,0BACJ"}
|
|
@@ -3,6 +3,7 @@ const require_eslint = require('../rules/eslint.js');
|
|
|
3
3
|
const require_import = require('../rules/import.js');
|
|
4
4
|
const require_oxc = require('../rules/oxc.js');
|
|
5
5
|
const require_promise = require('../rules/promise.js');
|
|
6
|
+
const require_stylistic = require('../rules/stylistic.js');
|
|
6
7
|
const require_typescript = require('../rules/typescript.js');
|
|
7
8
|
const require_unicorn = require('../rules/unicorn.js');
|
|
8
9
|
let es_toolkit = require("es-toolkit");
|
|
@@ -11,13 +12,15 @@ const commonPreset = () => {
|
|
|
11
12
|
return ({ config: internalConfig }) => {
|
|
12
13
|
return { config: (0, es_toolkit.toMerged)(internalConfig, {
|
|
13
14
|
plugins: [...require_index.PLUGIN_COMMON],
|
|
15
|
+
jsPlugins: [...require_index.PLUGIN_JS_COMMON],
|
|
14
16
|
rules: {
|
|
15
17
|
...require_eslint.RULES_ESLINT,
|
|
16
18
|
...require_typescript.RULES_TYPESCRIPT,
|
|
17
19
|
...require_unicorn.RULES_UNICORN,
|
|
18
20
|
...require_oxc.RULES_OXC,
|
|
19
21
|
...require_import.RULES_IMPORT,
|
|
20
|
-
...require_promise.RULES_PROMISE
|
|
22
|
+
...require_promise.RULES_PROMISE,
|
|
23
|
+
...require_stylistic.RULES_STYLISTIC
|
|
21
24
|
}
|
|
22
25
|
}) };
|
|
23
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["PLUGIN_COMMON","RULES_ESLINT","RULES_TYPESCRIPT","RULES_UNICORN","RULES_OXC","RULES_IMPORT","RULES_PROMISE"],"sources":["../../../../src/presets/common/preset/index.ts"],"sourcesContent":["import type { OxlintConfig } from \"oxlint\";\n\nimport type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { toMerged } from \"es-toolkit\";\n\nimport { PLUGIN_COMMON } from \"#/presets/common/plugin\";\nimport { RULES_ESLINT } from \"#/presets/common/rules/eslint\";\nimport { RULES_IMPORT } from \"#/presets/common/rules/import\";\nimport { RULES_OXC } from \"#/presets/common/rules/oxc\";\nimport { RULES_PROMISE } from \"#/presets/common/rules/promise\";\nimport { RULES_TYPESCRIPT } from \"#/presets/common/rules/typescript\";\nimport { RULES_UNICORN } from \"#/presets/common/rules/unicorn\";\n\nconst commonPreset = (): Preset => {\n return ({ config: internalConfig }): PresetResult => {\n const config: OxlintConfig = toMerged(internalConfig, {\n plugins: [\n ...PLUGIN_COMMON,\n ],\n rules: {\n ...RULES_ESLINT,\n ...RULES_TYPESCRIPT,\n ...RULES_UNICORN,\n ...RULES_OXC,\n ...RULES_IMPORT,\n ...RULES_PROMISE,\n },\n } satisfies OxlintConfig);\n\n return {\n config,\n };\n };\n};\n\nexport { commonPreset };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["PLUGIN_COMMON","PLUGIN_JS_COMMON","RULES_ESLINT","RULES_TYPESCRIPT","RULES_UNICORN","RULES_OXC","RULES_IMPORT","RULES_PROMISE","RULES_STYLISTIC"],"sources":["../../../../src/presets/common/preset/index.ts"],"sourcesContent":["import type { OxlintConfig } from \"oxlint\";\n\nimport type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { toMerged } from \"es-toolkit\";\n\nimport { PLUGIN_COMMON, PLUGIN_JS_COMMON } from \"#/presets/common/plugin\";\nimport { RULES_ESLINT } from \"#/presets/common/rules/eslint\";\nimport { RULES_IMPORT } from \"#/presets/common/rules/import\";\nimport { RULES_OXC } from \"#/presets/common/rules/oxc\";\nimport { RULES_PROMISE } from \"#/presets/common/rules/promise\";\nimport { RULES_STYLISTIC } from \"#/presets/common/rules/stylistic\";\nimport { RULES_TYPESCRIPT } from \"#/presets/common/rules/typescript\";\nimport { RULES_UNICORN } from \"#/presets/common/rules/unicorn\";\n\nconst commonPreset = (): Preset => {\n return ({ config: internalConfig }): PresetResult => {\n const config: OxlintConfig = toMerged(internalConfig, {\n plugins: [\n ...PLUGIN_COMMON,\n ],\n jsPlugins: [\n ...PLUGIN_JS_COMMON,\n ],\n rules: {\n // Plugins\n ...RULES_ESLINT,\n ...RULES_TYPESCRIPT,\n ...RULES_UNICORN,\n ...RULES_OXC,\n ...RULES_IMPORT,\n ...RULES_PROMISE,\n // JavaScript plugins\n ...RULES_STYLISTIC,\n },\n } satisfies OxlintConfig);\n\n return {\n config,\n };\n };\n};\n\nexport { commonPreset };\n"],"mappings":";;;;;;;;;;AAeA,MAAM,qBAA6B;CAC/B,QAAQ,EAAE,QAAQ,qBAAmC;EAqBjD,OAAO,EACH,iCArBkC,gBAAgB;GAClD,SAAS,CACL,GAAGA,2BACP;GACA,WAAW,CACP,GAAGC,8BACP;GACA,OAAO;IAEH,GAAGC;IACH,GAAGC;IACH,GAAGC;IACH,GAAGC;IACH,GAAGC;IACH,GAAGC;IAEH,GAAGC;GACP;EACJ,CAGS,EACT;CACJ;AACJ"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { PLUGIN_COMMON } from "../plugin/index.mjs";
|
|
1
|
+
import { PLUGIN_COMMON, PLUGIN_JS_COMMON } from "../plugin/index.mjs";
|
|
2
2
|
import { RULES_ESLINT } from "../rules/eslint.mjs";
|
|
3
3
|
import { RULES_IMPORT } from "../rules/import.mjs";
|
|
4
4
|
import { RULES_OXC } from "../rules/oxc.mjs";
|
|
5
5
|
import { RULES_PROMISE } from "../rules/promise.mjs";
|
|
6
|
+
import { RULES_STYLISTIC } from "../rules/stylistic.mjs";
|
|
6
7
|
import { RULES_TYPESCRIPT } from "../rules/typescript.mjs";
|
|
7
8
|
import { RULES_UNICORN } from "../rules/unicorn.mjs";
|
|
8
9
|
import { toMerged } from "es-toolkit";
|
|
@@ -11,13 +12,15 @@ const commonPreset = () => {
|
|
|
11
12
|
return ({ config: internalConfig }) => {
|
|
12
13
|
return { config: toMerged(internalConfig, {
|
|
13
14
|
plugins: [...PLUGIN_COMMON],
|
|
15
|
+
jsPlugins: [...PLUGIN_JS_COMMON],
|
|
14
16
|
rules: {
|
|
15
17
|
...RULES_ESLINT,
|
|
16
18
|
...RULES_TYPESCRIPT,
|
|
17
19
|
...RULES_UNICORN,
|
|
18
20
|
...RULES_OXC,
|
|
19
21
|
...RULES_IMPORT,
|
|
20
|
-
...RULES_PROMISE
|
|
22
|
+
...RULES_PROMISE,
|
|
23
|
+
...RULES_STYLISTIC
|
|
21
24
|
}
|
|
22
25
|
}) };
|
|
23
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/common/preset/index.ts"],"sourcesContent":["import type { OxlintConfig } from \"oxlint\";\n\nimport type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { toMerged } from \"es-toolkit\";\n\nimport { PLUGIN_COMMON } from \"#/presets/common/plugin\";\nimport { RULES_ESLINT } from \"#/presets/common/rules/eslint\";\nimport { RULES_IMPORT } from \"#/presets/common/rules/import\";\nimport { RULES_OXC } from \"#/presets/common/rules/oxc\";\nimport { RULES_PROMISE } from \"#/presets/common/rules/promise\";\nimport { RULES_TYPESCRIPT } from \"#/presets/common/rules/typescript\";\nimport { RULES_UNICORN } from \"#/presets/common/rules/unicorn\";\n\nconst commonPreset = (): Preset => {\n return ({ config: internalConfig }): PresetResult => {\n const config: OxlintConfig = toMerged(internalConfig, {\n plugins: [\n ...PLUGIN_COMMON,\n ],\n rules: {\n ...RULES_ESLINT,\n ...RULES_TYPESCRIPT,\n ...RULES_UNICORN,\n ...RULES_OXC,\n ...RULES_IMPORT,\n ...RULES_PROMISE,\n },\n } satisfies OxlintConfig);\n\n return {\n config,\n };\n };\n};\n\nexport { commonPreset };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/presets/common/preset/index.ts"],"sourcesContent":["import type { OxlintConfig } from \"oxlint\";\n\nimport type { Preset, PresetResult } from \"#/@types/preset\";\n\nimport { toMerged } from \"es-toolkit\";\n\nimport { PLUGIN_COMMON, PLUGIN_JS_COMMON } from \"#/presets/common/plugin\";\nimport { RULES_ESLINT } from \"#/presets/common/rules/eslint\";\nimport { RULES_IMPORT } from \"#/presets/common/rules/import\";\nimport { RULES_OXC } from \"#/presets/common/rules/oxc\";\nimport { RULES_PROMISE } from \"#/presets/common/rules/promise\";\nimport { RULES_STYLISTIC } from \"#/presets/common/rules/stylistic\";\nimport { RULES_TYPESCRIPT } from \"#/presets/common/rules/typescript\";\nimport { RULES_UNICORN } from \"#/presets/common/rules/unicorn\";\n\nconst commonPreset = (): Preset => {\n return ({ config: internalConfig }): PresetResult => {\n const config: OxlintConfig = toMerged(internalConfig, {\n plugins: [\n ...PLUGIN_COMMON,\n ],\n jsPlugins: [\n ...PLUGIN_JS_COMMON,\n ],\n rules: {\n // Plugins\n ...RULES_ESLINT,\n ...RULES_TYPESCRIPT,\n ...RULES_UNICORN,\n ...RULES_OXC,\n ...RULES_IMPORT,\n ...RULES_PROMISE,\n // JavaScript plugins\n ...RULES_STYLISTIC,\n },\n } satisfies OxlintConfig);\n\n return {\n config,\n };\n };\n};\n\nexport { commonPreset };\n"],"mappings":";;;;;;;;;;AAeA,MAAM,qBAA6B;CAC/B,QAAQ,EAAE,QAAQ,qBAAmC;EAqBjD,OAAO,EACH,QArByB,SAAS,gBAAgB;GAClD,SAAS,CACL,GAAG,aACP;GACA,WAAW,CACP,GAAG,gBACP;GACA,OAAO;IAEH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IAEH,GAAG;GACP;EACJ,CAGS,EACT;CACJ;AACJ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@stylistic/eslint-plugin` is used to enforce
|
|
3
|
+
* some stylistic rules that are currently missing in `oxfmt`.
|
|
4
|
+
*/
|
|
5
|
+
declare const RULES_STYLISTIC: {
|
|
6
|
+
readonly "@stylistic/eslint-plugin/array-bracket-newline": ["error", {
|
|
7
|
+
readonly multiline: true;
|
|
8
|
+
readonly minItems: 1;
|
|
9
|
+
}];
|
|
10
|
+
readonly "@stylistic/eslint-plugin/array-element-newline": ["error", {
|
|
11
|
+
readonly multiline: true;
|
|
12
|
+
readonly minItems: 1;
|
|
13
|
+
}];
|
|
14
|
+
readonly "@stylistic/eslint-plugin/comma-dangle": ["error", "always-multiline"];
|
|
15
|
+
readonly "@stylistic/eslint-plugin/indent": ["error", 4];
|
|
16
|
+
};
|
|
17
|
+
export { RULES_STYLISTIC };
|
|
18
|
+
//# sourceMappingURL=stylistic.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
const RULES_STYLISTIC = {
|
|
3
|
+
"@stylistic/eslint-plugin/array-bracket-newline": ["error", {
|
|
4
|
+
multiline: true,
|
|
5
|
+
minItems: 1
|
|
6
|
+
}],
|
|
7
|
+
"@stylistic/eslint-plugin/array-element-newline": ["error", {
|
|
8
|
+
multiline: true,
|
|
9
|
+
minItems: 1
|
|
10
|
+
}],
|
|
11
|
+
"@stylistic/eslint-plugin/comma-dangle": ["error", "always-multiline"],
|
|
12
|
+
"@stylistic/eslint-plugin/indent": ["error", 4]
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.RULES_STYLISTIC = RULES_STYLISTIC;
|
|
16
|
+
//# sourceMappingURL=stylistic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stylistic.js","names":[],"sources":["../../../../src/presets/common/rules/stylistic.ts"],"sourcesContent":["/**\n * `@stylistic/eslint-plugin` is used to enforce\n * some stylistic rules that are currently missing in `oxfmt`.\n */\n\nimport type { UnprefixedRuleOptions as RawRules } from \"@stylistic/eslint-plugin\";\n\ntype FirstElement<T> = T extends readonly [\n infer U,\n ...unknown[],\n]\n ? U\n : T extends readonly (infer U)[]\n ? U\n : never;\n\ntype Rules<T extends RawRules = RawRules> = {\n [K in keyof T as `@stylistic/eslint-plugin/${K & string}`]?: [\n (\"allow\" | \"off\" | \"warn\" | \"error\" | \"deny\") | number,\n FirstElement<T[K]>,\n ];\n};\n\nconst RULES_STYLISTIC = {\n \"@stylistic/eslint-plugin/array-bracket-newline\": [\n \"error\",\n {\n multiline: true,\n minItems: 1,\n },\n ],\n \"@stylistic/eslint-plugin/array-element-newline\": [\n \"error\",\n {\n multiline: true,\n minItems: 1,\n },\n ],\n // make every array element come with a trailing comma\n \"@stylistic/eslint-plugin/comma-dangle\": [\n \"error\",\n \"always-multiline\",\n ],\n // make every newline rules consistent with 4 spaces indent\n \"@stylistic/eslint-plugin/indent\": [\n \"error\",\n 4,\n ],\n} as const satisfies Rules;\n\nexport { RULES_STYLISTIC };\n"],"mappings":";AAuBA,MAAM,kBAAkB;CACpB,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CACA,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CAEA,yCAAyC,CACrC,SACA,kBACJ;CAEA,mCAAmC,CAC/B,SACA,CACJ;AACJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const RULES_STYLISTIC = {
|
|
2
|
+
"@stylistic/eslint-plugin/array-bracket-newline": ["error", {
|
|
3
|
+
multiline: true,
|
|
4
|
+
minItems: 1
|
|
5
|
+
}],
|
|
6
|
+
"@stylistic/eslint-plugin/array-element-newline": ["error", {
|
|
7
|
+
multiline: true,
|
|
8
|
+
minItems: 1
|
|
9
|
+
}],
|
|
10
|
+
"@stylistic/eslint-plugin/comma-dangle": ["error", "always-multiline"],
|
|
11
|
+
"@stylistic/eslint-plugin/indent": ["error", 4]
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { RULES_STYLISTIC };
|
|
15
|
+
//# sourceMappingURL=stylistic.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stylistic.mjs","names":[],"sources":["../../../../src/presets/common/rules/stylistic.ts"],"sourcesContent":["/**\n * `@stylistic/eslint-plugin` is used to enforce\n * some stylistic rules that are currently missing in `oxfmt`.\n */\n\nimport type { UnprefixedRuleOptions as RawRules } from \"@stylistic/eslint-plugin\";\n\ntype FirstElement<T> = T extends readonly [\n infer U,\n ...unknown[],\n]\n ? U\n : T extends readonly (infer U)[]\n ? U\n : never;\n\ntype Rules<T extends RawRules = RawRules> = {\n [K in keyof T as `@stylistic/eslint-plugin/${K & string}`]?: [\n (\"allow\" | \"off\" | \"warn\" | \"error\" | \"deny\") | number,\n FirstElement<T[K]>,\n ];\n};\n\nconst RULES_STYLISTIC = {\n \"@stylistic/eslint-plugin/array-bracket-newline\": [\n \"error\",\n {\n multiline: true,\n minItems: 1,\n },\n ],\n \"@stylistic/eslint-plugin/array-element-newline\": [\n \"error\",\n {\n multiline: true,\n minItems: 1,\n },\n ],\n // make every array element come with a trailing comma\n \"@stylistic/eslint-plugin/comma-dangle\": [\n \"error\",\n \"always-multiline\",\n ],\n // make every newline rules consistent with 4 spaces indent\n \"@stylistic/eslint-plugin/indent\": [\n \"error\",\n 4,\n ],\n} as const satisfies Rules;\n\nexport { RULES_STYLISTIC };\n"],"mappings":"AAuBA,MAAM,kBAAkB;CACpB,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CACA,kDAAkD,CAC9C,SACA;EACI,WAAW;EACX,UAAU;CACd,CACJ;CAEA,yCAAyC,CACrC,SACA,kBACJ;CAEA,mCAAmC,CAC/B,SACA,CACJ;AACJ"}
|
|
@@ -136,7 +136,7 @@ declare const RULES_TYPESCRIPT_STYLE: {
|
|
|
136
136
|
readonly prefer: "class-property";
|
|
137
137
|
}];
|
|
138
138
|
readonly "typescript/prefer-function-type": "error";
|
|
139
|
-
readonly "typescript/prefer-reduce-type-
|
|
139
|
+
readonly "typescript/prefer-reduce-type-parameter": "error";
|
|
140
140
|
readonly "typescript/prefer-return-this-type": "error";
|
|
141
141
|
};
|
|
142
142
|
declare const RULES_TYPESCRIPT_SUSPICIOUS: {
|
|
@@ -166,7 +166,7 @@ declare const RULES_TYPESCRIPT: {
|
|
|
166
166
|
readonly prefer: "class-property";
|
|
167
167
|
}];
|
|
168
168
|
readonly "typescript/prefer-function-type": "error";
|
|
169
|
-
readonly "typescript/prefer-reduce-type-
|
|
169
|
+
readonly "typescript/prefer-reduce-type-parameter": "error";
|
|
170
170
|
readonly "typescript/prefer-return-this-type": "error";
|
|
171
171
|
readonly "typescript/no-empty-object-type": ["error", {
|
|
172
172
|
readonly allowInterfaces: "with-single-extends";
|
|
@@ -123,7 +123,7 @@ const RULES_TYPESCRIPT_STYLE = {
|
|
|
123
123
|
"typescript/no-empty-interface": ["error", { allowSingleExtends: true }],
|
|
124
124
|
"typescript/parameter-properties": ["error", { prefer: "class-property" }],
|
|
125
125
|
"typescript/prefer-function-type": "error",
|
|
126
|
-
"typescript/prefer-reduce-type-
|
|
126
|
+
"typescript/prefer-reduce-type-parameter": "error",
|
|
127
127
|
"typescript/prefer-return-this-type": "error"
|
|
128
128
|
};
|
|
129
129
|
const RULES_TYPESCRIPT_SUSPICIOUS = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","names":[],"sources":["../../../../src/presets/common/rules/typescript.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_TYPESCRIPT_NURSERY = {\n \"typescript/consistent-return\": [\n \"error\",\n {\n treatUndefinedAsUnspecified: false,\n },\n ],\n \"typescript/consistent-type-exports\": [\n \"error\",\n {\n fixMixedExportsWithInlineTypeSpecifier: false,\n },\n ],\n \"typescript/dot-notation\": [\n \"error\",\n {\n allowIndexSignaturePropertyAccess: false,\n allowKeywords: true,\n allowPrivateClassPropertyAccess: false,\n allowProtectedClassPropertyAccess: false,\n },\n ],\n \"typescript/no-unnecessary-type-conversion\": \"error\",\n \"typescript/no-unnecessary-type-parameters\": \"error\",\n \"typescript/no-useless-default-assignment\": \"error\",\n \"typescript/prefer-optional-chain\": [\n \"error\",\n {\n allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,\n checkAny: true,\n checkBigInt: true,\n checkBoolean: true,\n checkNumber: true,\n checkString: true,\n checkUnknown: true,\n requireNullish: false,\n },\n ],\n \"typescript/prefer-readonly\": [\n \"error\",\n {\n onlyInlineLambdas: false,\n },\n ],\n \"typescript/prefer-regexp-exec\": \"error\",\n \"typescript/strict-void-return\": [\n \"error\",\n {\n allowReturnAny: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_PEDANTIC = {\n \"typescript/no-misused-promises\": [\n \"error\",\n {\n checksConditionals: true,\n checksSpreads: true,\n checksVoidReturn: {\n arguments: true,\n attributes: true,\n inheritedMethods: true,\n properties: true,\n returns: true,\n variables: true,\n },\n },\n ],\n \"typescript/no-mixed-enums\": \"error\",\n \"typescript/no-unsafe-argument\": \"error\",\n \"typescript/no-unsafe-assignment\": \"error\",\n \"typescript/no-unsafe-call\": \"error\",\n \"typescript/no-unsafe-function-type\": \"error\",\n \"typescript/no-unsafe-member-access\": \"error\",\n \"typescript/no-unsafe-return\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/prefer-includes\": \"error\",\n \"typescript/prefer-nullish-coalescing\": [\n \"error\",\n {\n ignoreBooleanCoercion: false,\n ignoreConditionalTests: false,\n ignoreIfStatements: false,\n ignoreMixedLogicalExpressions: false,\n ignorePrimitives: {\n bigint: false,\n boolean: false,\n number: false,\n string: false,\n },\n ignoreTernaryTests: false,\n },\n ],\n \"typescript/prefer-promise-reject-errors\": [\n \"error\",\n {\n allowEmptyReject: false,\n allowThrowingAny: false,\n allowThrowingUnknown: false,\n },\n ],\n \"typescript/prefer-ts-expect-error\": \"error\",\n \"typescript/restrict-plus-operands\": [\n \"error\",\n {\n allowAny: true,\n allowBoolean: true,\n allowNullish: true,\n allowNumberAndString: true,\n allowRegExp: true,\n skipCompoundAssignments: false,\n },\n ],\n \"typescript/return-await\": [\n \"error\",\n \"always\",\n ],\n \"typescript/strict-boolean-expressions\": [\n \"error\",\n {\n allowAny: true,\n allowNullableBoolean: false,\n allowNullableEnum: false,\n allowNullableNumber: false,\n allowNullableObject: true,\n allowNullableString: false,\n allowNumber: true,\n allowString: true,\n },\n ],\n \"typescript/switch-exhaustiveness-check\": [\n \"error\",\n {\n allowDefaultCaseForExhaustiveSwitch: true,\n considerDefaultExhaustiveForUnions: true,\n requireDefaultForNonUnion: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_RESTRICTION = {\n \"typescript/no-empty-object-type\": [\n \"error\",\n {\n allowInterfaces: \"with-single-extends\",\n allowObjectTypes: \"never\",\n },\n ],\n \"typescript/no-import-type-side-effects\": \"error\",\n \"typescript/no-namespace\": [\n \"error\",\n {\n allowDeclarations: false,\n allowDefinitionFiles: true,\n },\n ],\n \"typescript/no-non-null-asserted-nullish-coalescing\": \"error\",\n \"typescript/no-non-null-assertion\": \"error\",\n \"typescript/promise-function-async\": [\n \"error\",\n {\n allowAny: true,\n checkArrowFunctions: true,\n checkFunctionDeclarations: true,\n checkFunctionExpressions: true,\n checkMethodDeclarations: true,\n },\n ],\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_STYLE = {\n \"typescript/consistent-type-assertions\": [\n \"error\",\n {\n assertionStyle: \"as\",\n },\n ],\n \"typescript/consistent-type-definitions\": [\n \"error\",\n \"type\",\n ],\n \"typescript/consistent-type-imports\": [\n \"error\",\n {\n disallowTypeImports: true,\n fixStyle: \"separate-type-imports\",\n prefer: \"type-imports\",\n },\n ],\n \"typescript/no-empty-interface\": [\n \"error\",\n {\n allowSingleExtends: true,\n },\n ],\n \"typescript/parameter-properties\": [\n \"error\",\n {\n prefer: \"class-property\",\n },\n ],\n \"typescript/prefer-function-type\": \"error\",\n \"typescript/prefer-reduce-type-
|
|
1
|
+
{"version":3,"file":"typescript.js","names":[],"sources":["../../../../src/presets/common/rules/typescript.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_TYPESCRIPT_NURSERY = {\n \"typescript/consistent-return\": [\n \"error\",\n {\n treatUndefinedAsUnspecified: false,\n },\n ],\n \"typescript/consistent-type-exports\": [\n \"error\",\n {\n fixMixedExportsWithInlineTypeSpecifier: false,\n },\n ],\n \"typescript/dot-notation\": [\n \"error\",\n {\n allowIndexSignaturePropertyAccess: false,\n allowKeywords: true,\n allowPrivateClassPropertyAccess: false,\n allowProtectedClassPropertyAccess: false,\n },\n ],\n \"typescript/no-unnecessary-type-conversion\": \"error\",\n \"typescript/no-unnecessary-type-parameters\": \"error\",\n \"typescript/no-useless-default-assignment\": \"error\",\n \"typescript/prefer-optional-chain\": [\n \"error\",\n {\n allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,\n checkAny: true,\n checkBigInt: true,\n checkBoolean: true,\n checkNumber: true,\n checkString: true,\n checkUnknown: true,\n requireNullish: false,\n },\n ],\n \"typescript/prefer-readonly\": [\n \"error\",\n {\n onlyInlineLambdas: false,\n },\n ],\n \"typescript/prefer-regexp-exec\": \"error\",\n \"typescript/strict-void-return\": [\n \"error\",\n {\n allowReturnAny: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_PEDANTIC = {\n \"typescript/no-misused-promises\": [\n \"error\",\n {\n checksConditionals: true,\n checksSpreads: true,\n checksVoidReturn: {\n arguments: true,\n attributes: true,\n inheritedMethods: true,\n properties: true,\n returns: true,\n variables: true,\n },\n },\n ],\n \"typescript/no-mixed-enums\": \"error\",\n \"typescript/no-unsafe-argument\": \"error\",\n \"typescript/no-unsafe-assignment\": \"error\",\n \"typescript/no-unsafe-call\": \"error\",\n \"typescript/no-unsafe-function-type\": \"error\",\n \"typescript/no-unsafe-member-access\": \"error\",\n \"typescript/no-unsafe-return\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/prefer-includes\": \"error\",\n \"typescript/prefer-nullish-coalescing\": [\n \"error\",\n {\n ignoreBooleanCoercion: false,\n ignoreConditionalTests: false,\n ignoreIfStatements: false,\n ignoreMixedLogicalExpressions: false,\n ignorePrimitives: {\n bigint: false,\n boolean: false,\n number: false,\n string: false,\n },\n ignoreTernaryTests: false,\n },\n ],\n \"typescript/prefer-promise-reject-errors\": [\n \"error\",\n {\n allowEmptyReject: false,\n allowThrowingAny: false,\n allowThrowingUnknown: false,\n },\n ],\n \"typescript/prefer-ts-expect-error\": \"error\",\n \"typescript/restrict-plus-operands\": [\n \"error\",\n {\n allowAny: true,\n allowBoolean: true,\n allowNullish: true,\n allowNumberAndString: true,\n allowRegExp: true,\n skipCompoundAssignments: false,\n },\n ],\n \"typescript/return-await\": [\n \"error\",\n \"always\",\n ],\n \"typescript/strict-boolean-expressions\": [\n \"error\",\n {\n allowAny: true,\n allowNullableBoolean: false,\n allowNullableEnum: false,\n allowNullableNumber: false,\n allowNullableObject: true,\n allowNullableString: false,\n allowNumber: true,\n allowString: true,\n },\n ],\n \"typescript/switch-exhaustiveness-check\": [\n \"error\",\n {\n allowDefaultCaseForExhaustiveSwitch: true,\n considerDefaultExhaustiveForUnions: true,\n requireDefaultForNonUnion: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_RESTRICTION = {\n \"typescript/no-empty-object-type\": [\n \"error\",\n {\n allowInterfaces: \"with-single-extends\",\n allowObjectTypes: \"never\",\n },\n ],\n \"typescript/no-import-type-side-effects\": \"error\",\n \"typescript/no-namespace\": [\n \"error\",\n {\n allowDeclarations: false,\n allowDefinitionFiles: true,\n },\n ],\n \"typescript/no-non-null-asserted-nullish-coalescing\": \"error\",\n \"typescript/no-non-null-assertion\": \"error\",\n \"typescript/promise-function-async\": [\n \"error\",\n {\n allowAny: true,\n checkArrowFunctions: true,\n checkFunctionDeclarations: true,\n checkFunctionExpressions: true,\n checkMethodDeclarations: true,\n },\n ],\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_STYLE = {\n \"typescript/consistent-type-assertions\": [\n \"error\",\n {\n assertionStyle: \"as\",\n },\n ],\n \"typescript/consistent-type-definitions\": [\n \"error\",\n \"type\",\n ],\n \"typescript/consistent-type-imports\": [\n \"error\",\n {\n disallowTypeImports: true,\n fixStyle: \"separate-type-imports\",\n prefer: \"type-imports\",\n },\n ],\n \"typescript/no-empty-interface\": [\n \"error\",\n {\n allowSingleExtends: true,\n },\n ],\n \"typescript/parameter-properties\": [\n \"error\",\n {\n prefer: \"class-property\",\n },\n ],\n \"typescript/prefer-function-type\": \"error\",\n \"typescript/prefer-reduce-type-parameter\": \"error\",\n \"typescript/prefer-return-this-type\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_SUSPICIOUS = {\n \"typescript/no-confusing-non-null-assertion\": \"error\",\n \"typescript/no-unnecessary-template-expression\": \"error\",\n \"typescript/no-unnecessary-type-constraint\": \"error\",\n \"typescript/no-unsafe-enum-comparison\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT = {\n ...RULES_TYPESCRIPT_NURSERY,\n ...RULES_TYPESCRIPT_PEDANTIC,\n ...RULES_TYPESCRIPT_RESTRICTION,\n ...RULES_TYPESCRIPT_STYLE,\n ...RULES_TYPESCRIPT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_TYPESCRIPT,\n RULES_TYPESCRIPT_NURSERY,\n RULES_TYPESCRIPT_PEDANTIC,\n RULES_TYPESCRIPT_RESTRICTION,\n RULES_TYPESCRIPT_STYLE,\n RULES_TYPESCRIPT_SUSPICIOUS,\n};\n"],"mappings":"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"}
|
|
@@ -122,7 +122,7 @@ const RULES_TYPESCRIPT_STYLE = {
|
|
|
122
122
|
"typescript/no-empty-interface": ["error", { allowSingleExtends: true }],
|
|
123
123
|
"typescript/parameter-properties": ["error", { prefer: "class-property" }],
|
|
124
124
|
"typescript/prefer-function-type": "error",
|
|
125
|
-
"typescript/prefer-reduce-type-
|
|
125
|
+
"typescript/prefer-reduce-type-parameter": "error",
|
|
126
126
|
"typescript/prefer-return-this-type": "error"
|
|
127
127
|
};
|
|
128
128
|
const RULES_TYPESCRIPT_SUSPICIOUS = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.mjs","names":[],"sources":["../../../../src/presets/common/rules/typescript.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_TYPESCRIPT_NURSERY = {\n \"typescript/consistent-return\": [\n \"error\",\n {\n treatUndefinedAsUnspecified: false,\n },\n ],\n \"typescript/consistent-type-exports\": [\n \"error\",\n {\n fixMixedExportsWithInlineTypeSpecifier: false,\n },\n ],\n \"typescript/dot-notation\": [\n \"error\",\n {\n allowIndexSignaturePropertyAccess: false,\n allowKeywords: true,\n allowPrivateClassPropertyAccess: false,\n allowProtectedClassPropertyAccess: false,\n },\n ],\n \"typescript/no-unnecessary-type-conversion\": \"error\",\n \"typescript/no-unnecessary-type-parameters\": \"error\",\n \"typescript/no-useless-default-assignment\": \"error\",\n \"typescript/prefer-optional-chain\": [\n \"error\",\n {\n allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,\n checkAny: true,\n checkBigInt: true,\n checkBoolean: true,\n checkNumber: true,\n checkString: true,\n checkUnknown: true,\n requireNullish: false,\n },\n ],\n \"typescript/prefer-readonly\": [\n \"error\",\n {\n onlyInlineLambdas: false,\n },\n ],\n \"typescript/prefer-regexp-exec\": \"error\",\n \"typescript/strict-void-return\": [\n \"error\",\n {\n allowReturnAny: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_PEDANTIC = {\n \"typescript/no-misused-promises\": [\n \"error\",\n {\n checksConditionals: true,\n checksSpreads: true,\n checksVoidReturn: {\n arguments: true,\n attributes: true,\n inheritedMethods: true,\n properties: true,\n returns: true,\n variables: true,\n },\n },\n ],\n \"typescript/no-mixed-enums\": \"error\",\n \"typescript/no-unsafe-argument\": \"error\",\n \"typescript/no-unsafe-assignment\": \"error\",\n \"typescript/no-unsafe-call\": \"error\",\n \"typescript/no-unsafe-function-type\": \"error\",\n \"typescript/no-unsafe-member-access\": \"error\",\n \"typescript/no-unsafe-return\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/prefer-includes\": \"error\",\n \"typescript/prefer-nullish-coalescing\": [\n \"error\",\n {\n ignoreBooleanCoercion: false,\n ignoreConditionalTests: false,\n ignoreIfStatements: false,\n ignoreMixedLogicalExpressions: false,\n ignorePrimitives: {\n bigint: false,\n boolean: false,\n number: false,\n string: false,\n },\n ignoreTernaryTests: false,\n },\n ],\n \"typescript/prefer-promise-reject-errors\": [\n \"error\",\n {\n allowEmptyReject: false,\n allowThrowingAny: false,\n allowThrowingUnknown: false,\n },\n ],\n \"typescript/prefer-ts-expect-error\": \"error\",\n \"typescript/restrict-plus-operands\": [\n \"error\",\n {\n allowAny: true,\n allowBoolean: true,\n allowNullish: true,\n allowNumberAndString: true,\n allowRegExp: true,\n skipCompoundAssignments: false,\n },\n ],\n \"typescript/return-await\": [\n \"error\",\n \"always\",\n ],\n \"typescript/strict-boolean-expressions\": [\n \"error\",\n {\n allowAny: true,\n allowNullableBoolean: false,\n allowNullableEnum: false,\n allowNullableNumber: false,\n allowNullableObject: true,\n allowNullableString: false,\n allowNumber: true,\n allowString: true,\n },\n ],\n \"typescript/switch-exhaustiveness-check\": [\n \"error\",\n {\n allowDefaultCaseForExhaustiveSwitch: true,\n considerDefaultExhaustiveForUnions: true,\n requireDefaultForNonUnion: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_RESTRICTION = {\n \"typescript/no-empty-object-type\": [\n \"error\",\n {\n allowInterfaces: \"with-single-extends\",\n allowObjectTypes: \"never\",\n },\n ],\n \"typescript/no-import-type-side-effects\": \"error\",\n \"typescript/no-namespace\": [\n \"error\",\n {\n allowDeclarations: false,\n allowDefinitionFiles: true,\n },\n ],\n \"typescript/no-non-null-asserted-nullish-coalescing\": \"error\",\n \"typescript/no-non-null-assertion\": \"error\",\n \"typescript/promise-function-async\": [\n \"error\",\n {\n allowAny: true,\n checkArrowFunctions: true,\n checkFunctionDeclarations: true,\n checkFunctionExpressions: true,\n checkMethodDeclarations: true,\n },\n ],\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_STYLE = {\n \"typescript/consistent-type-assertions\": [\n \"error\",\n {\n assertionStyle: \"as\",\n },\n ],\n \"typescript/consistent-type-definitions\": [\n \"error\",\n \"type\",\n ],\n \"typescript/consistent-type-imports\": [\n \"error\",\n {\n disallowTypeImports: true,\n fixStyle: \"separate-type-imports\",\n prefer: \"type-imports\",\n },\n ],\n \"typescript/no-empty-interface\": [\n \"error\",\n {\n allowSingleExtends: true,\n },\n ],\n \"typescript/parameter-properties\": [\n \"error\",\n {\n prefer: \"class-property\",\n },\n ],\n \"typescript/prefer-function-type\": \"error\",\n \"typescript/prefer-reduce-type-
|
|
1
|
+
{"version":3,"file":"typescript.mjs","names":[],"sources":["../../../../src/presets/common/rules/typescript.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_TYPESCRIPT_NURSERY = {\n \"typescript/consistent-return\": [\n \"error\",\n {\n treatUndefinedAsUnspecified: false,\n },\n ],\n \"typescript/consistent-type-exports\": [\n \"error\",\n {\n fixMixedExportsWithInlineTypeSpecifier: false,\n },\n ],\n \"typescript/dot-notation\": [\n \"error\",\n {\n allowIndexSignaturePropertyAccess: false,\n allowKeywords: true,\n allowPrivateClassPropertyAccess: false,\n allowProtectedClassPropertyAccess: false,\n },\n ],\n \"typescript/no-unnecessary-type-conversion\": \"error\",\n \"typescript/no-unnecessary-type-parameters\": \"error\",\n \"typescript/no-useless-default-assignment\": \"error\",\n \"typescript/prefer-optional-chain\": [\n \"error\",\n {\n allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false,\n checkAny: true,\n checkBigInt: true,\n checkBoolean: true,\n checkNumber: true,\n checkString: true,\n checkUnknown: true,\n requireNullish: false,\n },\n ],\n \"typescript/prefer-readonly\": [\n \"error\",\n {\n onlyInlineLambdas: false,\n },\n ],\n \"typescript/prefer-regexp-exec\": \"error\",\n \"typescript/strict-void-return\": [\n \"error\",\n {\n allowReturnAny: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_PEDANTIC = {\n \"typescript/no-misused-promises\": [\n \"error\",\n {\n checksConditionals: true,\n checksSpreads: true,\n checksVoidReturn: {\n arguments: true,\n attributes: true,\n inheritedMethods: true,\n properties: true,\n returns: true,\n variables: true,\n },\n },\n ],\n \"typescript/no-mixed-enums\": \"error\",\n \"typescript/no-unsafe-argument\": \"error\",\n \"typescript/no-unsafe-assignment\": \"error\",\n \"typescript/no-unsafe-call\": \"error\",\n \"typescript/no-unsafe-function-type\": \"error\",\n \"typescript/no-unsafe-member-access\": \"error\",\n \"typescript/no-unsafe-return\": \"error\",\n \"typescript/only-throw-error\": \"error\",\n \"typescript/prefer-includes\": \"error\",\n \"typescript/prefer-nullish-coalescing\": [\n \"error\",\n {\n ignoreBooleanCoercion: false,\n ignoreConditionalTests: false,\n ignoreIfStatements: false,\n ignoreMixedLogicalExpressions: false,\n ignorePrimitives: {\n bigint: false,\n boolean: false,\n number: false,\n string: false,\n },\n ignoreTernaryTests: false,\n },\n ],\n \"typescript/prefer-promise-reject-errors\": [\n \"error\",\n {\n allowEmptyReject: false,\n allowThrowingAny: false,\n allowThrowingUnknown: false,\n },\n ],\n \"typescript/prefer-ts-expect-error\": \"error\",\n \"typescript/restrict-plus-operands\": [\n \"error\",\n {\n allowAny: true,\n allowBoolean: true,\n allowNullish: true,\n allowNumberAndString: true,\n allowRegExp: true,\n skipCompoundAssignments: false,\n },\n ],\n \"typescript/return-await\": [\n \"error\",\n \"always\",\n ],\n \"typescript/strict-boolean-expressions\": [\n \"error\",\n {\n allowAny: true,\n allowNullableBoolean: false,\n allowNullableEnum: false,\n allowNullableNumber: false,\n allowNullableObject: true,\n allowNullableString: false,\n allowNumber: true,\n allowString: true,\n },\n ],\n \"typescript/switch-exhaustiveness-check\": [\n \"error\",\n {\n allowDefaultCaseForExhaustiveSwitch: true,\n considerDefaultExhaustiveForUnions: true,\n requireDefaultForNonUnion: false,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_RESTRICTION = {\n \"typescript/no-empty-object-type\": [\n \"error\",\n {\n allowInterfaces: \"with-single-extends\",\n allowObjectTypes: \"never\",\n },\n ],\n \"typescript/no-import-type-side-effects\": \"error\",\n \"typescript/no-namespace\": [\n \"error\",\n {\n allowDeclarations: false,\n allowDefinitionFiles: true,\n },\n ],\n \"typescript/no-non-null-asserted-nullish-coalescing\": \"error\",\n \"typescript/no-non-null-assertion\": \"error\",\n \"typescript/promise-function-async\": [\n \"error\",\n {\n allowAny: true,\n checkArrowFunctions: true,\n checkFunctionDeclarations: true,\n checkFunctionExpressions: true,\n checkMethodDeclarations: true,\n },\n ],\n \"typescript/use-unknown-in-catch-callback-variable\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_STYLE = {\n \"typescript/consistent-type-assertions\": [\n \"error\",\n {\n assertionStyle: \"as\",\n },\n ],\n \"typescript/consistent-type-definitions\": [\n \"error\",\n \"type\",\n ],\n \"typescript/consistent-type-imports\": [\n \"error\",\n {\n disallowTypeImports: true,\n fixStyle: \"separate-type-imports\",\n prefer: \"type-imports\",\n },\n ],\n \"typescript/no-empty-interface\": [\n \"error\",\n {\n allowSingleExtends: true,\n },\n ],\n \"typescript/parameter-properties\": [\n \"error\",\n {\n prefer: \"class-property\",\n },\n ],\n \"typescript/prefer-function-type\": \"error\",\n \"typescript/prefer-reduce-type-parameter\": \"error\",\n \"typescript/prefer-return-this-type\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT_SUSPICIOUS = {\n \"typescript/no-confusing-non-null-assertion\": \"error\",\n \"typescript/no-unnecessary-template-expression\": \"error\",\n \"typescript/no-unnecessary-type-constraint\": \"error\",\n \"typescript/no-unsafe-enum-comparison\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_TYPESCRIPT = {\n ...RULES_TYPESCRIPT_NURSERY,\n ...RULES_TYPESCRIPT_PEDANTIC,\n ...RULES_TYPESCRIPT_RESTRICTION,\n ...RULES_TYPESCRIPT_STYLE,\n ...RULES_TYPESCRIPT_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_TYPESCRIPT,\n RULES_TYPESCRIPT_NURSERY,\n RULES_TYPESCRIPT_PEDANTIC,\n RULES_TYPESCRIPT_RESTRICTION,\n RULES_TYPESCRIPT_STYLE,\n RULES_TYPESCRIPT_SUSPICIOUS,\n};\n"],"mappings":"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"}
|
|
@@ -76,10 +76,7 @@ declare const RULES_UNICORN_SUSPICIOUS: {
|
|
|
76
76
|
readonly "unicorn/no-array-sort": ["error", {
|
|
77
77
|
readonly allowExpressionStatement: true;
|
|
78
78
|
}];
|
|
79
|
-
readonly "unicorn/no-instanceof-builtins": ["
|
|
80
|
-
readonly strategy: "strict";
|
|
81
|
-
readonly useErrorIsError: false;
|
|
82
|
-
}];
|
|
79
|
+
readonly "unicorn/no-instanceof-builtins": ["allow"];
|
|
83
80
|
};
|
|
84
81
|
declare const RULES_UNICORN: {
|
|
85
82
|
readonly "unicorn/consistent-function-scoping": "error";
|
|
@@ -88,10 +85,7 @@ declare const RULES_UNICORN: {
|
|
|
88
85
|
readonly "unicorn/no-array-sort": ["error", {
|
|
89
86
|
readonly allowExpressionStatement: true;
|
|
90
87
|
}];
|
|
91
|
-
readonly "unicorn/no-instanceof-builtins": ["
|
|
92
|
-
readonly strategy: "strict";
|
|
93
|
-
readonly useErrorIsError: false;
|
|
94
|
-
}];
|
|
88
|
+
readonly "unicorn/no-instanceof-builtins": ["allow"];
|
|
95
89
|
readonly "unicorn/consistent-date-clone": "error";
|
|
96
90
|
readonly "unicorn/consistent-existence-index-check": "error";
|
|
97
91
|
readonly "unicorn/empty-brace-spaces": "error";
|
|
@@ -69,10 +69,7 @@ const RULES_UNICORN_SUSPICIOUS = {
|
|
|
69
69
|
"unicorn/no-accessor-recursion": "error",
|
|
70
70
|
"unicorn/no-array-reverse": "error",
|
|
71
71
|
"unicorn/no-array-sort": ["error", { allowExpressionStatement: true }],
|
|
72
|
-
"unicorn/no-instanceof-builtins": ["
|
|
73
|
-
strategy: "strict",
|
|
74
|
-
useErrorIsError: false
|
|
75
|
-
}]
|
|
72
|
+
"unicorn/no-instanceof-builtins": ["allow"]
|
|
76
73
|
};
|
|
77
74
|
const RULES_UNICORN = {
|
|
78
75
|
...RULES_UNICORN_PEDANTIC,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unicorn.js","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n \"unicorn/no-instanceof-builtins\": [\n \"
|
|
1
|
+
{"version":3,"file":"unicorn.js","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n \"unicorn/no-instanceof-builtins\": [\n \"allow\",\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN = {\n ...RULES_UNICORN_PEDANTIC,\n ...RULES_UNICORN_RESTRICTION,\n ...RULES_UNICORN_STYLE,\n ...RULES_UNICORN_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_UNICORN,\n RULES_UNICORN_PEDANTIC,\n RULES_UNICORN_RESTRICTION,\n RULES_UNICORN_STYLE,\n RULES_UNICORN_SUSPICIOUS,\n};\n"],"mappings":";AAEA,MAAM,yBAAyB;CAC3B,yCAAyC;CACzC,iCAAiC,CAC7B,SACA,EACI,YAAY,eAChB,CACJ;CACA,4BAA4B;CAC5B,+BAA+B;CAC/B,yBAAyB;CACzB,2CAA2C;CAC3C,6CAA6C;CAC7C,oCAAoC;CACpC,6CAA6C,CACzC,SACA,EACI,aAAa,MACjB,CACJ;CACA,2BAA2B;CAC3B,+BAA+B;CAC/B,6BAA6B;CAC7B,mDAAmD;AACvD;AAEA,MAAM,4BAA4B;CAC9B,kCAAkC;CAClC,gCAAgC;CAChC,oCAAoC,CAChC,SACA;EACI,eAAe;EACf,UAAU;CACd,CACJ;AACJ;AAEA,MAAM,sBAAsB;CACxB,iCAAiC;CACjC,4CAA4C;CAC5C,8BAA8B;CAC9B,yBAAyB;CACzB,yCAAyC;CACzC,6CAA6C;CAC7C,0CAA0C;CAC1C,oCAAoC,CAChC,SACA;EACI,QAAQ;GACJ,aAAa;GACb,eAAe;EACnB;EACA,aAAa;GACT,aAAa;GACb,eAAe;EACnB;EACA,QAAQ;GACJ,aAAa;GACb,eAAe;EACnB;EACA,OAAO;GACH,aAAa;GACb,eAAe;EACnB;EACA,yBAAyB;CAC7B,CACJ;CACA,mCAAmC;CACnC,wCAAwC;CACxC,8BAA8B;CAC9B,2BAA2B;CAC3B,qCAAqC;CACrC,kCAAkC;CAClC,sCAAsC;CACtC,uCAAuC;CACvC,wCAAwC;CACxC,8BAA8B,CAC1B,SACA,QACJ;CACA,qCAAqC;CACrC,8BAA8B;CAC9B,yCAAyC,CACrC,SACA,EACI,UAAU,KACd,CACJ;CACA,2BAA2B;AAC/B;AAEA,MAAM,2BAA2B;CAC7B,uCAAuC;CACvC,iCAAiC;CACjC,4BAA4B;CAC5B,yBAAyB,CACrB,SACA,EACI,0BAA0B,KAC9B,CACJ;CACA,kCAAkC,CAC9B,OACJ;AACJ;AAEA,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
|
@@ -68,10 +68,7 @@ const RULES_UNICORN_SUSPICIOUS = {
|
|
|
68
68
|
"unicorn/no-accessor-recursion": "error",
|
|
69
69
|
"unicorn/no-array-reverse": "error",
|
|
70
70
|
"unicorn/no-array-sort": ["error", { allowExpressionStatement: true }],
|
|
71
|
-
"unicorn/no-instanceof-builtins": ["
|
|
72
|
-
strategy: "strict",
|
|
73
|
-
useErrorIsError: false
|
|
74
|
-
}]
|
|
71
|
+
"unicorn/no-instanceof-builtins": ["allow"]
|
|
75
72
|
};
|
|
76
73
|
const RULES_UNICORN = {
|
|
77
74
|
...RULES_UNICORN_PEDANTIC,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unicorn.mjs","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n \"unicorn/no-instanceof-builtins\": [\n \"
|
|
1
|
+
{"version":3,"file":"unicorn.mjs","names":[],"sources":["../../../../src/presets/common/rules/unicorn.ts"],"sourcesContent":["import type { LintRules } from \"#/@types/oxlint\";\n\nconst RULES_UNICORN_PEDANTIC = {\n \"unicorn/consistent-empty-array-spread\": \"error\",\n \"unicorn/explicit-length-check\": [\n \"error\",\n {\n \"non-zero\": \"greater-than\",\n },\n ],\n \"unicorn/new-for-builtins\": \"error\",\n \"unicorn/no-instanceof-array\": \"error\",\n \"unicorn/no-new-buffer\": \"error\",\n \"unicorn/no-unnecessary-array-flat-depth\": \"error\",\n \"unicorn/no-unnecessary-array-splice-count\": \"error\",\n \"unicorn/no-unnecessary-slice-end\": \"error\",\n \"unicorn/no-useless-promise-resolve-reject\": [\n \"error\",\n {\n allowReject: false,\n },\n ],\n \"unicorn/prefer-date-now\": \"error\",\n \"unicorn/prefer-math-min-max\": \"error\",\n \"unicorn/prefer-type-error\": \"error\",\n \"unicorn/require-number-to-fixed-digits-argument\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_RESTRICTION = {\n \"unicorn/no-length-as-slice-end\": \"error\",\n \"unicorn/prefer-node-protocol\": \"error\",\n \"unicorn/prefer-number-properties\": [\n \"error\",\n {\n checkInfinity: true,\n checkNaN: true,\n },\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_STYLE = {\n \"unicorn/consistent-date-clone\": \"error\",\n \"unicorn/consistent-existence-index-check\": \"error\",\n \"unicorn/empty-brace-spaces\": \"error\",\n \"unicorn/error-message\": \"error\",\n \"unicorn/no-array-method-this-argument\": \"error\",\n \"unicorn/no-unreadable-array-destructuring\": \"error\",\n \"unicorn/no-useless-collection-argument\": \"error\",\n \"unicorn/numeric-separators-style\": [\n \"error\",\n {\n binary: {\n groupLength: 3,\n minimumDigits: 5,\n },\n hexadecimal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n number: {\n groupLength: 3,\n minimumDigits: 5,\n },\n octal: {\n groupLength: 3,\n minimumDigits: 5,\n },\n onlyIfContainsSeparator: false,\n },\n ],\n \"unicorn/prefer-classlist-toggle\": \"error\",\n \"unicorn/prefer-dom-node-text-content\": \"error\",\n \"unicorn/prefer-global-this\": \"error\",\n \"unicorn/prefer-includes\": \"error\",\n \"unicorn/prefer-keyboard-event-key\": \"error\",\n \"unicorn/prefer-modern-dom-apis\": \"error\",\n \"unicorn/prefer-object-from-entries\": \"error\",\n \"unicorn/prefer-response-static-json\": \"error\",\n \"unicorn/prefer-string-trim-start-end\": \"error\",\n \"unicorn/relative-url-style\": [\n \"error\",\n \"always\",\n ],\n \"unicorn/require-module-attributes\": \"error\",\n \"unicorn/switch-case-braces\": \"error\",\n \"unicorn/text-encoding-identifier-case\": [\n \"error\",\n {\n withDash: true,\n },\n ],\n \"unicorn/throw-new-error\": \"error\",\n} as const satisfies LintRules;\n\nconst RULES_UNICORN_SUSPICIOUS = {\n \"unicorn/consistent-function-scoping\": \"error\",\n \"unicorn/no-accessor-recursion\": \"error\",\n \"unicorn/no-array-reverse\": \"error\",\n \"unicorn/no-array-sort\": [\n \"error\",\n {\n allowExpressionStatement: true,\n },\n ],\n \"unicorn/no-instanceof-builtins\": [\n \"allow\",\n ],\n} as const satisfies LintRules;\n\nconst RULES_UNICORN = {\n ...RULES_UNICORN_PEDANTIC,\n ...RULES_UNICORN_RESTRICTION,\n ...RULES_UNICORN_STYLE,\n ...RULES_UNICORN_SUSPICIOUS,\n} as const satisfies LintRules;\n\nexport {\n RULES_UNICORN,\n RULES_UNICORN_PEDANTIC,\n RULES_UNICORN_RESTRICTION,\n RULES_UNICORN_STYLE,\n RULES_UNICORN_SUSPICIOUS,\n};\n"],"mappings":"AAEA,MAAM,yBAAyB;CAC3B,yCAAyC;CACzC,iCAAiC,CAC7B,SACA,EACI,YAAY,eAChB,CACJ;CACA,4BAA4B;CAC5B,+BAA+B;CAC/B,yBAAyB;CACzB,2CAA2C;CAC3C,6CAA6C;CAC7C,oCAAoC;CACpC,6CAA6C,CACzC,SACA,EACI,aAAa,MACjB,CACJ;CACA,2BAA2B;CAC3B,+BAA+B;CAC/B,6BAA6B;CAC7B,mDAAmD;AACvD;AAEA,MAAM,4BAA4B;CAC9B,kCAAkC;CAClC,gCAAgC;CAChC,oCAAoC,CAChC,SACA;EACI,eAAe;EACf,UAAU;CACd,CACJ;AACJ;AAEA,MAAM,sBAAsB;CACxB,iCAAiC;CACjC,4CAA4C;CAC5C,8BAA8B;CAC9B,yBAAyB;CACzB,yCAAyC;CACzC,6CAA6C;CAC7C,0CAA0C;CAC1C,oCAAoC,CAChC,SACA;EACI,QAAQ;GACJ,aAAa;GACb,eAAe;EACnB;EACA,aAAa;GACT,aAAa;GACb,eAAe;EACnB;EACA,QAAQ;GACJ,aAAa;GACb,eAAe;EACnB;EACA,OAAO;GACH,aAAa;GACb,eAAe;EACnB;EACA,yBAAyB;CAC7B,CACJ;CACA,mCAAmC;CACnC,wCAAwC;CACxC,8BAA8B;CAC9B,2BAA2B;CAC3B,qCAAqC;CACrC,kCAAkC;CAClC,sCAAsC;CACtC,uCAAuC;CACvC,wCAAwC;CACxC,8BAA8B,CAC1B,SACA,QACJ;CACA,qCAAqC;CACrC,8BAA8B;CAC9B,yCAAyC,CACrC,SACA,EACI,UAAU,KACd,CACJ;CACA,2BAA2B;AAC/B;AAEA,MAAM,2BAA2B;CAC7B,uCAAuC;CACvC,iCAAiC;CACjC,4BAA4B;CAC5B,yBAAyB,CACrB,SACA,EACI,0BAA0B,KAC9B,CACJ;CACA,kCAAkC,CAC9B,OACJ;AACJ;AAEA,MAAM,gBAAgB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACP"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apst/oxlint",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "A shareable Oxlint configuration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oxlint",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"dist"
|
|
80
80
|
],
|
|
81
81
|
"dependencies": {
|
|
82
|
+
"@stylistic/eslint-plugin": "6.0.0-beta.4",
|
|
82
83
|
"es-toolkit": "^1.40.0",
|
|
83
|
-
"oxlint-tsgolint": "*",
|
|
84
84
|
"ts-vista": "~0.2.3"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|