@haltcase/style 8.0.0 → 8.0.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.
Files changed (75) hide show
  1. package/dist/.editorconfig +15 -0
  2. package/dist/editorconfig/index.d.ts +6 -0
  3. package/dist/editorconfig/index.js +8 -0
  4. package/dist/oxfmt/index.d.ts +8 -0
  5. package/dist/oxfmt/index.js +57 -0
  6. package/dist/oxlint/configs/base.d.ts +190 -0
  7. package/dist/oxlint/configs/base.js +39 -0
  8. package/dist/oxlint/configs/next.d.ts +25 -0
  9. package/dist/oxlint/configs/next.js +38 -0
  10. package/dist/oxlint/configs/node.d.ts +16 -0
  11. package/dist/oxlint/configs/node.js +11 -0
  12. package/dist/oxlint/configs/react.d.ts +7 -0
  13. package/dist/oxlint/configs/react.js +27 -0
  14. package/dist/oxlint/configs/tanstack-router.d.ts +22 -0
  15. package/dist/oxlint/configs/tanstack-router.js +22 -0
  16. package/dist/oxlint/configs/tanstack-start.d.ts +23 -0
  17. package/dist/oxlint/configs/tanstack-start.js +22 -0
  18. package/dist/oxlint/configs/testing.d.ts +16 -0
  19. package/dist/oxlint/configs/testing.js +11 -0
  20. package/dist/oxlint/configs/typescript.d.ts +77 -0
  21. package/dist/oxlint/configs/typescript.js +18 -0
  22. package/dist/oxlint/constants.d.ts +26 -0
  23. package/dist/oxlint/constants.js +37 -0
  24. package/dist/oxlint/index.d.ts +34 -0
  25. package/dist/oxlint/index.js +51 -0
  26. package/dist/oxlint/rules/best-practice.d.ts +181 -0
  27. package/dist/oxlint/rules/best-practice.js +177 -0
  28. package/dist/oxlint/rules/imports.d.ts +67 -0
  29. package/dist/oxlint/rules/imports.js +67 -0
  30. package/dist/oxlint/rules/jsx-a11y.d.ts +8 -0
  31. package/dist/oxlint/rules/jsx-a11y.js +6 -0
  32. package/dist/oxlint/rules/playwright-test.d.ts +25 -0
  33. package/dist/oxlint/rules/playwright-test.js +26 -0
  34. package/dist/oxlint/rules/possible-errors.d.ts +28 -0
  35. package/dist/oxlint/rules/possible-errors.js +29 -0
  36. package/dist/oxlint/rules/react-x.d.ts +38 -0
  37. package/dist/oxlint/rules/react-x.js +38 -0
  38. package/dist/oxlint/rules/react.d.ts +28 -0
  39. package/dist/oxlint/rules/react.js +20 -0
  40. package/dist/oxlint/rules/restriction.d.ts +22 -0
  41. package/dist/oxlint/rules/restriction.js +22 -0
  42. package/dist/oxlint/rules/stylistic-jsx.d.ts +15 -0
  43. package/dist/oxlint/rules/stylistic-jsx.js +15 -0
  44. package/dist/oxlint/rules/stylistic.d.ts +88 -0
  45. package/dist/oxlint/rules/stylistic.js +74 -0
  46. package/dist/oxlint/rules/typescript/declaration-files.d.ts +8 -0
  47. package/dist/oxlint/rules/typescript/declaration-files.js +6 -0
  48. package/dist/oxlint/rules/typescript/index.d.ts +107 -0
  49. package/dist/oxlint/rules/typescript/index.js +103 -0
  50. package/dist/oxlint/rules/variables.d.ts +25 -0
  51. package/dist/oxlint/rules/variables.js +26 -0
  52. package/dist/oxlint/utils/eslint-compat.d.ts +9 -0
  53. package/dist/oxlint/utils/eslint-compat.js +35 -0
  54. package/dist/stylelint/_base.d.ts +6 -0
  55. package/dist/stylelint/_base.js +40 -0
  56. package/dist/stylelint/index.d.ts +6 -0
  57. package/dist/stylelint/index.js +18 -0
  58. package/dist/stylelint/modules.d.ts +6 -0
  59. package/dist/stylelint/modules.js +19 -0
  60. package/dist/stylelint/standard.d.ts +4 -0
  61. package/dist/stylelint/standard.js +5 -0
  62. package/dist/stylelint/tailwind.d.ts +6 -0
  63. package/dist/stylelint/tailwind.js +11 -0
  64. package/dist/typescript/tsconfig.base.json +14 -0
  65. package/dist/typescript/tsconfig.bundler.json +17 -0
  66. package/dist/typescript/tsconfig.next.json +36 -0
  67. package/dist/typescript/tsconfig.node-ts.json +10 -0
  68. package/dist/typescript/tsconfig.node.json +4 -0
  69. package/dist/typescript/tsconfig.node22.json +12 -0
  70. package/dist/typescript/tsconfig.node24.json +12 -0
  71. package/dist/typescript/tsconfig.node26.json +11 -0
  72. package/dist/typescript/tsconfig.web.json +8 -0
  73. package/dist/vite-plus/index.d.ts +11 -0
  74. package/dist/vite-plus/index.js +16 -0
  75. package/package.json +2 -2
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_style = tab
7
+ insert_final_newline = true
8
+ trim_trailing_whitespace = true
9
+
10
+ [*.md]
11
+ trim_trailing_whitespace = false
12
+
13
+ [*.{yaml,yml}]
14
+ indent_size = 2
15
+ indent_style = space
@@ -0,0 +1,6 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ //#region src/editorconfig/index.d.ts
4
+ declare const getEditorconfig: () => string;
5
+ //#endregion
6
+ export { getEditorconfig };
@@ -0,0 +1,8 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { readFileSync } from "node:fs";
5
+ //#region src/editorconfig/index.ts
6
+ const getEditorconfig = () => readFileSync(new URL("../.editorconfig", import.meta.url), "utf8");
7
+ //#endregion
8
+ export { getEditorconfig };
@@ -0,0 +1,8 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { OxfmtConfig } from "oxfmt";
4
+ //#region src/oxfmt/index.d.ts
5
+ type OxfmtInputConfig = OxfmtConfig | ((defaults: OxfmtConfig) => OxfmtConfig);
6
+ declare const createOxfmtConfig: (options?: OxfmtInputConfig) => OxfmtConfig;
7
+ //#endregion
8
+ export { OxfmtInputConfig, createOxfmtConfig };
@@ -0,0 +1,57 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { toMerged } from "es-toolkit";
5
+ import { isPackageExists } from "local-pkg";
6
+ //#region src/oxfmt/index.ts
7
+ const defaults = {
8
+ arrowParens: "always",
9
+ bracketSameLine: true,
10
+ bracketSpacing: true,
11
+ embeddedLanguageFormatting: "auto",
12
+ endOfLine: "lf",
13
+ htmlWhitespaceSensitivity: "css",
14
+ ignorePatterns: [
15
+ ".agent/skills",
16
+ ".changeset",
17
+ "pnpm-lock.yaml",
18
+ "yarn.lock",
19
+ "package-lock.json"
20
+ ],
21
+ insertFinalNewline: true,
22
+ jsdoc: false,
23
+ jsxSingleQuote: false,
24
+ objectWrap: "preserve",
25
+ overrides: [],
26
+ printWidth: 100,
27
+ proseWrap: "always",
28
+ quoteProps: "as-needed",
29
+ semi: true,
30
+ singleAttributePerLine: false,
31
+ singleQuote: false,
32
+ sortImports: {},
33
+ sortPackageJson: { sortScripts: true },
34
+ sortTailwindcss: {
35
+ attributes: ["classNames"],
36
+ functions: [
37
+ "clsx",
38
+ "cn",
39
+ "cx",
40
+ "twMerge"
41
+ ]
42
+ },
43
+ svelte: false,
44
+ tabWidth: 2,
45
+ trailingComma: "none",
46
+ useTabs: true,
47
+ vueIndentScriptAndStyle: false
48
+ };
49
+ const createOxfmtConfig = (options = {}) => {
50
+ const defaultOptions = structuredClone(defaults);
51
+ if (isPackageExists("svelte")) defaultOptions.svelte = {};
52
+ if (isPackageExists("@tanstack/react-router")) defaultOptions.ignorePatterns.push("**/routeTree.gen.ts");
53
+ if (typeof options === "function") return options(defaultOptions);
54
+ return toMerged(defaultOptions, options);
55
+ };
56
+ //#endregion
57
+ export { createOxfmtConfig };
@@ -0,0 +1,190 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ //#region src/oxlint/configs/base.d.ts
4
+ declare const baseConfig: {
5
+ categories: {
6
+ correctness: "error";
7
+ suspicious: "error";
8
+ pedantic: "error";
9
+ perf: "error";
10
+ restriction: "error";
11
+ style: "error";
12
+ };
13
+ overrides: ({
14
+ files: string[];
15
+ rules: {
16
+ "import/no-default-export": "off";
17
+ "unicorn/no-process-exit"?: undefined;
18
+ };
19
+ } | {
20
+ files: string[];
21
+ rules: {
22
+ "unicorn/no-process-exit": "off";
23
+ "import/no-default-export"?: undefined;
24
+ };
25
+ })[];
26
+ plugins: ("eslint" | "unicorn" | "oxc" | "import" | "jsdoc" | "promise")[];
27
+ rules: {
28
+ "no-label-var": "error";
29
+ "no-unused-vars": ["error", {
30
+ args: "after-used";
31
+ argsIgnorePattern: string;
32
+ ignoreRestSiblings: true;
33
+ vars: "all";
34
+ varsIgnorePattern: string;
35
+ }];
36
+ "node/no-process-env": "off";
37
+ "oxc/no-async-await": "off";
38
+ "oxc/no-rest-spread-properties": "off";
39
+ "oxc/no-optional-chaining": "off";
40
+ complexity: ["error", {
41
+ max: number;
42
+ variant: "modified";
43
+ }];
44
+ "no-await-in-loop": "off";
45
+ "no-continue": "off";
46
+ "no-eq-null": "off";
47
+ "no-plusplus": "off";
48
+ "no-ternary": "off";
49
+ "no-undefined": "off";
50
+ "no-void": "off";
51
+ "func-names": ["error", "as-needed"];
52
+ "id-length": ["error", {
53
+ min: number;
54
+ properties: "never";
55
+ exceptions: string[];
56
+ }];
57
+ "max-depth": ["error", {
58
+ max: number;
59
+ }];
60
+ "max-lines": ["error", {
61
+ max: number;
62
+ }];
63
+ "max-lines-per-function": ["error", {
64
+ max: number;
65
+ skipComments: true;
66
+ skipBlankLines: true;
67
+ }];
68
+ "max-params": ["error", {
69
+ countThis: "never";
70
+ max: number;
71
+ }];
72
+ "max-statements": ["error", {
73
+ max: number;
74
+ }];
75
+ "new-cap": ["error", {
76
+ capIsNew: false;
77
+ }];
78
+ "no-array-constructor": "error";
79
+ "no-bitwise": "error";
80
+ "no-duplicate-imports": ["error", {
81
+ allowSeparateTypeImports: true;
82
+ }];
83
+ "no-lonely-if": "error";
84
+ "no-multi-assign": ["error"];
85
+ "no-unneeded-ternary": "error";
86
+ "prefer-arrow-callback": ["error", {
87
+ allowNamedFunctions: true;
88
+ }];
89
+ "prefer-object-spread": "error";
90
+ "unicorn/max-nested-calls": ["error", {
91
+ max: number;
92
+ }];
93
+ "unicorn/no-nested-ternary": "error";
94
+ "capitalized-comments": "off";
95
+ "init-declarations": "off";
96
+ "no-inline-comments": "off";
97
+ "no-magic-numbers": "off";
98
+ "no-nested-ternary": "off";
99
+ "sort-imports": "off";
100
+ "sort-keys": "off";
101
+ "sort-vars": "off";
102
+ "promise/prefer-await-to-callbacks": "off";
103
+ "unicorn/import-style": "off";
104
+ "unicorn/no-null": "off";
105
+ "no-console": "error";
106
+ "no-constant-binary-expression": "error";
107
+ "no-promise-executor-return": "error";
108
+ "no-template-curly-in-string": "error";
109
+ "no-unreachable-loop": "error";
110
+ "import/first": "error";
111
+ "import/max-dependencies": ["error", {
112
+ ignoreTypeImports: true;
113
+ max: number;
114
+ }];
115
+ "import/newline-after-import": ["error", {
116
+ considerComments: true;
117
+ count: number;
118
+ exactCount: true;
119
+ }];
120
+ "import/no-absolute-path": "error";
121
+ "import/no-cycle": "error";
122
+ "import/no-default-export": "error";
123
+ "import/no-duplicates": ["error", {
124
+ considerQueryString: true;
125
+ }];
126
+ "import/no-mutable-exports": "error";
127
+ "import/no-unassigned-import": ["error", {
128
+ allow: string[];
129
+ }];
130
+ "import/no-self-import": "error";
131
+ "import/group-exports": "off";
132
+ "import/exports-last": "off";
133
+ "import/no-anonymous-default-export": "off";
134
+ "import/no-named-export": "off";
135
+ "import/no-nodejs-modules": "off";
136
+ "import/no-relative-parent-imports": "off";
137
+ "import/prefer-default-export": "off";
138
+ "array-callback-return": ["error", {
139
+ allowImplicit: true;
140
+ }];
141
+ "block-scoped-var": "error";
142
+ curly: ["error", "multi-line"];
143
+ "default-case-last": "error";
144
+ "default-param-last": "error";
145
+ eqeqeq: ["error", "always", {
146
+ null: "ignore";
147
+ }];
148
+ "grouped-accessor-pairs": "error";
149
+ "no-alert": "error";
150
+ "no-caller": "error";
151
+ "no-constructor-return": "error";
152
+ "no-else-return": "error";
153
+ "no-eval": "error";
154
+ "no-extend-native": "error";
155
+ "no-extra-bind": "error";
156
+ "no-extra-label": "error";
157
+ "no-implicit-coercion": "error";
158
+ "no-implied-eval": "error";
159
+ "no-iterator": "error";
160
+ "no-labels": "error";
161
+ "no-lone-blocks": "error";
162
+ "no-loop-func": "error";
163
+ "no-new": "error";
164
+ "no-new-func": "error";
165
+ "no-new-wrappers": "error";
166
+ "no-param-reassign": "error";
167
+ "no-proto": "error";
168
+ "no-return-assign": "error";
169
+ "no-script-url": "error";
170
+ "no-self-compare": "error";
171
+ "no-sequences": "error";
172
+ "no-shadow": "error";
173
+ "no-useless-call": "error";
174
+ "no-useless-concat": "error";
175
+ "no-useless-constructor": "error";
176
+ "no-useless-return": "error";
177
+ "node/no-sync": ["error", {
178
+ ignores: string[];
179
+ }];
180
+ "prefer-named-capture-group": "error";
181
+ "prefer-promise-reject-errors": ["error", {
182
+ allowEmptyReject: true;
183
+ }];
184
+ "prefer-regex-literals": "error";
185
+ yoda: "error";
186
+ "require-unicode-regexp": "off";
187
+ };
188
+ }[];
189
+ //#endregion
190
+ export { baseConfig };
@@ -0,0 +1,39 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { configFiles, scriptFiles, sharedCategoryConfig } from "../constants.js";
5
+ import { bestPracticeRules } from "../rules/best-practice.js";
6
+ import { importRules } from "../rules/imports.js";
7
+ import { possibleErrorsRules } from "../rules/possible-errors.js";
8
+ import { restrictionRules } from "../rules/restriction.js";
9
+ import { stylisticRules } from "../rules/stylistic.js";
10
+ import { variablesRules } from "../rules/variables.js";
11
+ //#region src/oxlint/configs/base.ts
12
+ const baseConfig = [{
13
+ categories: { ...sharedCategoryConfig },
14
+ overrides: [{
15
+ files: configFiles,
16
+ rules: { "import/no-default-export": "off" }
17
+ }, {
18
+ files: scriptFiles,
19
+ rules: { "unicorn/no-process-exit": "off" }
20
+ }],
21
+ plugins: [
22
+ "eslint",
23
+ "oxc",
24
+ "import",
25
+ "jsdoc",
26
+ "promise",
27
+ "unicorn"
28
+ ],
29
+ rules: {
30
+ ...bestPracticeRules,
31
+ ...importRules,
32
+ ...possibleErrorsRules,
33
+ ...stylisticRules,
34
+ ...restrictionRules,
35
+ ...variablesRules
36
+ }
37
+ }];
38
+ //#endregion
39
+ export { baseConfig };
@@ -0,0 +1,25 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ //#region src/oxlint/configs/next.d.ts
4
+ declare const nextConfig: {
5
+ plugins: "nextjs"[];
6
+ categories: {
7
+ correctness: "error";
8
+ suspicious: "error";
9
+ pedantic: "error";
10
+ perf: "error";
11
+ restriction: "error";
12
+ style: "error";
13
+ };
14
+ overrides: {
15
+ files: string[];
16
+ rules: {
17
+ "import-x/no-default-export": "off";
18
+ "react/only-export-components": ["error", {
19
+ allowExportNames: string[];
20
+ }];
21
+ };
22
+ }[];
23
+ }[];
24
+ //#endregion
25
+ export { nextConfig };
@@ -0,0 +1,38 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { nextJsApiRouteFiles, nextJsMetadataFiles, nextJsPageFiles, sharedCategoryConfig } from "../constants.js";
5
+ //#region src/oxlint/configs/next.ts
6
+ const nextConfig = [{
7
+ plugins: ["nextjs"],
8
+ categories: { ...sharedCategoryConfig },
9
+ overrides: [{
10
+ files: [
11
+ ...nextJsApiRouteFiles,
12
+ ...nextJsMetadataFiles,
13
+ ...nextJsPageFiles
14
+ ],
15
+ rules: {
16
+ "import-x/no-default-export": "off",
17
+ "react/only-export-components": ["error", { allowExportNames: [
18
+ "experimental_ppr",
19
+ "dynamic",
20
+ "dynamicParams",
21
+ "revalidate",
22
+ "fetchCache",
23
+ "runtime",
24
+ "preferredRegion",
25
+ "maxDuration",
26
+ "metadata",
27
+ "generateMetadata",
28
+ "viewport",
29
+ "generateViewport",
30
+ "generateImageMetadata",
31
+ "generateSitemaps",
32
+ "generateStaticParams"
33
+ ] }]
34
+ }
35
+ }]
36
+ }];
37
+ //#endregion
38
+ export { nextConfig };
@@ -0,0 +1,16 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ //#region src/oxlint/configs/node.d.ts
4
+ declare const nodeConfig: {
5
+ plugins: "node"[];
6
+ categories: {
7
+ correctness: "error";
8
+ suspicious: "error";
9
+ pedantic: "error";
10
+ perf: "error";
11
+ restriction: "error";
12
+ style: "error";
13
+ };
14
+ }[];
15
+ //#endregion
16
+ export { nodeConfig };
@@ -0,0 +1,11 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { sharedCategoryConfig } from "../constants.js";
5
+ //#region src/oxlint/configs/node.ts
6
+ const nodeConfig = [{
7
+ plugins: ["node"],
8
+ categories: { ...sharedCategoryConfig }
9
+ }];
10
+ //#endregion
11
+ export { nodeConfig };
@@ -0,0 +1,7 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ import { OxlintConfig } from "oxlint";
4
+ //#region src/oxlint/configs/react.d.ts
5
+ declare const reactConfig: OxlintConfig[];
6
+ //#endregion
7
+ export { reactConfig };
@@ -0,0 +1,27 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { sharedCategoryConfig } from "../constants.js";
5
+ import { reactRules } from "../rules/react.js";
6
+ import { reactXRules } from "../rules/react-x.js";
7
+ import { resolveJsPlugin, resolveRuleMap } from "../utils/eslint-compat.js";
8
+ import reactXPlugin from "@eslint-react/eslint-plugin";
9
+ import effectPlugin from "eslint-plugin-react-you-might-not-need-an-effect";
10
+ //#region src/oxlint/configs/react.ts
11
+ const reactConfig = [{
12
+ plugins: [
13
+ "react",
14
+ "react-perf",
15
+ "jsx-a11y"
16
+ ],
17
+ categories: { ...sharedCategoryConfig },
18
+ jsPlugins: [resolveJsPlugin("@eslint-react", "@eslint-react/eslint-plugin"), resolveJsPlugin("eslint-plugin-react-you-might-not-need-an-effect")],
19
+ rules: {
20
+ ...resolveRuleMap(reactXPlugin.configs.strict.rules),
21
+ ...resolveRuleMap(effectPlugin.configs.strict.rules),
22
+ ...reactRules,
23
+ ...reactXRules
24
+ }
25
+ }];
26
+ //#endregion
27
+ export { reactConfig };
@@ -0,0 +1,22 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ //#region src/oxlint/configs/tanstack-router.d.ts
4
+ declare const tanstackRouterConfig: {
5
+ plugins: "eslint"[];
6
+ jsPlugins: import("oxlint").ExternalPluginEntry[];
7
+ categories: {
8
+ correctness: "error";
9
+ };
10
+ ignorePatterns: string[];
11
+ rules: {
12
+ "typescript/only-throw-error": ["error", {
13
+ allow: {
14
+ from: "package";
15
+ name: string;
16
+ package: string;
17
+ }[];
18
+ }];
19
+ };
20
+ }[];
21
+ //#endregion
22
+ export { tanstackRouterConfig };
@@ -0,0 +1,22 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { resolveJsPlugin } from "../utils/eslint-compat.js";
5
+ //#region src/oxlint/configs/tanstack-router.ts
6
+ const tanstackRouterConfig = [{
7
+ plugins: ["eslint"],
8
+ jsPlugins: [resolveJsPlugin("@tanstack/eslint-plugin-router")],
9
+ categories: { correctness: "error" },
10
+ ignorePatterns: ["**/routeTree.gen.ts"],
11
+ rules: { "typescript/only-throw-error": ["error", { allow: [{
12
+ from: "package",
13
+ name: "Redirect",
14
+ package: "@tanstack/router-core"
15
+ }, {
16
+ from: "package",
17
+ name: "NotFoundError",
18
+ package: "@tanstack/router-core"
19
+ }] }] }
20
+ }];
21
+ //#endregion
22
+ export { tanstackRouterConfig };
@@ -0,0 +1,23 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ //#region src/oxlint/configs/tanstack-start.d.ts
4
+ declare const tanstackStartConfig: {
5
+ categories: {
6
+ correctness: "error";
7
+ suspicious: "error";
8
+ pedantic: "error";
9
+ perf: "error";
10
+ restriction: "error";
11
+ style: "error";
12
+ };
13
+ overrides: {
14
+ files: string[];
15
+ rules: {
16
+ "react/only-export-components": ["error", {
17
+ customHOCs: string[];
18
+ }];
19
+ };
20
+ }[];
21
+ }[];
22
+ //#endregion
23
+ export { tanstackStartConfig };
@@ -0,0 +1,22 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { javascriptFiles, sharedCategoryConfig, typescriptFiles } from "../constants.js";
5
+ //#region src/oxlint/configs/tanstack-start.ts
6
+ const tanstackStartConfig = [{
7
+ categories: { ...sharedCategoryConfig },
8
+ overrides: [{
9
+ files: [...javascriptFiles, ...typescriptFiles],
10
+ rules: { "react/only-export-components": ["error", { customHOCs: [
11
+ "createFileRoute",
12
+ "createLazyFileRoute",
13
+ "createRootRoute",
14
+ "createRootRouteWithContext",
15
+ "createLink",
16
+ "createRoute",
17
+ "createLazyRoute"
18
+ ] }] }
19
+ }]
20
+ }];
21
+ //#endregion
22
+ export { tanstackStartConfig };
@@ -0,0 +1,16 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ //#region src/oxlint/configs/testing.d.ts
4
+ declare const testingConfig: {
5
+ plugins: "vitest"[];
6
+ categories: {
7
+ correctness: "error";
8
+ suspicious: "error";
9
+ pedantic: "error";
10
+ perf: "error";
11
+ restriction: "error";
12
+ style: "error";
13
+ };
14
+ }[];
15
+ //#endregion
16
+ export { testingConfig };
@@ -0,0 +1,11 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { sharedCategoryConfig } from "../constants.js";
5
+ //#region src/oxlint/configs/testing.ts
6
+ const testingConfig = [{
7
+ plugins: ["vitest"],
8
+ categories: { ...sharedCategoryConfig }
9
+ }];
10
+ //#endregion
11
+ export { testingConfig };
@@ -0,0 +1,77 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ //#region src/oxlint/configs/typescript.d.ts
4
+ declare const typescriptConfig: {
5
+ plugins: ("unicorn" | "typescript")[];
6
+ categories: {
7
+ correctness: "error";
8
+ suspicious: "error";
9
+ pedantic: "error";
10
+ perf: "error";
11
+ restriction: "error";
12
+ style: "error";
13
+ };
14
+ rules: {
15
+ "typescript/consistent-type-exports": "error";
16
+ "typescript/consistent-type-imports": "error";
17
+ "typescript/explicit-function-return-type": ["error", {
18
+ allowExpressions: true;
19
+ allowFunctionsWithoutTypeParameters: true;
20
+ allowTypedFunctionExpressions: true;
21
+ }];
22
+ "typescript/method-signature-style": ["error", "property"];
23
+ "typescript/no-confusing-void-expression": ["error", {
24
+ ignoreArrowShorthand: true;
25
+ }];
26
+ "typescript/no-empty-interface": ["error", {
27
+ allowSingleExtends: true;
28
+ }];
29
+ "typescript/no-empty-object-type": ["error", {
30
+ allowInterfaces: "with-single-extends";
31
+ allowWithName: string;
32
+ }];
33
+ "typescript/no-misused-promises": ["error", {
34
+ checksVoidReturn: false;
35
+ }];
36
+ "typescript/no-redundant-type-constituents": "error";
37
+ "typescript/no-unnecessary-qualifier": "error";
38
+ "typescript/prefer-nullish-coalescing": ["error", {
39
+ ignorePrimitives: {
40
+ number: true;
41
+ string: true;
42
+ };
43
+ }];
44
+ "typescript/prefer-regexp-exec": "error";
45
+ "typescript/restrict-template-expressions": ["error", {
46
+ allow: {
47
+ from: "lib";
48
+ name: string[];
49
+ }[];
50
+ allowBoolean: true;
51
+ allowNumber: true;
52
+ }];
53
+ "typescript/switch-exhaustiveness-check": "error";
54
+ "jsdoc/require-param": "off";
55
+ "jsdoc/require-param-type": "off";
56
+ "jsdoc/require-property": "off";
57
+ "jsdoc/require-returns": "off";
58
+ "jsdoc/require-returns-type": "off";
59
+ "require-await": "off";
60
+ "typescript/require-await": "off";
61
+ "typescript/consistent-return": "off";
62
+ "typescript/no-dynamic-delete": "off";
63
+ "typescript/no-unsafe-type-assertion": "off";
64
+ "typescript/prefer-readonly-parameter-types": "off";
65
+ "typescript/promise-function-async": "off";
66
+ "typescript/strict-boolean-expressions": "off";
67
+ "typescript/strict-void-return": "off";
68
+ };
69
+ overrides: {
70
+ files: string[];
71
+ rules: {
72
+ "import/unambiguous": "off";
73
+ };
74
+ }[];
75
+ }[];
76
+ //#endregion
77
+ export { typescriptConfig };