@subf/config 0.1.0 → 0.1.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/oxlint.d.ts +1 -2
- package/dist/oxlint.js +5 -29
- package/package.json +2 -2
package/dist/oxlint.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
+
import { FILES_TS_TSX, solidConfig as solid } from "@subf/oxlint-plugin/config";
|
|
1
2
|
import { OxlintConfig, OxlintOverride } from "oxlint";
|
|
2
3
|
|
|
3
4
|
//#region src/oxlint.d.ts
|
|
4
5
|
declare const baseConfig: OxlintConfig;
|
|
5
6
|
declare const baseRules: OxlintConfig;
|
|
6
|
-
declare const FILES_TS_TSX: string[];
|
|
7
7
|
declare const ts: OxlintOverride;
|
|
8
8
|
declare const vitest: OxlintOverride;
|
|
9
9
|
declare const markdownOverrideConfig: OxlintOverride;
|
|
10
10
|
declare const overrides: OxlintOverride[];
|
|
11
11
|
declare const CONFIG: OxlintConfig;
|
|
12
12
|
declare const unocss: OxlintOverride;
|
|
13
|
-
declare const solid: OxlintOverride;
|
|
14
13
|
interface SubfOpions extends OxlintConfig {
|
|
15
14
|
/**
|
|
16
15
|
* Used for lib, force to explicit function return type
|
package/dist/oxlint.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FILES_TS_TSX, FILES_TS_TSX as FILES_TS_TSX$1, solidConfig, solidConfig as solid } from "@subf/oxlint-plugin/config";
|
|
1
2
|
//#region src/oxlint.ts
|
|
2
3
|
const baseConfig = {
|
|
3
4
|
env: {
|
|
@@ -268,9 +269,8 @@ const baseRules = {
|
|
|
268
269
|
"oxc/no-this-in-exported-function": "error"
|
|
269
270
|
}
|
|
270
271
|
};
|
|
271
|
-
const FILES_TS_TSX = ["**/*.{ts,tsx}"];
|
|
272
272
|
const ts = {
|
|
273
|
-
files: FILES_TS_TSX,
|
|
273
|
+
files: FILES_TS_TSX$1,
|
|
274
274
|
plugins: ["typescript"],
|
|
275
275
|
jsPlugins: [{
|
|
276
276
|
name: "subf",
|
|
@@ -371,40 +371,16 @@ const CONFIG = {
|
|
|
371
371
|
overrides
|
|
372
372
|
};
|
|
373
373
|
const unocss = {
|
|
374
|
-
files: FILES_TS_TSX,
|
|
374
|
+
files: FILES_TS_TSX$1,
|
|
375
375
|
jsPlugins: [{
|
|
376
376
|
name: "uno",
|
|
377
|
-
specifier: "@unocss/
|
|
377
|
+
specifier: "@subf/unocss/oxlint-plugin"
|
|
378
378
|
}],
|
|
379
379
|
rules: {
|
|
380
380
|
"uno/order": ["warn", { unoFunctions: ["cn", "cva"] }],
|
|
381
381
|
"uno/blocklist": "error"
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
|
-
const solid = {
|
|
385
|
-
files: FILES_TS_TSX,
|
|
386
|
-
jsPlugins: ["eslint-plugin-solid"],
|
|
387
|
-
rules: {
|
|
388
|
-
"solid/event-handlers": ["error", {
|
|
389
|
-
ignoreCase: false,
|
|
390
|
-
warnOnSpread: false
|
|
391
|
-
}],
|
|
392
|
-
"solid/imports": "error",
|
|
393
|
-
"solid/jsx-no-duplicate-props": "error",
|
|
394
|
-
"solid/jsx-no-script-url": "error",
|
|
395
|
-
"solid/no-destructure": "error",
|
|
396
|
-
"solid/no-innerhtml": ["error", { allowStatic: true }],
|
|
397
|
-
"solid/no-react-deps": "error",
|
|
398
|
-
"solid/no-react-specific-props": "error",
|
|
399
|
-
"solid/no-unknown-namespaces": "error",
|
|
400
|
-
"solid/prefer-for": "error",
|
|
401
|
-
"solid/prefer-show": "error",
|
|
402
|
-
"solid/self-closing-comp": "error",
|
|
403
|
-
"solid/style-prop": ["error", { styleProps: ["style", "css"] }],
|
|
404
|
-
"solid/jsx-no-undef": ["error", { typescriptEnabled: true }],
|
|
405
|
-
"solid/reactivity": "warn"
|
|
406
|
-
}
|
|
407
|
-
};
|
|
408
384
|
function subfLint(options = {}) {
|
|
409
385
|
const { lib, unocss: enableUnocss, solid: enableSolid, overrides: customOverrides = [], ...oxlint } = options;
|
|
410
386
|
const ovr = [vitest, markdownOverrideConfig];
|
|
@@ -421,7 +397,7 @@ function subfLint(options = {}) {
|
|
|
421
397
|
});
|
|
422
398
|
else ovr.push(ts);
|
|
423
399
|
if (enableUnocss) ovr.push(unocss);
|
|
424
|
-
if (enableSolid) ovr.push(
|
|
400
|
+
if (enableSolid) ovr.push(solidConfig);
|
|
425
401
|
ovr.push(...customOverrides);
|
|
426
402
|
return {
|
|
427
403
|
...baseConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@subf/config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Universal configuration for TypeScript, SolidJS, oxlint, oxfmt, and tsdown.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"prepublishOnly": "bun run build"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@subf/oxlint-plugin": "^0.
|
|
59
|
+
"@subf/oxlint-plugin": "^0.2.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@oxlint/plugins": "^1.58.0",
|