@haltcase/style 8.0.0 → 8.0.1-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/dist/.editorconfig +15 -0
- package/dist/editorconfig/index.d.ts +6 -0
- package/dist/editorconfig/index.js +8 -0
- package/dist/oxfmt/index.d.ts +8 -0
- package/dist/oxfmt/index.js +57 -0
- package/dist/oxlint/configs/base.d.ts +190 -0
- package/dist/oxlint/configs/base.js +39 -0
- package/dist/oxlint/configs/next.d.ts +25 -0
- package/dist/oxlint/configs/next.js +38 -0
- package/dist/oxlint/configs/node.d.ts +16 -0
- package/dist/oxlint/configs/node.js +11 -0
- package/dist/oxlint/configs/react.d.ts +7 -0
- package/dist/oxlint/configs/react.js +27 -0
- package/dist/oxlint/configs/tanstack-router.d.ts +22 -0
- package/dist/oxlint/configs/tanstack-router.js +22 -0
- package/dist/oxlint/configs/tanstack-start.d.ts +23 -0
- package/dist/oxlint/configs/tanstack-start.js +22 -0
- package/dist/oxlint/configs/testing.d.ts +16 -0
- package/dist/oxlint/configs/testing.js +11 -0
- package/dist/oxlint/configs/typescript.d.ts +77 -0
- package/dist/oxlint/configs/typescript.js +18 -0
- package/dist/oxlint/constants.d.ts +26 -0
- package/dist/oxlint/constants.js +37 -0
- package/dist/oxlint/index.d.ts +34 -0
- package/dist/oxlint/index.js +51 -0
- package/dist/oxlint/rules/best-practice.d.ts +181 -0
- package/dist/oxlint/rules/best-practice.js +177 -0
- package/dist/oxlint/rules/imports.d.ts +67 -0
- package/dist/oxlint/rules/imports.js +67 -0
- package/dist/oxlint/rules/jsx-a11y.d.ts +8 -0
- package/dist/oxlint/rules/jsx-a11y.js +6 -0
- package/dist/oxlint/rules/playwright-test.d.ts +25 -0
- package/dist/oxlint/rules/playwright-test.js +26 -0
- package/dist/oxlint/rules/possible-errors.d.ts +28 -0
- package/dist/oxlint/rules/possible-errors.js +29 -0
- package/dist/oxlint/rules/react-x.d.ts +38 -0
- package/dist/oxlint/rules/react-x.js +38 -0
- package/dist/oxlint/rules/react.d.ts +28 -0
- package/dist/oxlint/rules/react.js +20 -0
- package/dist/oxlint/rules/restriction.d.ts +22 -0
- package/dist/oxlint/rules/restriction.js +22 -0
- package/dist/oxlint/rules/stylistic-jsx.d.ts +15 -0
- package/dist/oxlint/rules/stylistic-jsx.js +15 -0
- package/dist/oxlint/rules/stylistic.d.ts +88 -0
- package/dist/oxlint/rules/stylistic.js +74 -0
- package/dist/oxlint/rules/typescript/declaration-files.d.ts +8 -0
- package/dist/oxlint/rules/typescript/declaration-files.js +6 -0
- package/dist/oxlint/rules/typescript/index.d.ts +107 -0
- package/dist/oxlint/rules/typescript/index.js +103 -0
- package/dist/oxlint/rules/variables.d.ts +25 -0
- package/dist/oxlint/rules/variables.js +26 -0
- package/dist/oxlint/utils/eslint-compat.d.ts +9 -0
- package/dist/oxlint/utils/eslint-compat.js +35 -0
- package/dist/stylelint/_base.d.ts +6 -0
- package/dist/stylelint/_base.js +40 -0
- package/dist/stylelint/index.d.ts +6 -0
- package/dist/stylelint/index.js +18 -0
- package/dist/stylelint/modules.d.ts +6 -0
- package/dist/stylelint/modules.js +19 -0
- package/dist/stylelint/standard.d.ts +4 -0
- package/dist/stylelint/standard.js +5 -0
- package/dist/stylelint/tailwind.d.ts +6 -0
- package/dist/stylelint/tailwind.js +11 -0
- package/dist/typescript/tsconfig.base.json +14 -0
- package/dist/typescript/tsconfig.bundler.json +17 -0
- package/dist/typescript/tsconfig.next.json +36 -0
- package/dist/typescript/tsconfig.node-ts.json +10 -0
- package/dist/typescript/tsconfig.node.json +4 -0
- package/dist/typescript/tsconfig.node22.json +12 -0
- package/dist/typescript/tsconfig.node24.json +12 -0
- package/dist/typescript/tsconfig.node26.json +11 -0
- package/dist/typescript/tsconfig.web.json +8 -0
- package/dist/vite-plus/index.d.ts +11 -0
- package/dist/vite-plus/index.js +16 -0
- package/package.json +2 -2
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
const typescriptBaseRules = {
|
|
5
|
+
"jsdoc/require-param": "off",
|
|
6
|
+
"jsdoc/require-param-type": "off",
|
|
7
|
+
"jsdoc/require-property": "off",
|
|
8
|
+
"jsdoc/require-returns": "off",
|
|
9
|
+
"jsdoc/require-returns-type": "off",
|
|
10
|
+
"require-await": "off",
|
|
11
|
+
"typescript/require-await": "off",
|
|
12
|
+
"typescript/consistent-return": "off",
|
|
13
|
+
"typescript/no-dynamic-delete": "off",
|
|
14
|
+
"typescript/no-unsafe-type-assertion": "off",
|
|
15
|
+
"typescript/prefer-readonly-parameter-types": "off",
|
|
16
|
+
"typescript/promise-function-async": "off",
|
|
17
|
+
"typescript/strict-boolean-expressions": "off",
|
|
18
|
+
"typescript/strict-void-return": "off",
|
|
19
|
+
/**
|
|
20
|
+
* Require consistent usage of type exports.
|
|
21
|
+
*/
|
|
22
|
+
"typescript/consistent-type-exports": "error",
|
|
23
|
+
/**
|
|
24
|
+
* Require consistent usage of type imports.
|
|
25
|
+
*/
|
|
26
|
+
"typescript/consistent-type-imports": "error",
|
|
27
|
+
/**
|
|
28
|
+
* Require explicit return types on functions and class methods.
|
|
29
|
+
*/
|
|
30
|
+
"typescript/explicit-function-return-type": ["error", {
|
|
31
|
+
allowExpressions: true,
|
|
32
|
+
allowFunctionsWithoutTypeParameters: true,
|
|
33
|
+
allowTypedFunctionExpressions: true
|
|
34
|
+
}],
|
|
35
|
+
/**
|
|
36
|
+
* Require using function property types in method signatures.
|
|
37
|
+
*
|
|
38
|
+
* These have enhanced typechecking, whereas method signatures do not.
|
|
39
|
+
*/
|
|
40
|
+
"typescript/method-signature-style": ["error", "property"],
|
|
41
|
+
/**
|
|
42
|
+
* Prevent `void` type expressions from being used in misleading locations
|
|
43
|
+
* such as being assigned to a variable, provided as a function argument,
|
|
44
|
+
* or returned from a function (except concise arrow functions).
|
|
45
|
+
*/
|
|
46
|
+
"typescript/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
|
|
47
|
+
"typescript/no-empty-interface": ["error", { allowSingleExtends: true }],
|
|
48
|
+
/**
|
|
49
|
+
* Disallow accidentally using the "empty object" type (`{}`).
|
|
50
|
+
*/
|
|
51
|
+
"typescript/no-empty-object-type": ["error", {
|
|
52
|
+
allowInterfaces: "with-single-extends",
|
|
53
|
+
allowWithName: "Props$"
|
|
54
|
+
}],
|
|
55
|
+
/**
|
|
56
|
+
* Disallow Promises in places not designed to handle them.
|
|
57
|
+
*
|
|
58
|
+
* Function arguments and JSX attributes are allowed.
|
|
59
|
+
*/
|
|
60
|
+
"typescript/no-misused-promises": ["error", { checksVoidReturn: false }],
|
|
61
|
+
/**
|
|
62
|
+
* Disallow members of unions and intersections that do nothing or override type information.
|
|
63
|
+
*/
|
|
64
|
+
"typescript/no-redundant-type-constituents": "error",
|
|
65
|
+
/**
|
|
66
|
+
* Disallow unnecessary namespace qualifiers.
|
|
67
|
+
*/
|
|
68
|
+
"typescript/no-unnecessary-qualifier": "error",
|
|
69
|
+
/**
|
|
70
|
+
* Enforce using the nullish coalescing operator instead of logical assignments or chaining.
|
|
71
|
+
*/
|
|
72
|
+
"typescript/prefer-nullish-coalescing": ["error", { ignorePrimitives: {
|
|
73
|
+
number: true,
|
|
74
|
+
string: true
|
|
75
|
+
} }],
|
|
76
|
+
/**
|
|
77
|
+
* Require using `RegExp.exec()` over `String.match()` for consistency.
|
|
78
|
+
*/
|
|
79
|
+
"typescript/prefer-regexp-exec": "error",
|
|
80
|
+
/**
|
|
81
|
+
* Enforce template literal expressions to be of string type.
|
|
82
|
+
*/
|
|
83
|
+
"typescript/restrict-template-expressions": ["error", {
|
|
84
|
+
allow: [{
|
|
85
|
+
from: "lib",
|
|
86
|
+
name: [
|
|
87
|
+
"Error",
|
|
88
|
+
"URL",
|
|
89
|
+
"URLSearchParams"
|
|
90
|
+
]
|
|
91
|
+
}],
|
|
92
|
+
allowBoolean: true,
|
|
93
|
+
allowNumber: true
|
|
94
|
+
}],
|
|
95
|
+
/**
|
|
96
|
+
* Require exhaustive checks when using union types in switch statements.
|
|
97
|
+
*
|
|
98
|
+
* This ensures cases are considered when items are later added to a union.
|
|
99
|
+
*/
|
|
100
|
+
"typescript/switch-exhaustiveness-check": "error"
|
|
101
|
+
};
|
|
102
|
+
//#endregion
|
|
103
|
+
export { typescriptBaseRules };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
//#region src/oxlint/rules/variables.d.ts
|
|
4
|
+
declare const variablesRules: {
|
|
5
|
+
/**
|
|
6
|
+
* Disallow labels that share a name with a variable.
|
|
7
|
+
*
|
|
8
|
+
* 🚫 Not fixable - https://eslint.org/docs/rules/no-label-var
|
|
9
|
+
*/
|
|
10
|
+
"no-label-var": "error";
|
|
11
|
+
/**
|
|
12
|
+
* Disallow unused variables.
|
|
13
|
+
*
|
|
14
|
+
* 🚫 Not fixable - https://eslint.org/docs/rules/no-unused-vars
|
|
15
|
+
*/
|
|
16
|
+
"no-unused-vars": ["error", {
|
|
17
|
+
args: "after-used";
|
|
18
|
+
argsIgnorePattern: string;
|
|
19
|
+
ignoreRestSiblings: true;
|
|
20
|
+
vars: "all";
|
|
21
|
+
varsIgnorePattern: string;
|
|
22
|
+
}];
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { variablesRules };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
//#region src/oxlint/rules/variables.ts
|
|
5
|
+
const variablesRules = {
|
|
6
|
+
/**
|
|
7
|
+
* Disallow labels that share a name with a variable.
|
|
8
|
+
*
|
|
9
|
+
* 🚫 Not fixable - https://eslint.org/docs/rules/no-label-var
|
|
10
|
+
*/
|
|
11
|
+
"no-label-var": "error",
|
|
12
|
+
/**
|
|
13
|
+
* Disallow unused variables.
|
|
14
|
+
*
|
|
15
|
+
* 🚫 Not fixable - https://eslint.org/docs/rules/no-unused-vars
|
|
16
|
+
*/
|
|
17
|
+
"no-unused-vars": ["error", {
|
|
18
|
+
args: "after-used",
|
|
19
|
+
argsIgnorePattern: "^_",
|
|
20
|
+
ignoreRestSiblings: true,
|
|
21
|
+
vars: "all",
|
|
22
|
+
varsIgnorePattern: "^_"
|
|
23
|
+
}]
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { variablesRules };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
import { DummyRuleMap, ExternalPluginEntry } from "oxlint";
|
|
4
|
+
//#region src/oxlint/utils/eslint-compat.d.ts
|
|
5
|
+
type PartialRuleMap = Partial<DummyRuleMap> | undefined;
|
|
6
|
+
declare const resolveRuleMap: (rules: PartialRuleMap) => DummyRuleMap;
|
|
7
|
+
declare const resolveJsPlugin: (name: string, specifier?: string) => ExternalPluginEntry;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { resolveJsPlugin, resolveRuleMap };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
//#region src/oxlint/utils/eslint-compat.ts
|
|
5
|
+
const resolveRuleMap = (rules) => {
|
|
6
|
+
if (!rules) return {};
|
|
7
|
+
return Object.fromEntries(Object.entries(rules).flatMap(([ruleName, ruleConfig]) => {
|
|
8
|
+
if (ruleConfig === void 0) return [];
|
|
9
|
+
let resolvedRuleConfig = "error";
|
|
10
|
+
if (Array.isArray(ruleConfig)) {
|
|
11
|
+
const [_firstElement, ...rest] = ruleConfig;
|
|
12
|
+
resolvedRuleConfig = ["error", ...rest];
|
|
13
|
+
} else {
|
|
14
|
+
if (ruleConfig === "off" || ruleConfig === 0) resolvedRuleConfig = "off";
|
|
15
|
+
resolvedRuleConfig = "error";
|
|
16
|
+
}
|
|
17
|
+
return [[ruleName, resolvedRuleConfig]];
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
20
|
+
const resolveJsPlugin = (name, specifier = name) => {
|
|
21
|
+
const strippedName = name.replace(/^eslint-plugin-/, "");
|
|
22
|
+
try {
|
|
23
|
+
return {
|
|
24
|
+
name: strippedName,
|
|
25
|
+
specifier: import.meta.resolve(specifier)
|
|
26
|
+
};
|
|
27
|
+
} catch {
|
|
28
|
+
return {
|
|
29
|
+
name: strippedName,
|
|
30
|
+
specifier
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { resolveJsPlugin, resolveRuleMap };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { defineConfig } from "stylelint-define-config";
|
|
5
|
+
//#region src/stylelint/_base.ts
|
|
6
|
+
const stylelintBase = defineConfig({
|
|
7
|
+
extends: [
|
|
8
|
+
"stylelint-config-standard",
|
|
9
|
+
"stylelint-config-html",
|
|
10
|
+
"stylelint-config-clean-order"
|
|
11
|
+
],
|
|
12
|
+
rules: {
|
|
13
|
+
"at-rule-empty-line-before": ["always", {
|
|
14
|
+
except: ["blockless-after-same-name-blockless", "first-nested"],
|
|
15
|
+
ignore: ["after-comment"]
|
|
16
|
+
}],
|
|
17
|
+
"custom-property-empty-line-before": ["always", {
|
|
18
|
+
except: ["after-custom-property"],
|
|
19
|
+
ignore: [
|
|
20
|
+
"after-comment",
|
|
21
|
+
"first-nested",
|
|
22
|
+
"inside-single-line-block"
|
|
23
|
+
]
|
|
24
|
+
}],
|
|
25
|
+
"declaration-empty-line-before": ["always", {
|
|
26
|
+
except: ["first-nested"],
|
|
27
|
+
ignore: [
|
|
28
|
+
"after-comment",
|
|
29
|
+
"after-declaration",
|
|
30
|
+
"inside-single-line-block"
|
|
31
|
+
]
|
|
32
|
+
}],
|
|
33
|
+
"rule-empty-line-before": ["always-multi-line", {
|
|
34
|
+
except: ["first-nested"],
|
|
35
|
+
ignore: ["after-comment"]
|
|
36
|
+
}]
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
//#endregion
|
|
40
|
+
export { stylelintBase };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { stylelintBase } from "./_base.js";
|
|
5
|
+
import { defineConfig } from "stylelint-define-config";
|
|
6
|
+
//#region src/stylelint/index.ts
|
|
7
|
+
var stylelint_default = defineConfig({
|
|
8
|
+
...stylelintBase,
|
|
9
|
+
rules: {
|
|
10
|
+
...stylelintBase.rules,
|
|
11
|
+
"custom-media-pattern": null,
|
|
12
|
+
"custom-property-pattern": null,
|
|
13
|
+
"keyframes-name-pattern": null,
|
|
14
|
+
"selector-class-pattern": null
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { stylelint_default as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { stylelintBase } from "./_base.js";
|
|
5
|
+
import { defineConfig } from "stylelint-define-config";
|
|
6
|
+
//#region src/stylelint/modules.ts
|
|
7
|
+
const camelCaseRegex = /^[a-z][a-zA-Z0-9]+$/;
|
|
8
|
+
var modules_default = defineConfig({
|
|
9
|
+
...stylelintBase,
|
|
10
|
+
rules: {
|
|
11
|
+
...stylelintBase.rules,
|
|
12
|
+
"custom-media-pattern": camelCaseRegex,
|
|
13
|
+
"keyframes-name-pattern": camelCaseRegex,
|
|
14
|
+
"selector-class-pattern": camelCaseRegex,
|
|
15
|
+
"selector-pseudo-class-no-unknown": [true, { ignorePseudoClasses: ["global"] }]
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { modules_default as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { defineConfig } from "stylelint-define-config";
|
|
5
|
+
//#region src/stylelint/tailwind.ts
|
|
6
|
+
var tailwind_default = defineConfig({
|
|
7
|
+
extends: "@dreamsicle.io/stylelint-config-tailwindcss",
|
|
8
|
+
rules: { "media-query-no-invalid": [true, { ignoreFunctions: ["theme"] }] }
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { tailwind_default as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"esModuleInterop": true,
|
|
5
|
+
"forceConsistentCasingInFileNames": true,
|
|
6
|
+
"incremental": true,
|
|
7
|
+
"isolatedModules": true,
|
|
8
|
+
"noFallthroughCasesInSwitch": true,
|
|
9
|
+
"noUncheckedIndexedAccess": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"useDefineForClassFields": true
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./tsconfig.base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
6
|
+
"jsx": "react-jsx",
|
|
7
|
+
"module": "esnext",
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"allowImportingTsExtensions": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"target": "es2020",
|
|
13
|
+
"paths": {
|
|
14
|
+
"@/*": ["${configDir}/src/*"]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"allowJs": false,
|
|
5
|
+
"esModuleInterop": true,
|
|
6
|
+
"forceConsistentCasingInFileNames": true,
|
|
7
|
+
"incremental": true,
|
|
8
|
+
"isolatedModules": true,
|
|
9
|
+
"jsx": "preserve",
|
|
10
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
11
|
+
"module": "esnext",
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"noFallthroughCasesInSwitch": true,
|
|
15
|
+
"noUncheckedIndexedAccess": true,
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"skipLibCheck": true,
|
|
18
|
+
"strict": true,
|
|
19
|
+
"target": "ES2022",
|
|
20
|
+
"paths": {
|
|
21
|
+
"@/*": ["${configDir}/src/*"]
|
|
22
|
+
},
|
|
23
|
+
"plugins": [
|
|
24
|
+
{
|
|
25
|
+
"name": "next"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"include": [
|
|
30
|
+
"${configDir}/next-env.d.ts",
|
|
31
|
+
"${configDir}/**/*.ts",
|
|
32
|
+
"${configDir}/**/*.tsx",
|
|
33
|
+
"${configDir}/.next/types/**/*.ts"
|
|
34
|
+
],
|
|
35
|
+
"exclude": ["${configDir}/**/node_modules"]
|
|
36
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/#path-rewriting-for-relative-paths
|
|
5
|
+
"rewriteRelativeImportExtensions": true,
|
|
6
|
+
// https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option
|
|
7
|
+
"erasableSyntaxOnly": true,
|
|
8
|
+
"verbatimModuleSyntax": true
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./tsconfig.base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"lib": ["es2024", "ESNext.Array", "ESNext.Collection", "ESNext.Iterator"],
|
|
6
|
+
// Use `"module": "node20"` when TypeScript 5.9+ is widely used
|
|
7
|
+
"module": "nodenext",
|
|
8
|
+
"target": "es2022",
|
|
9
|
+
"moduleResolution": "node16",
|
|
10
|
+
"types": ["node"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./tsconfig.base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"lib": ["es2024", "ESNext.Array", "ESNext.Collection", "ESNext.Iterator", "ESNext.Promise"],
|
|
6
|
+
// Use `"module": "node20"` when TypeScript 5.9+ is widely used
|
|
7
|
+
"module": "nodenext",
|
|
8
|
+
"target": "es2024",
|
|
9
|
+
"moduleResolution": "node16",
|
|
10
|
+
"types": ["node"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./tsconfig.base.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"lib": ["es2025", "ESNext.Collection", "ESNext.Temporal"],
|
|
6
|
+
"module": "nodenext",
|
|
7
|
+
"target": "es2025",
|
|
8
|
+
"moduleResolution": "node16",
|
|
9
|
+
"types": ["node"]
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
import { CreateOxlintConfigOptions } from "../oxlint/index.js";
|
|
4
|
+
import { UserConfig } from "vite-plus";
|
|
5
|
+
//#region src/vite-plus/index.d.ts
|
|
6
|
+
interface CreateVitePlusConfigOptions extends Partial<UserConfig> {
|
|
7
|
+
lintOptions?: CreateOxlintConfigOptions;
|
|
8
|
+
}
|
|
9
|
+
declare const createVitePlusConfig: (options?: CreateVitePlusConfigOptions) => UserConfig;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { createVitePlusConfig };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { createOxfmtConfig } from "../oxfmt/index.js";
|
|
5
|
+
import { createOxlintConfig } from "../oxlint/index.js";
|
|
6
|
+
//#region src/vite-plus/index.ts
|
|
7
|
+
const createVitePlusConfig = (options) => ({
|
|
8
|
+
...options,
|
|
9
|
+
fmt: createOxfmtConfig(options?.fmt),
|
|
10
|
+
lint: {
|
|
11
|
+
...createOxlintConfig(options?.lintOptions),
|
|
12
|
+
...options?.lint
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { createVitePlusConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haltcase/style",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1-canary.1",
|
|
4
4
|
"description": "haltcase's web ecosystem style guide & configurations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"editorconfig",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"vite": "npm:@voidzero-dev/vite-plus-core@^0.2.5",
|
|
107
107
|
"vite-plus": "^0.2.5",
|
|
108
108
|
"vitest": "^4.1.10",
|
|
109
|
-
"@haltcase/style": "8.0.
|
|
109
|
+
"@haltcase/style": "8.0.1-canary.1"
|
|
110
110
|
},
|
|
111
111
|
"peerDependencies": {
|
|
112
112
|
"@tanstack/eslint-plugin-router": "^1.161.6",
|