@haltcase/style 8.0.1 → 9.0.0-canary.1
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 +7 -3
- package/dist/editorconfig/index.d.ts +1 -4
- package/dist/editorconfig/index.js +1 -2
- package/dist/oxfmt/index.d.ts +2 -5
- package/dist/oxfmt/index.js +3 -2
- package/dist/oxfmt/utils.d.ts +3 -0
- package/dist/oxfmt/utils.js +4 -0
- package/dist/oxlint/configs/base.d.ts +431 -12
- package/dist/oxlint/configs/base.js +3 -2
- package/dist/oxlint/configs/next.d.ts +31 -11
- package/dist/oxlint/configs/next.js +7 -3
- package/dist/oxlint/configs/node.d.ts +19 -11
- package/dist/oxlint/configs/node.js +4 -3
- package/dist/oxlint/configs/react.d.ts +1 -4
- package/dist/oxlint/configs/react.js +6 -5
- package/dist/oxlint/configs/tanstack-router.d.ts +8 -6
- package/dist/oxlint/configs/tanstack-router.js +5 -5
- package/dist/oxlint/configs/tanstack-start.d.ts +8 -11
- package/dist/oxlint/configs/tanstack-start.js +1 -2
- package/dist/oxlint/configs/testing.d.ts +83 -11
- package/dist/oxlint/configs/testing.js +4 -3
- package/dist/oxlint/configs/typescript.d.ts +95 -11
- package/dist/oxlint/configs/typescript.js +2 -3
- package/dist/oxlint/constants.d.ts +21 -24
- package/dist/oxlint/constants.js +7 -8
- package/dist/oxlint/index.d.ts +4 -6
- package/dist/oxlint/index.js +1 -2
- package/dist/oxlint/rules/_next.d.ts +25 -0
- package/dist/oxlint/rules/_next.js +28 -0
- package/dist/oxlint/rules/_node.d.ts +13 -0
- package/dist/oxlint/rules/_node.js +16 -0
- package/dist/oxlint/rules/_testing.d.ts +77 -0
- package/dist/oxlint/rules/_testing.js +80 -0
- package/dist/oxlint/rules/_typescript-defaults.d.ts +113 -0
- package/dist/oxlint/rules/_typescript-defaults.js +116 -0
- package/dist/oxlint/rules/best-practice.d.ts +80 -5
- package/dist/oxlint/rules/best-practice.js +78 -1
- package/dist/oxlint/rules/imports.d.ts +16 -5
- package/dist/oxlint/rules/imports.js +14 -1
- package/dist/oxlint/rules/jsx-a11y.d.ts +38 -6
- package/dist/oxlint/rules/jsx-a11y.js +39 -2
- package/dist/oxlint/rules/playwright-test.d.ts +2 -5
- package/dist/oxlint/rules/playwright-test.js +1 -2
- package/dist/oxlint/rules/possible-errors.d.ts +114 -5
- package/dist/oxlint/rules/possible-errors.js +113 -2
- package/dist/oxlint/rules/react-x.d.ts +2 -5
- package/dist/oxlint/rules/react-x.js +0 -1
- package/dist/oxlint/rules/react.d.ts +78 -6
- package/dist/oxlint/rules/react.js +76 -2
- package/dist/oxlint/rules/restriction.d.ts +35 -5
- package/dist/oxlint/rules/restriction.js +34 -2
- package/dist/oxlint/rules/stylistic-jsx.d.ts +2 -5
- package/dist/oxlint/rules/stylistic-jsx.js +1 -2
- package/dist/oxlint/rules/stylistic.d.ts +78 -5
- package/dist/oxlint/rules/stylistic.js +76 -1
- package/dist/oxlint/rules/typescript/declaration-files.d.ts +2 -5
- package/dist/oxlint/rules/typescript/declaration-files.js +0 -1
- package/dist/oxlint/rules/typescript/index.d.ts +89 -5
- package/dist/oxlint/rules/typescript/index.js +87 -1
- package/dist/oxlint/rules/variables.d.ts +2 -5
- package/dist/oxlint/rules/variables.js +1 -2
- package/dist/oxlint/utils/eslint-compat.d.ts +3 -5
- package/dist/oxlint/utils/eslint-compat.js +1 -2
- package/dist/stylelint/_base.d.ts +1 -4
- package/dist/stylelint/_base.js +1 -2
- package/dist/stylelint/index.d.ts +0 -2
- package/dist/stylelint/index.js +1 -2
- package/dist/stylelint/modules.d.ts +0 -2
- package/dist/stylelint/modules.js +1 -2
- package/dist/stylelint/standard.js +1 -2
- package/dist/stylelint/tailwind.d.ts +0 -2
- package/dist/stylelint/tailwind.js +1 -2
- package/dist/vite-plus/index.d.ts +2 -4
- package/dist/vite-plus/index.js +1 -2
- package/package.json +38 -38
|
@@ -1,15 +1,37 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
|
|
4
|
-
declare const nextConfig: {
|
|
3
|
+
export declare const nextConfig: {
|
|
5
4
|
plugins: "nextjs"[];
|
|
5
|
+
rules: {
|
|
6
|
+
"nextjs/google-font-display": "error";
|
|
7
|
+
"nextjs/google-font-preconnect": "error";
|
|
8
|
+
"nextjs/inline-script-id": "error";
|
|
9
|
+
"nextjs/next-script-for-ga": "error";
|
|
10
|
+
"nextjs/no-assign-module-variable": "error";
|
|
11
|
+
"nextjs/no-async-client-component": "error";
|
|
12
|
+
"nextjs/no-before-interactive-script-outside-document": "error";
|
|
13
|
+
"nextjs/no-css-tags": "error";
|
|
14
|
+
"nextjs/no-document-import-in-page": "error";
|
|
15
|
+
"nextjs/no-duplicate-head": "error";
|
|
16
|
+
"nextjs/no-head-element": "error";
|
|
17
|
+
"nextjs/no-head-import-in-document": "error";
|
|
18
|
+
"nextjs/no-html-link-for-pages": "error";
|
|
19
|
+
"nextjs/no-img-element": "error";
|
|
20
|
+
"nextjs/no-page-custom-font": "error";
|
|
21
|
+
"nextjs/no-script-component-in-head": "error";
|
|
22
|
+
"nextjs/no-styled-jsx-in-document": "error";
|
|
23
|
+
"nextjs/no-sync-scripts": "error";
|
|
24
|
+
"nextjs/no-title-in-document-head": "error";
|
|
25
|
+
"nextjs/no-typos": "error";
|
|
26
|
+
"nextjs/no-unwanted-polyfillio": "error";
|
|
27
|
+
};
|
|
6
28
|
categories: {
|
|
7
|
-
correctness: "
|
|
8
|
-
suspicious: "
|
|
9
|
-
pedantic: "
|
|
10
|
-
perf: "
|
|
11
|
-
restriction: "
|
|
12
|
-
style: "
|
|
29
|
+
correctness: "off";
|
|
30
|
+
suspicious: "off";
|
|
31
|
+
pedantic: "off";
|
|
32
|
+
perf: "off";
|
|
33
|
+
restriction: "off";
|
|
34
|
+
style: "off";
|
|
13
35
|
};
|
|
14
36
|
overrides: {
|
|
15
37
|
files: string[];
|
|
@@ -20,6 +42,4 @@ declare const nextConfig: {
|
|
|
20
42
|
}];
|
|
21
43
|
};
|
|
22
44
|
}[];
|
|
23
|
-
}[];
|
|
24
|
-
//#endregion
|
|
25
|
-
export { nextConfig };
|
|
45
|
+
}[];
|
|
@@ -2,9 +2,11 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { nextJsApiRouteFiles, nextJsMetadataFiles, nextJsPageFiles, sharedCategoryConfig } from "../constants.js";
|
|
5
|
-
|
|
5
|
+
import { nextRules } from "../rules/_next.js";
|
|
6
|
+
// src/oxlint/configs/next.ts
|
|
6
7
|
const nextConfig = [{
|
|
7
8
|
plugins: ["nextjs"],
|
|
9
|
+
rules: { ...nextRules },
|
|
8
10
|
categories: { ...sharedCategoryConfig },
|
|
9
11
|
overrides: [{
|
|
10
12
|
files: [
|
|
@@ -29,10 +31,12 @@ const nextConfig = [{
|
|
|
29
31
|
"generateViewport",
|
|
30
32
|
"generateImageMetadata",
|
|
31
33
|
"generateSitemaps",
|
|
32
|
-
"generateStaticParams"
|
|
34
|
+
"generateStaticParams",
|
|
35
|
+
"instant",
|
|
36
|
+
"contentType",
|
|
37
|
+
"size"
|
|
33
38
|
] }]
|
|
34
39
|
}
|
|
35
40
|
}]
|
|
36
41
|
}];
|
|
37
|
-
//#endregion
|
|
38
42
|
export { nextConfig };
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
export declare const nodeConfig: {
|
|
4
|
+
rules: {
|
|
5
|
+
"node/callback-return": "error";
|
|
6
|
+
"node/exports-style": "error";
|
|
7
|
+
"node/global-require": "error";
|
|
8
|
+
"node/handle-callback-err": "error";
|
|
9
|
+
"node/no-exports-assign": "error";
|
|
10
|
+
"node/no-mixed-requires": "error";
|
|
11
|
+
"node/no-new-require": "error";
|
|
12
|
+
"node/no-path-concat": "error";
|
|
13
|
+
"node/no-top-level-await": "error";
|
|
14
|
+
};
|
|
5
15
|
plugins: "node"[];
|
|
6
16
|
categories: {
|
|
7
|
-
correctness: "
|
|
8
|
-
suspicious: "
|
|
9
|
-
pedantic: "
|
|
10
|
-
perf: "
|
|
11
|
-
restriction: "
|
|
12
|
-
style: "
|
|
17
|
+
correctness: "off";
|
|
18
|
+
suspicious: "off";
|
|
19
|
+
pedantic: "off";
|
|
20
|
+
perf: "off";
|
|
21
|
+
restriction: "off";
|
|
22
|
+
style: "off";
|
|
13
23
|
};
|
|
14
|
-
}[];
|
|
15
|
-
//#endregion
|
|
16
|
-
export { nodeConfig };
|
|
24
|
+
}[];
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { nodeRules } from "../rules/_node.js";
|
|
5
|
+
import { sharedCategoryConfig } from "@haltcase/style/oxlint/constants";
|
|
6
|
+
// src/oxlint/configs/node.ts
|
|
6
7
|
const nodeConfig = [{
|
|
8
|
+
rules: { ...nodeRules },
|
|
7
9
|
plugins: ["node"],
|
|
8
10
|
categories: { ...sharedCategoryConfig }
|
|
9
11
|
}];
|
|
10
|
-
//#endregion
|
|
11
12
|
export { nodeConfig };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { OxlintConfig } from "oxlint";
|
|
4
|
-
|
|
5
|
-
declare const reactConfig: OxlintConfig[];
|
|
6
|
-
//#endregion
|
|
7
|
-
export { reactConfig };
|
|
4
|
+
export declare const reactConfig: OxlintConfig[];
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import {
|
|
5
|
-
import { reactRules } from "../rules/react.js";
|
|
6
|
-
import { reactXRules } from "../rules/react-x.js";
|
|
4
|
+
import { jsxA11yRules } from "../rules/jsx-a11y.js";
|
|
7
5
|
import { resolveJsPlugin, resolveRuleMap } from "../utils/eslint-compat.js";
|
|
6
|
+
import { sharedCategoryConfig } from "@haltcase/style/oxlint/constants";
|
|
8
7
|
import reactXPlugin from "@eslint-react/eslint-plugin";
|
|
8
|
+
import { reactRules } from "@haltcase/style/oxlint/rules/react";
|
|
9
|
+
import { reactXRules } from "@haltcase/style/oxlint/rules/react-x";
|
|
9
10
|
import effectPlugin from "eslint-plugin-react-you-might-not-need-an-effect";
|
|
10
|
-
|
|
11
|
+
// src/oxlint/configs/react.ts
|
|
11
12
|
const reactConfig = [{
|
|
12
13
|
plugins: [
|
|
13
14
|
"react",
|
|
@@ -19,9 +20,9 @@ const reactConfig = [{
|
|
|
19
20
|
rules: {
|
|
20
21
|
...resolveRuleMap(reactXPlugin.configs.strict.rules),
|
|
21
22
|
...resolveRuleMap(effectPlugin.configs.strict.rules),
|
|
23
|
+
...jsxA11yRules,
|
|
22
24
|
...reactRules,
|
|
23
25
|
...reactXRules
|
|
24
26
|
}
|
|
25
27
|
}];
|
|
26
|
-
//#endregion
|
|
27
28
|
export { reactConfig };
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
|
|
4
|
-
declare const tanstackRouterConfig: {
|
|
3
|
+
export declare const tanstackRouterConfig: {
|
|
5
4
|
plugins: "eslint"[];
|
|
6
5
|
jsPlugins: import("oxlint").ExternalPluginEntry[];
|
|
7
6
|
categories: {
|
|
8
|
-
correctness: "
|
|
7
|
+
correctness: "off";
|
|
8
|
+
suspicious: "off";
|
|
9
|
+
pedantic: "off";
|
|
10
|
+
perf: "off";
|
|
11
|
+
restriction: "off";
|
|
12
|
+
style: "off";
|
|
9
13
|
};
|
|
10
14
|
ignorePatterns: string[];
|
|
11
15
|
rules: {
|
|
@@ -17,6 +21,4 @@ declare const tanstackRouterConfig: {
|
|
|
17
21
|
}[];
|
|
18
22
|
}];
|
|
19
23
|
};
|
|
20
|
-
}[];
|
|
21
|
-
//#endregion
|
|
22
|
-
export { tanstackRouterConfig };
|
|
24
|
+
}[];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { sharedCategoryConfig } from "../constants.js";
|
|
5
|
+
import { resolveJsPlugin } from "@haltcase/style/oxlint/utils/eslint-compat";
|
|
6
|
+
// src/oxlint/configs/tanstack-router.ts
|
|
6
7
|
const tanstackRouterConfig = [{
|
|
7
8
|
plugins: ["eslint"],
|
|
8
|
-
jsPlugins: [resolveJsPlugin("@tanstack/eslint-plugin-router")],
|
|
9
|
-
categories: {
|
|
9
|
+
jsPlugins: [resolveJsPlugin("@tanstack/router", "@tanstack/eslint-plugin-router")],
|
|
10
|
+
categories: { ...sharedCategoryConfig },
|
|
10
11
|
ignorePatterns: ["**/routeTree.gen.ts"],
|
|
11
12
|
rules: { "typescript/only-throw-error": ["error", { allow: [{
|
|
12
13
|
from: "package",
|
|
@@ -18,5 +19,4 @@ const tanstackRouterConfig = [{
|
|
|
18
19
|
package: "@tanstack/router-core"
|
|
19
20
|
}] }] }
|
|
20
21
|
}];
|
|
21
|
-
//#endregion
|
|
22
22
|
export { tanstackRouterConfig };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
|
|
4
|
-
declare const tanstackStartConfig: {
|
|
3
|
+
export declare const tanstackStartConfig: {
|
|
5
4
|
categories: {
|
|
6
|
-
correctness: "
|
|
7
|
-
suspicious: "
|
|
8
|
-
pedantic: "
|
|
9
|
-
perf: "
|
|
10
|
-
restriction: "
|
|
11
|
-
style: "
|
|
5
|
+
correctness: "off";
|
|
6
|
+
suspicious: "off";
|
|
7
|
+
pedantic: "off";
|
|
8
|
+
perf: "off";
|
|
9
|
+
restriction: "off";
|
|
10
|
+
style: "off";
|
|
12
11
|
};
|
|
13
12
|
overrides: {
|
|
14
13
|
files: string[];
|
|
@@ -18,6 +17,4 @@ declare const tanstackStartConfig: {
|
|
|
18
17
|
}];
|
|
19
18
|
};
|
|
20
19
|
}[];
|
|
21
|
-
}[];
|
|
22
|
-
//#endregion
|
|
23
|
-
export { tanstackStartConfig };
|
|
20
|
+
}[];
|
|
@@ -2,7 +2,7 @@ import "node:path";
|
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { javascriptFiles, sharedCategoryConfig, typescriptFiles } from "../constants.js";
|
|
5
|
-
|
|
5
|
+
// src/oxlint/configs/tanstack-start.ts
|
|
6
6
|
const tanstackStartConfig = [{
|
|
7
7
|
categories: { ...sharedCategoryConfig },
|
|
8
8
|
overrides: [{
|
|
@@ -18,5 +18,4 @@ const tanstackStartConfig = [{
|
|
|
18
18
|
] }] }
|
|
19
19
|
}]
|
|
20
20
|
}];
|
|
21
|
-
//#endregion
|
|
22
21
|
export { tanstackStartConfig };
|
|
@@ -1,16 +1,88 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
export declare const testingConfig: {
|
|
4
|
+
rules: {
|
|
5
|
+
"vitest/consistent-each-for": "error";
|
|
6
|
+
"vitest/consistent-test-filename": "error";
|
|
7
|
+
"vitest/consistent-test-it": "error";
|
|
8
|
+
"vitest/consistent-vitest-vi": "error";
|
|
9
|
+
"vitest/expect-expect": "error";
|
|
10
|
+
"vitest/hoisted-apis-on-top": "error";
|
|
11
|
+
"vitest/max-expects": "error";
|
|
12
|
+
"vitest/max-nested-describe": "error";
|
|
13
|
+
"vitest/no-alias-methods": "error";
|
|
14
|
+
"vitest/no-commented-out-tests": "error";
|
|
15
|
+
"vitest/no-conditional-expect": "error";
|
|
16
|
+
"vitest/no-conditional-in-test": "error";
|
|
17
|
+
"vitest/no-conditional-tests": "error";
|
|
18
|
+
"vitest/no-disabled-tests": "error";
|
|
19
|
+
"vitest/no-duplicate-hooks": "error";
|
|
20
|
+
"vitest/no-focused-tests": "error";
|
|
21
|
+
"vitest/no-hooks": "error";
|
|
22
|
+
"vitest/no-identical-title": "error";
|
|
23
|
+
"vitest/no-import-node-test": "error";
|
|
24
|
+
"vitest/no-importing-vitest-globals": "error";
|
|
25
|
+
"vitest/no-interpolation-in-snapshots": "error";
|
|
26
|
+
"vitest/no-large-snapshots": "error";
|
|
27
|
+
"vitest/no-mocks-import": "error";
|
|
28
|
+
"vitest/no-restricted-matchers": "error";
|
|
29
|
+
"vitest/no-restricted-vi-methods": "error";
|
|
30
|
+
"vitest/no-standalone-expect": "error";
|
|
31
|
+
"vitest/no-test-prefixes": "error";
|
|
32
|
+
"vitest/no-test-return-statement": "error";
|
|
33
|
+
"vitest/no-unneeded-async-expect-function": "error";
|
|
34
|
+
"vitest/padding-around-after-all-blocks": "error";
|
|
35
|
+
"vitest/padding-around-test-blocks": "error";
|
|
36
|
+
"vitest/prefer-called-exactly-once-with": "error";
|
|
37
|
+
"vitest/prefer-called-once": "error";
|
|
38
|
+
"vitest/prefer-called-times": "error";
|
|
39
|
+
"vitest/prefer-called-with": "error";
|
|
40
|
+
"vitest/prefer-comparison-matcher": "error";
|
|
41
|
+
"vitest/prefer-describe-function-title": "error";
|
|
42
|
+
"vitest/prefer-each": "error";
|
|
43
|
+
"vitest/prefer-equality-matcher": "error";
|
|
44
|
+
"vitest/prefer-expect-assertions": "error";
|
|
45
|
+
"vitest/prefer-expect-resolves": "error";
|
|
46
|
+
"vitest/prefer-expect-type-of": "error";
|
|
47
|
+
"vitest/prefer-hooks-in-order": "error";
|
|
48
|
+
"vitest/prefer-hooks-on-top": "error";
|
|
49
|
+
"vitest/prefer-import-in-mock": "error";
|
|
50
|
+
"vitest/prefer-importing-vitest-globals": "error";
|
|
51
|
+
"vitest/prefer-lowercase-title": "error";
|
|
52
|
+
"vitest/prefer-mock-promise-shorthand": "error";
|
|
53
|
+
"vitest/prefer-mock-return-shorthand": "error";
|
|
54
|
+
"vitest/prefer-snapshot-hint": "error";
|
|
55
|
+
"vitest/prefer-spy-on": "error";
|
|
56
|
+
"vitest/prefer-strict-boolean-matchers": "error";
|
|
57
|
+
"vitest/prefer-strict-equal": "error";
|
|
58
|
+
"vitest/prefer-to-be": "error";
|
|
59
|
+
"vitest/prefer-to-be-falsy": "error";
|
|
60
|
+
"vitest/prefer-to-be-object": "error";
|
|
61
|
+
"vitest/prefer-to-be-truthy": "error";
|
|
62
|
+
"vitest/prefer-to-contain": "error";
|
|
63
|
+
"vitest/prefer-to-have-been-called-times": "error";
|
|
64
|
+
"vitest/prefer-to-have-length": "error";
|
|
65
|
+
"vitest/prefer-todo": "error";
|
|
66
|
+
"vitest/require-awaited-expect-poll": "error";
|
|
67
|
+
"vitest/require-hook": "error";
|
|
68
|
+
"vitest/require-local-test-context-for-concurrent-snapshots": "error";
|
|
69
|
+
"vitest/require-mock-type-parameters": "error";
|
|
70
|
+
"vitest/require-test-timeout": "error";
|
|
71
|
+
"vitest/require-to-throw-message": "error";
|
|
72
|
+
"vitest/require-top-level-describe": "error";
|
|
73
|
+
"vitest/valid-describe-callback": "error";
|
|
74
|
+
"vitest/valid-expect": "error";
|
|
75
|
+
"vitest/valid-expect-in-promise": "error";
|
|
76
|
+
"vitest/valid-title": "error";
|
|
77
|
+
"vitest/warn-todo": "error";
|
|
78
|
+
};
|
|
5
79
|
plugins: "vitest"[];
|
|
6
80
|
categories: {
|
|
7
|
-
correctness: "
|
|
8
|
-
suspicious: "
|
|
9
|
-
pedantic: "
|
|
10
|
-
perf: "
|
|
11
|
-
restriction: "
|
|
12
|
-
style: "
|
|
81
|
+
correctness: "off";
|
|
82
|
+
suspicious: "off";
|
|
83
|
+
pedantic: "off";
|
|
84
|
+
perf: "off";
|
|
85
|
+
restriction: "off";
|
|
86
|
+
style: "off";
|
|
13
87
|
};
|
|
14
|
-
}[];
|
|
15
|
-
//#endregion
|
|
16
|
-
export { testingConfig };
|
|
88
|
+
}[];
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { testingRules } from "../rules/_testing.js";
|
|
5
|
+
import { sharedCategoryConfig } from "@haltcase/style/oxlint/constants";
|
|
6
|
+
// src/oxlint/configs/testing.ts
|
|
6
7
|
const testingConfig = [{
|
|
8
|
+
rules: { ...testingRules },
|
|
7
9
|
plugins: ["vitest"],
|
|
8
10
|
categories: { ...sharedCategoryConfig }
|
|
9
11
|
}];
|
|
10
|
-
//#endregion
|
|
11
12
|
export { testingConfig };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
|
|
4
|
-
declare const typescriptConfig: {
|
|
3
|
+
export declare const typescriptConfig: {
|
|
5
4
|
plugins: ("unicorn" | "typescript")[];
|
|
6
5
|
categories: {
|
|
7
|
-
correctness: "
|
|
8
|
-
suspicious: "
|
|
9
|
-
pedantic: "
|
|
10
|
-
perf: "
|
|
11
|
-
restriction: "
|
|
12
|
-
style: "
|
|
6
|
+
correctness: "off";
|
|
7
|
+
suspicious: "off";
|
|
8
|
+
pedantic: "off";
|
|
9
|
+
perf: "off";
|
|
10
|
+
restriction: "off";
|
|
11
|
+
style: "off";
|
|
13
12
|
};
|
|
14
13
|
rules: {
|
|
15
14
|
"typescript/consistent-type-exports": "error";
|
|
@@ -65,6 +64,93 @@ declare const typescriptConfig: {
|
|
|
65
64
|
"typescript/promise-function-async": "off";
|
|
66
65
|
"typescript/strict-boolean-expressions": "off";
|
|
67
66
|
"typescript/strict-void-return": "off";
|
|
67
|
+
"typescript/adjacent-overload-signatures": "error";
|
|
68
|
+
"typescript/array-type": "error";
|
|
69
|
+
"typescript/await-thenable": "error";
|
|
70
|
+
"typescript/ban-ts-comment": "error";
|
|
71
|
+
"typescript/ban-tslint-comment": "error";
|
|
72
|
+
"typescript/ban-types": "error";
|
|
73
|
+
"typescript/class-literal-property-style": "error";
|
|
74
|
+
"typescript/consistent-generic-constructors": "error";
|
|
75
|
+
"typescript/consistent-indexed-object-style": "error";
|
|
76
|
+
"typescript/consistent-type-assertions": "error";
|
|
77
|
+
"typescript/consistent-type-definitions": "error";
|
|
78
|
+
"typescript/dot-notation": "error";
|
|
79
|
+
"typescript/explicit-member-accessibility": "error";
|
|
80
|
+
"typescript/explicit-module-boundary-types": "error";
|
|
81
|
+
"typescript/no-array-delete": "error";
|
|
82
|
+
"typescript/no-base-to-string": "error";
|
|
83
|
+
"typescript/no-confusing-non-null-assertion": "error";
|
|
84
|
+
"typescript/no-deprecated": "error";
|
|
85
|
+
"typescript/no-duplicate-enum-values": "error";
|
|
86
|
+
"typescript/no-duplicate-type-constituents": "error";
|
|
87
|
+
"typescript/no-explicit-any": "error";
|
|
88
|
+
"typescript/no-extra-non-null-assertion": "error";
|
|
89
|
+
"typescript/no-extraneous-class": "error";
|
|
90
|
+
"typescript/no-floating-promises": "error";
|
|
91
|
+
"typescript/no-for-in-array": "error";
|
|
92
|
+
"typescript/no-generated-empty-object-type": "error";
|
|
93
|
+
"typescript/no-implied-eval": "error";
|
|
94
|
+
"typescript/no-import-type-side-effects": "error";
|
|
95
|
+
"typescript/no-inferrable-types": "error";
|
|
96
|
+
"typescript/no-invalid-void-type": "error";
|
|
97
|
+
"typescript/no-meaningless-void-operator": "error";
|
|
98
|
+
"typescript/no-misused-new": "error";
|
|
99
|
+
"typescript/no-misused-spread": "error";
|
|
100
|
+
"typescript/no-mixed-enums": "error";
|
|
101
|
+
"typescript/no-namespace": "error";
|
|
102
|
+
"typescript/no-non-null-asserted-nullish-coalescing": "error";
|
|
103
|
+
"typescript/no-non-null-asserted-optional-chain": "error";
|
|
104
|
+
"typescript/no-non-null-assertion": "error";
|
|
105
|
+
"typescript/no-require-imports": "error";
|
|
106
|
+
"typescript/no-restricted-types": "error";
|
|
107
|
+
"typescript/no-this-alias": "error";
|
|
108
|
+
"typescript/no-unnecessary-boolean-literal-compare": "error";
|
|
109
|
+
"typescript/no-unnecessary-parameter-property-assignment": "error";
|
|
110
|
+
"typescript/no-unnecessary-template-expression": "error";
|
|
111
|
+
"typescript/no-unnecessary-type-arguments": "error";
|
|
112
|
+
"typescript/no-unnecessary-type-assertion": "error";
|
|
113
|
+
"typescript/no-unnecessary-type-constraint": "error";
|
|
114
|
+
"typescript/no-unnecessary-type-conversion": "error";
|
|
115
|
+
"typescript/no-unnecessary-type-parameters": "error";
|
|
116
|
+
"typescript/no-unsafe-argument": "error";
|
|
117
|
+
"typescript/no-unsafe-assignment": "error";
|
|
118
|
+
"typescript/no-unsafe-call": "error";
|
|
119
|
+
"typescript/no-unsafe-declaration-merging": "error";
|
|
120
|
+
"typescript/no-unsafe-enum-comparison": "error";
|
|
121
|
+
"typescript/no-unsafe-function-type": "error";
|
|
122
|
+
"typescript/no-unsafe-member-access": "error";
|
|
123
|
+
"typescript/no-unsafe-return": "error";
|
|
124
|
+
"typescript/no-unsafe-unary-minus": "error";
|
|
125
|
+
"typescript/no-useless-default-assignment": "error";
|
|
126
|
+
"typescript/no-useless-empty-export": "error";
|
|
127
|
+
"typescript/no-var-requires": "error";
|
|
128
|
+
"typescript/no-wrapper-object-types": "error";
|
|
129
|
+
"typescript/non-nullable-type-assertion-style": "error";
|
|
130
|
+
"typescript/only-throw-error": "error";
|
|
131
|
+
"typescript/parameter-properties": "error";
|
|
132
|
+
"typescript/prefer-as-const": "error";
|
|
133
|
+
"typescript/prefer-enum-initializers": "error";
|
|
134
|
+
"typescript/prefer-find": "error";
|
|
135
|
+
"typescript/prefer-for-of": "error";
|
|
136
|
+
"typescript/prefer-function-type": "error";
|
|
137
|
+
"typescript/prefer-includes": "error";
|
|
138
|
+
"typescript/prefer-literal-enum-member": "error";
|
|
139
|
+
"typescript/prefer-namespace-keyword": "error";
|
|
140
|
+
"typescript/prefer-promise-reject-errors": "error";
|
|
141
|
+
"typescript/prefer-readonly": "error";
|
|
142
|
+
"typescript/prefer-reduce-type-parameter": "error";
|
|
143
|
+
"typescript/prefer-return-this-type": "error";
|
|
144
|
+
"typescript/prefer-string-starts-ends-with": "error";
|
|
145
|
+
"typescript/prefer-ts-expect-error": "error";
|
|
146
|
+
"typescript/related-getter-setter-pairs": "error";
|
|
147
|
+
"typescript/require-array-sort-compare": "error";
|
|
148
|
+
"typescript/restrict-plus-operands": "error";
|
|
149
|
+
"typescript/return-await": "error";
|
|
150
|
+
"typescript/triple-slash-reference": "error";
|
|
151
|
+
"typescript/unbound-method": "error";
|
|
152
|
+
"typescript/unified-signatures": "error";
|
|
153
|
+
"typescript/use-unknown-in-catch-callback-variable": "error";
|
|
68
154
|
};
|
|
69
155
|
overrides: {
|
|
70
156
|
files: string[];
|
|
@@ -72,6 +158,4 @@ declare const typescriptConfig: {
|
|
|
72
158
|
"import/unambiguous": "off";
|
|
73
159
|
};
|
|
74
160
|
}[];
|
|
75
|
-
}[];
|
|
76
|
-
//#endregion
|
|
77
|
-
export { typescriptConfig };
|
|
161
|
+
}[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
import { sharedCategoryConfig } from "../constants.js";
|
|
5
4
|
import { typescriptDeclarationFilesRules } from "../rules/typescript/declaration-files.js";
|
|
6
5
|
import { typescriptBaseRules } from "../rules/typescript/index.js";
|
|
7
|
-
|
|
6
|
+
import { sharedCategoryConfig } from "@haltcase/style/oxlint/constants";
|
|
7
|
+
// src/oxlint/configs/typescript.ts
|
|
8
8
|
const typescriptConfig = [{
|
|
9
9
|
plugins: ["typescript", "unicorn"],
|
|
10
10
|
categories: { ...sharedCategoryConfig },
|
|
@@ -14,5 +14,4 @@ const typescriptConfig = [{
|
|
|
14
14
|
rules: { ...typescriptDeclarationFilesRules }
|
|
15
15
|
}]
|
|
16
16
|
}];
|
|
17
|
-
//#endregion
|
|
18
17
|
export { typescriptConfig };
|
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
|
|
4
|
-
declare const
|
|
5
|
-
declare const
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
declare const
|
|
11
|
-
declare const
|
|
12
|
-
declare const
|
|
13
|
-
declare const
|
|
14
|
-
declare const
|
|
15
|
-
declare const
|
|
16
|
-
declare const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
//#endregion
|
|
26
|
-
export { allSupportedFiles, commonJsFiles, commonJsOnlyFiles, configFiles, javascriptFiles, javascriptJsxFiles, jsxFiles, nextJsApiRouteFiles, nextJsMetadataFiles, nextJsPageFiles, scriptFiles, sharedCategoryConfig, typescriptFiles, typescriptJsxFiles };
|
|
3
|
+
export declare const commonJsOnlyFiles: string[];
|
|
4
|
+
export declare const commonJsFiles: string[];
|
|
5
|
+
export declare const javascriptFiles: string[];
|
|
6
|
+
export declare const typescriptFiles: string[];
|
|
7
|
+
export declare const javascriptJsxFiles: string[];
|
|
8
|
+
export declare const typescriptJsxFiles: string[];
|
|
9
|
+
export declare const jsxFiles: string[];
|
|
10
|
+
export declare const configFiles: string[];
|
|
11
|
+
export declare const scriptFiles: string[];
|
|
12
|
+
export declare const nextJsPageFiles: string[];
|
|
13
|
+
export declare const nextJsApiRouteFiles: string[];
|
|
14
|
+
export declare const nextJsMetadataFiles: string[];
|
|
15
|
+
export declare const allSupportedFiles: string[];
|
|
16
|
+
export declare const sharedCategoryConfig: {
|
|
17
|
+
correctness: "off";
|
|
18
|
+
suspicious: "off";
|
|
19
|
+
pedantic: "off";
|
|
20
|
+
perf: "off";
|
|
21
|
+
restriction: "off";
|
|
22
|
+
style: "off";
|
|
23
|
+
};
|
package/dist/oxlint/constants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "node:path";
|
|
2
2
|
import "node:url";
|
|
3
3
|
import.meta.url;
|
|
4
|
-
|
|
4
|
+
// src/oxlint/constants.ts
|
|
5
5
|
const commonJsOnlyFiles = ["**/*.cjs"];
|
|
6
6
|
const commonJsFiles = ["**/*.{c,}js"];
|
|
7
7
|
const javascriptFiles = ["**/*.{m,}js{x,}"];
|
|
@@ -26,12 +26,11 @@ const nextJsMetadataFiles = [
|
|
|
26
26
|
];
|
|
27
27
|
const allSupportedFiles = ["**/*.{c,m,}{js,ts}{x,}"];
|
|
28
28
|
const sharedCategoryConfig = {
|
|
29
|
-
correctness: "
|
|
30
|
-
suspicious: "
|
|
31
|
-
pedantic: "
|
|
32
|
-
perf: "
|
|
33
|
-
restriction: "
|
|
34
|
-
style: "
|
|
29
|
+
correctness: "off",
|
|
30
|
+
suspicious: "off",
|
|
31
|
+
pedantic: "off",
|
|
32
|
+
perf: "off",
|
|
33
|
+
restriction: "off",
|
|
34
|
+
style: "off"
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
export { allSupportedFiles, commonJsFiles, commonJsOnlyFiles, configFiles, javascriptFiles, javascriptJsxFiles, jsxFiles, nextJsApiRouteFiles, nextJsMetadataFiles, nextJsPageFiles, scriptFiles, sharedCategoryConfig, typescriptFiles, typescriptJsxFiles };
|
package/dist/oxlint/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { OxlintConfig, OxlintOverride } from "oxlint";
|
|
4
|
-
|
|
5
|
-
declare const tanstackPackages: readonly ["@tanstack/react-router", "@tanstack/react-start", "@tanstack/eslint-plugin-router"];
|
|
4
|
+
export declare const tanstackPackages: readonly ["@tanstack/react-router", "@tanstack/react-start", "@tanstack/eslint-plugin-router"];
|
|
6
5
|
type OxlintPassthroughOptions = Omit<OxlintConfig, "overrides">;
|
|
7
|
-
interface CreateOxlintConfigOptions extends OxlintPassthroughOptions {
|
|
6
|
+
export interface CreateOxlintConfigOptions extends OxlintPassthroughOptions {
|
|
8
7
|
typescript?: boolean;
|
|
9
8
|
react?: boolean;
|
|
10
9
|
/**
|
|
@@ -29,6 +28,5 @@ interface CreateOxlintConfigOptions extends OxlintPassthroughOptions {
|
|
|
29
28
|
*/
|
|
30
29
|
overrides?: OxlintOverride[];
|
|
31
30
|
}
|
|
32
|
-
declare const createOxlintConfig: (options?: CreateOxlintConfigOptions) => OxlintConfig;
|
|
33
|
-
|
|
34
|
-
export { CreateOxlintConfigOptions, createOxlintConfig, tanstackPackages };
|
|
31
|
+
export declare const createOxlintConfig: (options?: CreateOxlintConfigOptions) => OxlintConfig;
|
|
32
|
+
export {};
|
package/dist/oxlint/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { tanstackStartConfig } from "./configs/tanstack-start.js";
|
|
|
10
10
|
import { testingConfig } from "./configs/testing.js";
|
|
11
11
|
import { typescriptConfig } from "./configs/typescript.js";
|
|
12
12
|
import { isPackageExists } from "local-pkg";
|
|
13
|
-
|
|
13
|
+
// src/oxlint/index.ts
|
|
14
14
|
const reactPackages = [
|
|
15
15
|
"react",
|
|
16
16
|
"react-dom",
|
|
@@ -47,5 +47,4 @@ const createOxlintConfig = (options = {}) => {
|
|
|
47
47
|
settings
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
-
//#endregion
|
|
51
50
|
export { createOxlintConfig, tanstackPackages };
|