@vida0905/eslint-config 0.3.0 → 0.4.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/index.cjs +140 -0
- package/dist/index.d.cts +76 -0
- package/dist/index.d.ts +62 -4
- package/dist/index.js +49 -30
- package/package.json +13 -8
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/index.ts
|
|
32
|
+
var src_exports = {};
|
|
33
|
+
__export(src_exports, {
|
|
34
|
+
default: () => src_default,
|
|
35
|
+
vida: () => vida
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(src_exports);
|
|
38
|
+
var import_eslint_config2 = __toESM(require("@antfu/eslint-config"), 1);
|
|
39
|
+
var import_local_pkg = require("local-pkg");
|
|
40
|
+
|
|
41
|
+
// src/configs/pinia.ts
|
|
42
|
+
var import_eslint_config = require("@antfu/eslint-config");
|
|
43
|
+
var GLOB_PINIA_JS = `**/stores/${import_eslint_config.GLOB_JS}`;
|
|
44
|
+
var GLOB_PINIA_TS = `**/stores/${import_eslint_config.GLOB_TS}`;
|
|
45
|
+
async function pinia(options = {}) {
|
|
46
|
+
const {
|
|
47
|
+
files = [GLOB_PINIA_JS, GLOB_PINIA_TS],
|
|
48
|
+
overrides: overrides2 = {}
|
|
49
|
+
} = options;
|
|
50
|
+
return [
|
|
51
|
+
{
|
|
52
|
+
name: "@vida/pinia",
|
|
53
|
+
files,
|
|
54
|
+
plugins: {
|
|
55
|
+
pinia: await (0, import_eslint_config.interopDefault)(import("eslint-plugin-pinia"))
|
|
56
|
+
},
|
|
57
|
+
rules: {
|
|
58
|
+
"pinia/never-export-initialized-store": "error",
|
|
59
|
+
"pinia/prefer-single-store-per-file": "warn",
|
|
60
|
+
"pinia/prefer-use-store-naming-convention": ["error", {
|
|
61
|
+
checkStoreNameMismatch: true,
|
|
62
|
+
storeSuffix: "Store"
|
|
63
|
+
}],
|
|
64
|
+
"pinia/require-setup-store-properties-export": "warn",
|
|
65
|
+
"pinia/no-duplicate-store-ids": "error",
|
|
66
|
+
...overrides2
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// src/overrides/javascript.ts
|
|
73
|
+
var javascript = {
|
|
74
|
+
"arrow-body-style": ["error", "as-needed"],
|
|
75
|
+
"no-unused-private-class-members": "error",
|
|
76
|
+
"require-atomic-updates": ["error", { allowProperties: true }]
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// src/overrides/stylistic.ts
|
|
80
|
+
var stylistic = {
|
|
81
|
+
"style/arrow-parens": ["error", "always"],
|
|
82
|
+
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }]
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// src/overrides/vue.ts
|
|
86
|
+
var vue = {
|
|
87
|
+
"vue/max-attributes-per-line": ["error", {
|
|
88
|
+
singleline: 5,
|
|
89
|
+
multiline: 1
|
|
90
|
+
}]
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// src/overrides/index.ts
|
|
94
|
+
var overrides = {
|
|
95
|
+
javascript,
|
|
96
|
+
stylistic,
|
|
97
|
+
vue
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// src/index.ts
|
|
101
|
+
__reExport(src_exports, require("@antfu/eslint-config"), module.exports);
|
|
102
|
+
function vida(options = {}, ...userConfigs) {
|
|
103
|
+
const {
|
|
104
|
+
pinia: enablePinia = (0, import_local_pkg.isPackageExists)("pinia")
|
|
105
|
+
} = options;
|
|
106
|
+
const configs = [];
|
|
107
|
+
if (enablePinia)
|
|
108
|
+
configs.push(pinia((0, import_eslint_config2.resolveSubOptions)(options, "pinia")));
|
|
109
|
+
const antfuConfig = {
|
|
110
|
+
stylistic: {
|
|
111
|
+
indent: 2,
|
|
112
|
+
quotes: "single",
|
|
113
|
+
semi: false,
|
|
114
|
+
overrides: overrides.stylistic
|
|
115
|
+
},
|
|
116
|
+
javascript: {
|
|
117
|
+
overrides: overrides.javascript
|
|
118
|
+
},
|
|
119
|
+
vue: {
|
|
120
|
+
overrides: overrides.vue
|
|
121
|
+
},
|
|
122
|
+
settings: {
|
|
123
|
+
"import-x/resolver": "oxc"
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
return (0, import_eslint_config2.default)(
|
|
127
|
+
{
|
|
128
|
+
...antfuConfig,
|
|
129
|
+
...options
|
|
130
|
+
},
|
|
131
|
+
...configs,
|
|
132
|
+
...userConfigs
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
var src_default = vida;
|
|
136
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
+
0 && (module.exports = {
|
|
138
|
+
vida,
|
|
139
|
+
...require("@antfu/eslint-config")
|
|
140
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
|
|
2
|
+
import * as _antfu_eslint_config from '@antfu/eslint-config';
|
|
3
|
+
import { antfu, TypedFlatConfigItem as TypedFlatConfigItem$1 } from '@antfu/eslint-config';
|
|
4
|
+
export * from '@antfu/eslint-config';
|
|
5
|
+
import { Linter } from 'eslint';
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
/* prettier-ignore */
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
interface RuleOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Never export an initialized named or default store.
|
|
14
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/never-export-initialized-store.md
|
|
15
|
+
*/
|
|
16
|
+
'pinia/never-export-initialized-store'?: Linter.RuleEntry<[]>
|
|
17
|
+
/**
|
|
18
|
+
* Disallow duplicate store ids.
|
|
19
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-duplicate-store-ids.md
|
|
20
|
+
*/
|
|
21
|
+
'pinia/no-duplicate-store-ids'?: Linter.RuleEntry<[]>
|
|
22
|
+
/**
|
|
23
|
+
* Disallows returning globally provided properties from Pinia stores.
|
|
24
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-return-global-properties.md
|
|
25
|
+
*/
|
|
26
|
+
'pinia/no-return-global-properties'?: Linter.RuleEntry<[]>
|
|
27
|
+
/**
|
|
28
|
+
* Encourages defining each store in a separate file.
|
|
29
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/prefer-single-store-per-file.md
|
|
30
|
+
*/
|
|
31
|
+
'pinia/prefer-single-store-per-file'?: Linter.RuleEntry<[]>
|
|
32
|
+
/**
|
|
33
|
+
* Enforces the convention of naming stores with the prefix `use` followed by the store name.
|
|
34
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/prefer-use-store-naming-convention.md
|
|
35
|
+
*/
|
|
36
|
+
'pinia/prefer-use-store-naming-convention'?: Linter.RuleEntry<PiniaPreferUseStoreNamingConvention>
|
|
37
|
+
/**
|
|
38
|
+
* In setup stores all state properties must be exported.
|
|
39
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/require-setup-store-properties-export.md
|
|
40
|
+
*/
|
|
41
|
+
'pinia/require-setup-store-properties-export'?: Linter.RuleEntry<[]>
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* ======= Declarations ======= */
|
|
45
|
+
// ----- pinia/prefer-use-store-naming-convention -----
|
|
46
|
+
type PiniaPreferUseStoreNamingConvention = []|[{
|
|
47
|
+
checkStoreNameMismatch?: boolean
|
|
48
|
+
storeSuffix?: string
|
|
49
|
+
[k: string]: unknown | undefined
|
|
50
|
+
}]
|
|
51
|
+
|
|
52
|
+
type AntfuOptions = Parameters<typeof antfu>[0];
|
|
53
|
+
type Rules = RuleOptions;
|
|
54
|
+
type TypedFlatConfigItem = Omit<Linter.FlatConfig<Linter.RulesRecord & Rules>, 'plugins'> & {
|
|
55
|
+
/**
|
|
56
|
+
* 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.
|
|
57
|
+
*
|
|
58
|
+
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
|
|
59
|
+
*/
|
|
60
|
+
plugins?: Record<string, any>;
|
|
61
|
+
};
|
|
62
|
+
interface OptionsOverrides {
|
|
63
|
+
overrides?: TypedFlatConfigItem['rules'];
|
|
64
|
+
}
|
|
65
|
+
type OptionsConfig = Omit<AntfuOptions, 'overrides'> & {
|
|
66
|
+
/**
|
|
67
|
+
* Enable Pinia support.
|
|
68
|
+
*
|
|
69
|
+
* @default auto-detect based on the dependencies
|
|
70
|
+
*/
|
|
71
|
+
pinia?: boolean | OptionsOverrides;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
declare function vida(options?: OptionsConfig & TypedFlatConfigItem$1, ...userConfigs: TypedFlatConfigItem$1[]): eslint_flat_config_utils.FlatConfigComposer<TypedFlatConfigItem$1, _antfu_eslint_config.ConfigNames>;
|
|
75
|
+
|
|
76
|
+
export { vida as default, vida };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,76 @@
|
|
|
1
1
|
import * as eslint_flat_config_utils from 'eslint-flat-config-utils';
|
|
2
2
|
import * as _antfu_eslint_config from '@antfu/eslint-config';
|
|
3
|
-
import { antfu, TypedFlatConfigItem } from '@antfu/eslint-config';
|
|
3
|
+
import { antfu, TypedFlatConfigItem as TypedFlatConfigItem$1 } from '@antfu/eslint-config';
|
|
4
4
|
export * from '@antfu/eslint-config';
|
|
5
|
+
import { Linter } from 'eslint';
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
/* prettier-ignore */
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
interface RuleOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Never export an initialized named or default store.
|
|
14
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/never-export-initialized-store.md
|
|
15
|
+
*/
|
|
16
|
+
'pinia/never-export-initialized-store'?: Linter.RuleEntry<[]>
|
|
17
|
+
/**
|
|
18
|
+
* Disallow duplicate store ids.
|
|
19
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-duplicate-store-ids.md
|
|
20
|
+
*/
|
|
21
|
+
'pinia/no-duplicate-store-ids'?: Linter.RuleEntry<[]>
|
|
22
|
+
/**
|
|
23
|
+
* Disallows returning globally provided properties from Pinia stores.
|
|
24
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-return-global-properties.md
|
|
25
|
+
*/
|
|
26
|
+
'pinia/no-return-global-properties'?: Linter.RuleEntry<[]>
|
|
27
|
+
/**
|
|
28
|
+
* Encourages defining each store in a separate file.
|
|
29
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/prefer-single-store-per-file.md
|
|
30
|
+
*/
|
|
31
|
+
'pinia/prefer-single-store-per-file'?: Linter.RuleEntry<[]>
|
|
32
|
+
/**
|
|
33
|
+
* Enforces the convention of naming stores with the prefix `use` followed by the store name.
|
|
34
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/prefer-use-store-naming-convention.md
|
|
35
|
+
*/
|
|
36
|
+
'pinia/prefer-use-store-naming-convention'?: Linter.RuleEntry<PiniaPreferUseStoreNamingConvention>
|
|
37
|
+
/**
|
|
38
|
+
* In setup stores all state properties must be exported.
|
|
39
|
+
* @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/require-setup-store-properties-export.md
|
|
40
|
+
*/
|
|
41
|
+
'pinia/require-setup-store-properties-export'?: Linter.RuleEntry<[]>
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* ======= Declarations ======= */
|
|
45
|
+
// ----- pinia/prefer-use-store-naming-convention -----
|
|
46
|
+
type PiniaPreferUseStoreNamingConvention = []|[{
|
|
47
|
+
checkStoreNameMismatch?: boolean
|
|
48
|
+
storeSuffix?: string
|
|
49
|
+
[k: string]: unknown | undefined
|
|
50
|
+
}]
|
|
5
51
|
|
|
6
52
|
type AntfuOptions = Parameters<typeof antfu>[0];
|
|
7
|
-
type
|
|
53
|
+
type Rules = RuleOptions;
|
|
54
|
+
type TypedFlatConfigItem = Omit<Linter.FlatConfig<Linter.RulesRecord & Rules>, 'plugins'> & {
|
|
55
|
+
/**
|
|
56
|
+
* 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.
|
|
57
|
+
*
|
|
58
|
+
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
|
|
59
|
+
*/
|
|
60
|
+
plugins?: Record<string, any>;
|
|
61
|
+
};
|
|
62
|
+
interface OptionsOverrides {
|
|
63
|
+
overrides?: TypedFlatConfigItem['rules'];
|
|
64
|
+
}
|
|
65
|
+
type OptionsConfig = Omit<AntfuOptions, 'overrides'> & {
|
|
8
66
|
/**
|
|
9
67
|
* Enable Pinia support.
|
|
10
68
|
*
|
|
11
69
|
* @default auto-detect based on the dependencies
|
|
12
70
|
*/
|
|
13
|
-
pinia?: boolean;
|
|
71
|
+
pinia?: boolean | OptionsOverrides;
|
|
14
72
|
};
|
|
15
73
|
|
|
16
|
-
declare function vida(options?: OptionsConfig & TypedFlatConfigItem, ...userConfigs: TypedFlatConfigItem[]): eslint_flat_config_utils.FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config.ConfigNames>;
|
|
74
|
+
declare function vida(options?: OptionsConfig & TypedFlatConfigItem$1, ...userConfigs: TypedFlatConfigItem$1[]): eslint_flat_config_utils.FlatConfigComposer<TypedFlatConfigItem$1, _antfu_eslint_config.ConfigNames>;
|
|
17
75
|
|
|
18
76
|
export { vida as default, vida };
|
package/dist/index.js
CHANGED
|
@@ -1,30 +1,37 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import antfu from "@antfu/eslint-config";
|
|
2
|
+
import antfu, { resolveSubOptions } from "@antfu/eslint-config";
|
|
3
3
|
import { isPackageExists } from "local-pkg";
|
|
4
4
|
|
|
5
5
|
// src/configs/pinia.ts
|
|
6
|
-
import { GLOB_JS, GLOB_TS } from "@antfu/eslint-config";
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
import { GLOB_JS, GLOB_TS, interopDefault } from "@antfu/eslint-config";
|
|
7
|
+
var GLOB_PINIA_JS = `**/stores/${GLOB_JS}`;
|
|
8
|
+
var GLOB_PINIA_TS = `**/stores/${GLOB_TS}`;
|
|
9
|
+
async function pinia(options = {}) {
|
|
10
|
+
const {
|
|
11
|
+
files = [GLOB_PINIA_JS, GLOB_PINIA_TS],
|
|
12
|
+
overrides: overrides2 = {}
|
|
13
|
+
} = options;
|
|
14
|
+
return [
|
|
15
|
+
{
|
|
16
|
+
name: "@vida/pinia",
|
|
17
|
+
files,
|
|
18
|
+
plugins: {
|
|
19
|
+
pinia: await interopDefault(import("eslint-plugin-pinia"))
|
|
20
|
+
},
|
|
21
|
+
rules: {
|
|
22
|
+
"pinia/never-export-initialized-store": "error",
|
|
23
|
+
"pinia/prefer-single-store-per-file": "warn",
|
|
24
|
+
"pinia/prefer-use-store-naming-convention": ["error", {
|
|
25
|
+
checkStoreNameMismatch: true,
|
|
26
|
+
storeSuffix: "Store"
|
|
27
|
+
}],
|
|
28
|
+
"pinia/require-setup-store-properties-export": "warn",
|
|
29
|
+
"pinia/no-duplicate-store-ids": "error",
|
|
30
|
+
...overrides2
|
|
31
|
+
}
|
|
25
32
|
}
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
];
|
|
34
|
+
}
|
|
28
35
|
|
|
29
36
|
// src/overrides/javascript.ts
|
|
30
37
|
var javascript = {
|
|
@@ -33,6 +40,12 @@ var javascript = {
|
|
|
33
40
|
"require-atomic-updates": ["error", { allowProperties: true }]
|
|
34
41
|
};
|
|
35
42
|
|
|
43
|
+
// src/overrides/stylistic.ts
|
|
44
|
+
var stylistic = {
|
|
45
|
+
"style/arrow-parens": ["error", "always"],
|
|
46
|
+
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }]
|
|
47
|
+
};
|
|
48
|
+
|
|
36
49
|
// src/overrides/vue.ts
|
|
37
50
|
var vue = {
|
|
38
51
|
"vue/max-attributes-per-line": ["error", {
|
|
@@ -41,6 +54,13 @@ var vue = {
|
|
|
41
54
|
}]
|
|
42
55
|
};
|
|
43
56
|
|
|
57
|
+
// src/overrides/index.ts
|
|
58
|
+
var overrides = {
|
|
59
|
+
javascript,
|
|
60
|
+
stylistic,
|
|
61
|
+
vue
|
|
62
|
+
};
|
|
63
|
+
|
|
44
64
|
// src/index.ts
|
|
45
65
|
export * from "@antfu/eslint-config";
|
|
46
66
|
function vida(options = {}, ...userConfigs) {
|
|
@@ -49,24 +69,23 @@ function vida(options = {}, ...userConfigs) {
|
|
|
49
69
|
} = options;
|
|
50
70
|
const configs = [];
|
|
51
71
|
if (enablePinia)
|
|
52
|
-
configs.push(pinia);
|
|
72
|
+
configs.push(pinia(resolveSubOptions(options, "pinia")));
|
|
53
73
|
const antfuConfig = {
|
|
54
74
|
stylistic: {
|
|
55
75
|
indent: 2,
|
|
56
76
|
quotes: "single",
|
|
57
77
|
semi: false,
|
|
58
|
-
overrides:
|
|
59
|
-
"style/arrow-parens": ["error", "always"],
|
|
60
|
-
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }]
|
|
61
|
-
}
|
|
78
|
+
overrides: overrides.stylistic
|
|
62
79
|
},
|
|
63
80
|
javascript: {
|
|
64
|
-
overrides: javascript
|
|
81
|
+
overrides: overrides.javascript
|
|
65
82
|
},
|
|
66
83
|
vue: {
|
|
67
|
-
overrides: vue
|
|
84
|
+
overrides: overrides.vue
|
|
68
85
|
},
|
|
69
|
-
|
|
86
|
+
settings: {
|
|
87
|
+
"import-x/resolver": "oxc"
|
|
88
|
+
}
|
|
70
89
|
};
|
|
71
90
|
return antfu(
|
|
72
91
|
{
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vida0905/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@9.
|
|
4
|
+
"version": "0.4.1",
|
|
5
|
+
"packageManager": "pnpm@9.5.0",
|
|
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",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"lint:fix": "eslint . --fix",
|
|
34
34
|
"dev": "tsup --watch",
|
|
35
35
|
"inspect": "npx @eslint/config-inspector",
|
|
36
|
-
"
|
|
36
|
+
"typegen": "tsx scripts/typegen",
|
|
37
|
+
"build": "npm run typegen && tsup",
|
|
37
38
|
"release": "npm run lint && npm run typecheck && bumpp",
|
|
38
39
|
"typecheck": "tsc --noEmit",
|
|
39
40
|
"prepack": "npm run build",
|
|
@@ -53,18 +54,22 @@
|
|
|
53
54
|
}
|
|
54
55
|
},
|
|
55
56
|
"dependencies": {
|
|
56
|
-
"@antfu/eslint-config": "^2.
|
|
57
|
-
"eslint-
|
|
57
|
+
"@antfu/eslint-config": "^2.22.4",
|
|
58
|
+
"eslint-import-resolver-oxc": "^0.2.0",
|
|
59
|
+
"eslint-plugin-pinia": "^0.2.0",
|
|
58
60
|
"local-pkg": "^0.5.0"
|
|
59
61
|
},
|
|
60
62
|
"devDependencies": {
|
|
61
|
-
"@eslint/config-inspector": "^0.5.
|
|
63
|
+
"@eslint/config-inspector": "^0.5.1",
|
|
64
|
+
"@types/node": "^20.14.11",
|
|
62
65
|
"bumpp": "^9.4.1",
|
|
63
|
-
"eslint": "^9.
|
|
66
|
+
"eslint": "^9.7.0",
|
|
67
|
+
"eslint-typegen": "^0.2.4",
|
|
64
68
|
"lint-staged": "^15.2.7",
|
|
65
69
|
"simple-git-hooks": "^2.11.1",
|
|
66
70
|
"tsup": "^8.1.0",
|
|
67
|
-
"
|
|
71
|
+
"tsx": "^4.16.2",
|
|
72
|
+
"typescript": "^5.5.3"
|
|
68
73
|
},
|
|
69
74
|
"simple-git-hooks": {
|
|
70
75
|
"pre-commit": "npx lint-staged"
|