@vida0905/eslint-config 2.0.1 → 2.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/bin/index.js +2 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +106 -0
- package/dist/index.d.ts +69 -67
- package/dist/index.js +92 -104
- package/package.json +19 -15
package/bin/index.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import process from "node:process";
|
|
2
|
+
import { cac } from "cac";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import fsp from "node:fs/promises";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { green } from "ansis";
|
|
7
|
+
|
|
8
|
+
//#region package.json
|
|
9
|
+
var version = "2.1.1";
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/cli/constants.ts
|
|
13
|
+
const vscodeSettingsString = `
|
|
14
|
+
// Disable the default formatter, use eslint instead
|
|
15
|
+
"prettier.enable": false,
|
|
16
|
+
"editor.formatOnSave": false,
|
|
17
|
+
|
|
18
|
+
// Auto fix
|
|
19
|
+
"editor.codeActionsOnSave": {
|
|
20
|
+
"source.fixAll.eslint": "explicit",
|
|
21
|
+
"source.organizeImports": "never"
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
// Silent the stylistic rules in you IDE, but still auto fix them
|
|
25
|
+
"eslint.rules.customizations": [
|
|
26
|
+
{ "rule": "style/*", "severity": "off", "fixable": true },
|
|
27
|
+
{ "rule": "format/*", "severity": "off", "fixable": true },
|
|
28
|
+
{ "rule": "*-indent", "severity": "off", "fixable": true },
|
|
29
|
+
{ "rule": "*-spacing", "severity": "off", "fixable": true },
|
|
30
|
+
{ "rule": "*-spaces", "severity": "off", "fixable": true },
|
|
31
|
+
{ "rule": "*-order", "severity": "off", "fixable": true },
|
|
32
|
+
{ "rule": "*-dangle", "severity": "off", "fixable": true },
|
|
33
|
+
{ "rule": "*-newline", "severity": "off", "fixable": true },
|
|
34
|
+
{ "rule": "*quotes", "severity": "off", "fixable": true },
|
|
35
|
+
{ "rule": "*semi", "severity": "off", "fixable": true }
|
|
36
|
+
],
|
|
37
|
+
|
|
38
|
+
// Enable eslint for all supported languages
|
|
39
|
+
"eslint.validate": [
|
|
40
|
+
"javascript",
|
|
41
|
+
"javascriptreact",
|
|
42
|
+
"typescript",
|
|
43
|
+
"typescriptreact",
|
|
44
|
+
"vue",
|
|
45
|
+
"html",
|
|
46
|
+
"markdown",
|
|
47
|
+
"json",
|
|
48
|
+
"json5",
|
|
49
|
+
"jsonc",
|
|
50
|
+
"yaml",
|
|
51
|
+
"toml",
|
|
52
|
+
"xml",
|
|
53
|
+
"gql",
|
|
54
|
+
"graphql",
|
|
55
|
+
"astro",
|
|
56
|
+
"svelte",
|
|
57
|
+
"css",
|
|
58
|
+
"less",
|
|
59
|
+
"scss",
|
|
60
|
+
"pcss",
|
|
61
|
+
"postcss"
|
|
62
|
+
]
|
|
63
|
+
`;
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/cli/update-vscode-settings.ts
|
|
67
|
+
async function updateVSCodeSettings() {
|
|
68
|
+
const cwd = process.cwd();
|
|
69
|
+
const dotVscodePath = path.join(cwd, ".vscode");
|
|
70
|
+
const settingsPath = path.join(dotVscodePath, "settings.json");
|
|
71
|
+
if (!fs.existsSync(dotVscodePath)) await fsp.mkdir(dotVscodePath, { recursive: true });
|
|
72
|
+
if (!fs.existsSync(settingsPath)) {
|
|
73
|
+
await fsp.writeFile(settingsPath, `{${vscodeSettingsString}}\n`, "utf-8");
|
|
74
|
+
console.log(green`Created .vscode/settings.json`);
|
|
75
|
+
} else {
|
|
76
|
+
let settingsContent = await fsp.readFile(settingsPath, "utf8");
|
|
77
|
+
settingsContent = settingsContent.trim().replace(/\s*\}$/, "");
|
|
78
|
+
settingsContent += settingsContent.endsWith(",") || settingsContent.endsWith("{") ? "" : ",";
|
|
79
|
+
settingsContent += `${vscodeSettingsString}}\n`;
|
|
80
|
+
await fsp.writeFile(settingsPath, settingsContent, "utf-8");
|
|
81
|
+
console.log(green`Updated .vscode/settings.json`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/cli/run.ts
|
|
87
|
+
async function run(options = {}) {
|
|
88
|
+
if (options.vscode) await updateVSCodeSettings();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/cli/index.ts
|
|
93
|
+
const cli = cac("@vida0905/eslint-config");
|
|
94
|
+
cli.command("update", "update configuration files").option("--vscode", "Update .vscode/settings.json").action(async (args) => {
|
|
95
|
+
try {
|
|
96
|
+
await run(args);
|
|
97
|
+
} catch (error) {
|
|
98
|
+
console.error(`✘ ${String(error)}`);
|
|
99
|
+
process.exit(1);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
cli.help();
|
|
103
|
+
cli.version(version);
|
|
104
|
+
cli.parse();
|
|
105
|
+
|
|
106
|
+
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -1,82 +1,84 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as _antfu_eslint_config from '@antfu/eslint-config';
|
|
3
|
-
import { OptionsConfig as OptionsConfig$1, TypedFlatConfigItem as TypedFlatConfigItem$1 } from '@antfu/eslint-config';
|
|
1
|
+
import { OptionsConfig as OptionsConfig$1, TypedFlatConfigItem as TypedFlatConfigItem$1, ConfigNames } from '@antfu/eslint-config';
|
|
4
2
|
export * from '@antfu/eslint-config';
|
|
3
|
+
import { FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
5
4
|
import { Linter } from 'eslint';
|
|
6
5
|
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
/* prettier-ignore */
|
|
9
|
-
|
|
10
|
-
|
|
11
6
|
interface RuleOptions {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Transforms the negation of a conjunction !(A && B) into the equivalent !A || !B according to De Morgan’s law
|
|
9
|
+
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md
|
|
10
|
+
*/
|
|
11
|
+
"de-morgan/no-negated-conjunction"?: Linter.RuleEntry<[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Transforms the negation of a disjunction !(A || B) into the equivalent !A && !B according to De Morgan’s law
|
|
14
|
+
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md
|
|
15
|
+
*/
|
|
16
|
+
"de-morgan/no-negated-disjunction"?: Linter.RuleEntry<[]>;
|
|
17
|
+
/**
|
|
18
|
+
* Never export an initialized named or default store.
|
|
19
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/never-export-initialized-store.md
|
|
20
|
+
*/
|
|
21
|
+
"pinia/never-export-initialized-store"?: Linter.RuleEntry<[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Disallow duplicate store ids.
|
|
24
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-duplicate-store-ids.md
|
|
25
|
+
*/
|
|
26
|
+
"pinia/no-duplicate-store-ids"?: Linter.RuleEntry<[]>;
|
|
27
|
+
/**
|
|
28
|
+
* Disallows returning globally provided properties from Pinia stores.
|
|
29
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-return-global-properties.md
|
|
30
|
+
*/
|
|
31
|
+
"pinia/no-return-global-properties"?: Linter.RuleEntry<[]>;
|
|
32
|
+
/**
|
|
33
|
+
* Disallow use of storeToRefs inside defineStore
|
|
34
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-store-to-refs-in-store.md
|
|
35
|
+
*/
|
|
36
|
+
"pinia/no-store-to-refs-in-store"?: Linter.RuleEntry<[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Encourages defining each store in a separate file.
|
|
39
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/prefer-single-store-per-file.md
|
|
40
|
+
*/
|
|
41
|
+
"pinia/prefer-single-store-per-file"?: Linter.RuleEntry<[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Enforces the convention of naming stores with the prefix `use` followed by the store name.
|
|
44
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/prefer-use-store-naming-convention.md
|
|
45
|
+
*/
|
|
46
|
+
"pinia/prefer-use-store-naming-convention"?: Linter.RuleEntry<PiniaPreferUseStoreNamingConvention>;
|
|
47
|
+
/**
|
|
48
|
+
* In setup stores all state properties must be exported.
|
|
49
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/require-setup-store-properties-export.md
|
|
50
|
+
*/
|
|
51
|
+
"pinia/require-setup-store-properties-export"?: Linter.RuleEntry<[]>;
|
|
47
52
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
storeSuffix?: string
|
|
54
|
-
[k: string]: unknown | undefined
|
|
55
|
-
}]
|
|
53
|
+
type PiniaPreferUseStoreNamingConvention = [] | [{
|
|
54
|
+
checkStoreNameMismatch?: boolean
|
|
55
|
+
storeSuffix?: string
|
|
56
|
+
[k: string]: unknown | undefined
|
|
57
|
+
}];
|
|
56
58
|
|
|
57
59
|
type Rules = RuleOptions;
|
|
58
|
-
type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plugins"> & {
|
|
61
|
+
/**
|
|
62
|
+
* An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
|
|
63
|
+
*
|
|
64
|
+
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
|
|
65
|
+
*/
|
|
66
|
+
plugins?: Record<string, any>
|
|
65
67
|
};
|
|
66
68
|
interface OptionsOverrides {
|
|
67
|
-
|
|
69
|
+
overrides?: TypedFlatConfigItem["rules"];
|
|
68
70
|
}
|
|
69
|
-
type OptionsConfig = Omit<OptionsConfig$1,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
type OptionsConfig = Omit<OptionsConfig$1, "overrides"> & {
|
|
72
|
+
/**
|
|
73
|
+
* Enable Pinia support.
|
|
74
|
+
*
|
|
75
|
+
* @default auto-detect based on the dependencies
|
|
76
|
+
*/
|
|
77
|
+
pinia?: boolean | OptionsOverrides
|
|
76
78
|
};
|
|
77
79
|
|
|
78
|
-
declare function deepMerge<T>(target: T, source: T): T;
|
|
80
|
+
declare function deepMerge<T extends object>(target: T, source: T): T;
|
|
79
81
|
|
|
80
|
-
declare function defineConfig(options?: OptionsConfig & TypedFlatConfigItem$1, ...userConfigs: TypedFlatConfigItem$1[]):
|
|
82
|
+
declare function defineConfig(options?: OptionsConfig & TypedFlatConfigItem$1, ...userConfigs: TypedFlatConfigItem$1[]): FlatConfigComposer<TypedFlatConfigItem$1, ConfigNames>;
|
|
81
83
|
|
|
82
84
|
export { deepMerge, defineConfig as default, defineConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,122 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
import antfu, { resolveSubOptions } from "@antfu/eslint-config";
|
|
1
|
+
import antfu, { GLOB_JS, GLOB_SRC, GLOB_TS, interopDefault, resolveSubOptions } from "@antfu/eslint-config";
|
|
3
2
|
import { createOxcImportResolver } from "eslint-import-resolver-oxc";
|
|
4
3
|
import { isPackageExists } from "local-pkg";
|
|
4
|
+
import _deMorgan from "eslint-plugin-de-morgan";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export * from "@antfu/eslint-config"
|
|
7
|
+
|
|
8
|
+
//#region src/configs/de-morgan.ts
|
|
9
|
+
function deMorgan(options = {}) {
|
|
10
|
+
const { files = [GLOB_SRC] } = options;
|
|
11
|
+
return [{
|
|
12
|
+
name: "vida/de-morgan/rules",
|
|
13
|
+
files,
|
|
14
|
+
..._deMorgan.configs.recommended
|
|
15
|
+
}];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/configs/pinia.ts
|
|
20
|
+
const GLOB_PINIA_JS = `**/stores/${GLOB_JS}`;
|
|
21
|
+
const GLOB_PINIA_TS = `**/stores/${GLOB_TS}`;
|
|
10
22
|
async function pinia(options = {}) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"pinia/no-duplicate-store-ids": "error",
|
|
31
|
-
"pinia/no-return-global-properties": "error",
|
|
32
|
-
"pinia/no-store-to-refs-in-store": "error",
|
|
33
|
-
...overrides2
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
];
|
|
23
|
+
const { files = [GLOB_PINIA_JS, GLOB_PINIA_TS], overrides: overrides$1 = {} } = options;
|
|
24
|
+
return [{
|
|
25
|
+
name: "vida/pinia/rules",
|
|
26
|
+
files,
|
|
27
|
+
plugins: { pinia: await interopDefault(import("eslint-plugin-pinia")) },
|
|
28
|
+
rules: {
|
|
29
|
+
"pinia/never-export-initialized-store": "error",
|
|
30
|
+
"pinia/prefer-single-store-per-file": "warn",
|
|
31
|
+
"pinia/prefer-use-store-naming-convention": ["error", {
|
|
32
|
+
checkStoreNameMismatch: true,
|
|
33
|
+
storeSuffix: "Store"
|
|
34
|
+
}],
|
|
35
|
+
"pinia/require-setup-store-properties-export": "warn",
|
|
36
|
+
"pinia/no-duplicate-store-ids": "error",
|
|
37
|
+
"pinia/no-return-global-properties": "error",
|
|
38
|
+
"pinia/no-store-to-refs-in-store": "error",
|
|
39
|
+
...overrides$1
|
|
40
|
+
}
|
|
41
|
+
}];
|
|
37
42
|
}
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/overrides/javascript.ts
|
|
46
|
+
const javascript = {
|
|
47
|
+
"arrow-body-style": ["error", "as-needed"],
|
|
48
|
+
"no-unused-private-class-members": "error",
|
|
49
|
+
"require-atomic-updates": ["error", { allowProperties: true }]
|
|
44
50
|
};
|
|
45
51
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/overrides/stylistic.ts
|
|
54
|
+
const stylistic = {
|
|
55
|
+
"style/arrow-parens": ["error", "always"],
|
|
56
|
+
"style/brace-style": [
|
|
57
|
+
"error",
|
|
58
|
+
"1tbs",
|
|
59
|
+
{ allowSingleLine: true }
|
|
60
|
+
]
|
|
50
61
|
};
|
|
51
62
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
};
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/overrides/vue.ts
|
|
65
|
+
const vue = { "vue/max-attributes-per-line": ["error", {
|
|
66
|
+
singleline: 5,
|
|
67
|
+
multiline: 1
|
|
68
|
+
}] };
|
|
59
69
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/overrides/index.ts
|
|
72
|
+
const overrides = {
|
|
73
|
+
javascript,
|
|
74
|
+
stylistic,
|
|
75
|
+
vue
|
|
65
76
|
};
|
|
66
77
|
|
|
67
|
-
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/utils.ts
|
|
68
80
|
function deepMerge(target, source) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
target[key] = deepMerge(target[key], source[key]);
|
|
73
|
-
} else {
|
|
74
|
-
target[key] = source[key];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return target;
|
|
81
|
+
for (const key in source) if (Object.hasOwn(source, key)) if (source[key] instanceof Object && target[key] instanceof Object) target[key] = deepMerge(target[key], source[key]);
|
|
82
|
+
else target[key] = source[key];
|
|
83
|
+
return target;
|
|
79
84
|
}
|
|
80
85
|
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/index.ts
|
|
83
88
|
function defineConfig(options = {}, ...userConfigs) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
overrides: overrides.vue
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
return antfu(
|
|
105
|
-
deepMerge(antfuConfig, options),
|
|
106
|
-
...configs,
|
|
107
|
-
...userConfigs
|
|
108
|
-
).prepend({
|
|
109
|
-
name: "vida/imports/setup",
|
|
110
|
-
settings: {
|
|
111
|
-
"import-x/resolver-next": [
|
|
112
|
-
createOxcImportResolver()
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
});
|
|
89
|
+
const { pinia: enablePinia = isPackageExists("pinia") } = options;
|
|
90
|
+
const configs = [deMorgan()];
|
|
91
|
+
if (enablePinia) configs.push(pinia(resolveSubOptions(options, "pinia")));
|
|
92
|
+
const antfuConfig = {
|
|
93
|
+
stylistic: {
|
|
94
|
+
indent: 2,
|
|
95
|
+
quotes: "single",
|
|
96
|
+
semi: false,
|
|
97
|
+
overrides: overrides.stylistic
|
|
98
|
+
},
|
|
99
|
+
javascript: { overrides: overrides.javascript },
|
|
100
|
+
vue: { overrides: overrides.vue }
|
|
101
|
+
};
|
|
102
|
+
return antfu(deepMerge(antfuConfig, options), ...configs, ...userConfigs).prepend({
|
|
103
|
+
name: "vida/imports/setup",
|
|
104
|
+
settings: { "import-x/resolver-next": [createOxcImportResolver()] }
|
|
105
|
+
});
|
|
116
106
|
}
|
|
117
|
-
var
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
defineConfig
|
|
122
|
-
};
|
|
107
|
+
var src_default = defineConfig;
|
|
108
|
+
|
|
109
|
+
//#endregion
|
|
110
|
+
export { deepMerge, src_default as default, defineConfig };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vida0905/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
5
|
-
"packageManager": "pnpm@10.
|
|
4
|
+
"version": "2.1.1",
|
|
5
|
+
"packageManager": "pnpm@10.4.1",
|
|
6
6
|
"description": "Vida Xie's ESLint Config",
|
|
7
7
|
"author": "Vida Xie <vida_2020@163.com> (https://github.com/9romise/)",
|
|
8
8
|
"license": "MIT",
|
|
@@ -22,39 +22,43 @@
|
|
|
22
22
|
},
|
|
23
23
|
"main": "./dits/index.js",
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
|
+
"bin": "./bin/index.js",
|
|
25
26
|
"files": [
|
|
27
|
+
"bin",
|
|
26
28
|
"dist"
|
|
27
29
|
],
|
|
28
30
|
"scripts": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"dev": "tsup --watch",
|
|
31
|
+
"dev": "tsdown --watch",
|
|
32
|
+
"build": "tsdown",
|
|
32
33
|
"typegen": "tsx scripts/typegen",
|
|
33
|
-
"build": "npm run typegen && tsup",
|
|
34
|
-
"release": "npm run lint && npm run typecheck && bumpp",
|
|
35
34
|
"typecheck": "tsc --noEmit",
|
|
35
|
+
"lint": "eslint .",
|
|
36
|
+
"lint:fix": "eslint . --fix",
|
|
36
37
|
"prepack": "npm run build",
|
|
37
|
-
"prepare": "simple-git-hooks"
|
|
38
|
+
"prepare": "npm run typegen && simple-git-hooks"
|
|
38
39
|
},
|
|
39
40
|
"peerDependencies": {
|
|
40
41
|
"eslint": ">=9.10.0"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@antfu/eslint-config": "^4.
|
|
44
|
+
"@antfu/eslint-config": "^4.3.0",
|
|
45
|
+
"ansis": "^3.15.0",
|
|
46
|
+
"cac": "^6.7.14",
|
|
44
47
|
"eslint-flat-config-utils": "^2.0.1",
|
|
45
|
-
"eslint-import-resolver-oxc": "^0.
|
|
48
|
+
"eslint-import-resolver-oxc": "^0.11.0",
|
|
49
|
+
"eslint-plugin-de-morgan": "^1.0.1",
|
|
46
50
|
"eslint-plugin-pinia": "^0.4.1",
|
|
47
51
|
"local-pkg": "^1.0.0"
|
|
48
52
|
},
|
|
49
53
|
"devDependencies": {
|
|
50
54
|
"@eslint/config-inspector": "^1.0.0",
|
|
51
|
-
"@types/node": "^22.13.
|
|
52
|
-
"
|
|
53
|
-
"eslint": "^
|
|
54
|
-
"eslint-typegen": "^1.0.0",
|
|
55
|
+
"@types/node": "^22.13.4",
|
|
56
|
+
"eslint": "^9.20.1",
|
|
57
|
+
"eslint-typegen": "^2.0.0",
|
|
55
58
|
"lint-staged": "^15.4.3",
|
|
59
|
+
"oxc-transform": "^0.51.0",
|
|
56
60
|
"simple-git-hooks": "^2.11.1",
|
|
57
|
-
"
|
|
61
|
+
"tsdown": "^0.5.10",
|
|
58
62
|
"tsx": "^4.19.2",
|
|
59
63
|
"typescript": "^5.7.3"
|
|
60
64
|
},
|