@curev/eslint-config 0.4.2 → 0.5.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 +42 -60
- package/dist/index.d.cts +10 -7
- package/dist/index.d.ts +10 -7
- package/dist/index.js +23 -31
- package/package.json +28 -26
package/dist/index.cjs
CHANGED
|
@@ -1,71 +1,53 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
//#region rolldown:runtime
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
8
|
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
9
|
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
29
23
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
unocss: {
|
|
54
|
-
overrides: {
|
|
55
|
-
"unocss/order": ["error"]
|
|
56
|
-
},
|
|
57
|
-
strict: true
|
|
58
|
-
}
|
|
59
|
-
};
|
|
24
|
+
//#endregion
|
|
25
|
+
const __antfu_eslint_config = __toESM(require("@antfu/eslint-config"));
|
|
26
|
+
const defu = __toESM(require("defu"));
|
|
27
|
+
|
|
28
|
+
//#region src/index.ts
|
|
29
|
+
const defaultConfig = { stylistic: {
|
|
30
|
+
indent: 2,
|
|
31
|
+
semi: true,
|
|
32
|
+
quotes: "double",
|
|
33
|
+
overrides: {
|
|
34
|
+
"style/comma-dangle": ["error", "only-multiline"],
|
|
35
|
+
"style/brace-style": ["error", "1tbs"],
|
|
36
|
+
"style/arrow-parens": ["error", "always"],
|
|
37
|
+
"style/multiline-ternary": ["error", "always-multiline"],
|
|
38
|
+
"curly": [
|
|
39
|
+
"error",
|
|
40
|
+
"multi-line",
|
|
41
|
+
"consistent"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
} };
|
|
60
45
|
function curev(options = {}, ...userConfigs) {
|
|
61
|
-
|
|
62
|
-
options,
|
|
63
|
-
defaultConfig
|
|
64
|
-
), ...userConfigs);
|
|
46
|
+
return (0, __antfu_eslint_config.antfu)((0, defu.default)(options, defaultConfig), ...userConfigs);
|
|
65
47
|
}
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
48
|
+
var src_default = curev;
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
exports.curev = curev;
|
|
52
|
+
exports.default = src_default;
|
|
53
|
+
exports.defaultConfig = defaultConfig;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Awaitable, FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
1
|
+
import { ConfigNames, OptionsConfig, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
2
|
+
import { Linter } from "eslint";
|
|
3
|
+
import { Awaitable, FlatConfigComposer } from "eslint-flat-config-utils";
|
|
5
4
|
|
|
5
|
+
//#region src/index.d.ts
|
|
6
6
|
type CurevOptions = OptionsConfig & Omit<TypedFlatConfigItem, "files">;
|
|
7
|
+
type CurevUserConfig = Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>;
|
|
8
|
+
type CurevConfigNames = ConfigNames;
|
|
9
|
+
type CurevConfigs = FlatConfigComposer<TypedFlatConfigItem, CurevConfigNames>;
|
|
7
10
|
declare const defaultConfig: CurevOptions;
|
|
8
|
-
declare function curev(options?: CurevOptions, ...userConfigs:
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
+
declare function curev(options?: CurevOptions, ...userConfigs: CurevUserConfig[]): CurevConfigs;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { CurevConfigNames, CurevConfigs, CurevOptions, CurevUserConfig, curev, curev as default, defaultConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Awaitable, FlatConfigComposer } from 'eslint-flat-config-utils';
|
|
1
|
+
import { ConfigNames, OptionsConfig, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
2
|
+
import { Linter } from "eslint";
|
|
3
|
+
import { Awaitable, FlatConfigComposer } from "eslint-flat-config-utils";
|
|
5
4
|
|
|
5
|
+
//#region src/index.d.ts
|
|
6
6
|
type CurevOptions = OptionsConfig & Omit<TypedFlatConfigItem, "files">;
|
|
7
|
+
type CurevUserConfig = Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>;
|
|
8
|
+
type CurevConfigNames = ConfigNames;
|
|
9
|
+
type CurevConfigs = FlatConfigComposer<TypedFlatConfigItem, CurevConfigNames>;
|
|
7
10
|
declare const defaultConfig: CurevOptions;
|
|
8
|
-
declare function curev(options?: CurevOptions, ...userConfigs:
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
+
declare function curev(options?: CurevOptions, ...userConfigs: CurevUserConfig[]): CurevConfigs;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { CurevConfigNames, CurevConfigs, CurevOptions, CurevUserConfig, curev, curev as default, defaultConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,35 +1,27 @@
|
|
|
1
|
-
// src/index.ts
|
|
2
1
|
import { antfu } from "@antfu/eslint-config";
|
|
3
2
|
import defu from "defu";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
};
|
|
3
|
+
|
|
4
|
+
//#region src/index.ts
|
|
5
|
+
const defaultConfig = { stylistic: {
|
|
6
|
+
indent: 2,
|
|
7
|
+
semi: true,
|
|
8
|
+
quotes: "double",
|
|
9
|
+
overrides: {
|
|
10
|
+
"style/comma-dangle": ["error", "only-multiline"],
|
|
11
|
+
"style/brace-style": ["error", "1tbs"],
|
|
12
|
+
"style/arrow-parens": ["error", "always"],
|
|
13
|
+
"style/multiline-ternary": ["error", "always-multiline"],
|
|
14
|
+
"curly": [
|
|
15
|
+
"error",
|
|
16
|
+
"multi-line",
|
|
17
|
+
"consistent"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
} };
|
|
24
21
|
function curev(options = {}, ...userConfigs) {
|
|
25
|
-
|
|
26
|
-
options,
|
|
27
|
-
defaultConfig
|
|
28
|
-
), ...userConfigs);
|
|
22
|
+
return antfu(defu(options, defaultConfig), ...userConfigs);
|
|
29
23
|
}
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
defaultConfig
|
|
35
|
-
};
|
|
24
|
+
var src_default = curev;
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { curev, src_default as default, defaultConfig };
|
package/package.json
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curev/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.1",
|
|
5
5
|
"author": "Chizuki<chizukicn@outlook.com> (https://github.com/chizukicn/)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/curev/eslint-config",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
}
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.cjs"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
13
14
|
},
|
|
14
|
-
"main": "./dist/index.
|
|
15
|
-
"
|
|
15
|
+
"main": "./dist/index.cjs",
|
|
16
|
+
"module": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.cts",
|
|
16
18
|
"files": [
|
|
17
19
|
"dist"
|
|
18
20
|
],
|
|
@@ -20,32 +22,33 @@
|
|
|
20
22
|
"eslint": "^9.10.0"
|
|
21
23
|
},
|
|
22
24
|
"dependencies": {
|
|
23
|
-
"@antfu/eslint-config": "^
|
|
25
|
+
"@antfu/eslint-config": "^4.16.1",
|
|
24
26
|
"defu": "^6.1.4"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
|
-
"@antfu/ni": "^
|
|
28
|
-
"@eslint/config-inspector": "^1.
|
|
29
|
+
"@antfu/ni": "^25.0.0",
|
|
30
|
+
"@eslint/config-inspector": "^1.1.0",
|
|
29
31
|
"@types/fs-extra": "^11.0.4",
|
|
30
|
-
"@types/node": "^
|
|
31
|
-
"bumpp": "^
|
|
32
|
-
"eslint": "^9.
|
|
32
|
+
"@types/node": "^24.0.8",
|
|
33
|
+
"bumpp": "^10.2.0",
|
|
34
|
+
"eslint": "^9.30.0",
|
|
35
|
+
"eslint-flat-config-utils": "^2.1.0",
|
|
33
36
|
"esno": "^4.8.0",
|
|
34
|
-
"execa": "^9.
|
|
37
|
+
"execa": "^9.6.0",
|
|
35
38
|
"fast-glob": "^3.3.3",
|
|
36
|
-
"fs-extra": "^11.
|
|
37
|
-
"lint-staged": "^
|
|
38
|
-
"simple-git-hooks": "^2.
|
|
39
|
-
"taze": "^
|
|
40
|
-
"
|
|
41
|
-
"typescript": "^5.
|
|
42
|
-
"vitest": "^2.
|
|
39
|
+
"fs-extra": "^11.3.0",
|
|
40
|
+
"lint-staged": "^16.1.2",
|
|
41
|
+
"simple-git-hooks": "^2.13.0",
|
|
42
|
+
"taze": "^19.1.0",
|
|
43
|
+
"tsdown": "^0.12.9",
|
|
44
|
+
"typescript": "^5.8.3",
|
|
45
|
+
"vitest": "^3.2.4"
|
|
43
46
|
},
|
|
44
47
|
"resolutions": {
|
|
45
|
-
"@eslint-community/eslint-utils": "^4.
|
|
46
|
-
"@typescript-eslint/utils": "^8.
|
|
47
|
-
"eslint": "^9.
|
|
48
|
-
"tsx": "^4.
|
|
48
|
+
"@eslint-community/eslint-utils": "^4.7.0",
|
|
49
|
+
"@typescript-eslint/utils": "^8.35.1",
|
|
50
|
+
"eslint": "^9.30.0",
|
|
51
|
+
"tsx": "^4.20.3"
|
|
49
52
|
},
|
|
50
53
|
"simple-git-hooks": {
|
|
51
54
|
"pre-commit": "npx lint-staged"
|
|
@@ -56,8 +59,7 @@
|
|
|
56
59
|
]
|
|
57
60
|
},
|
|
58
61
|
"scripts": {
|
|
59
|
-
"build": "
|
|
60
|
-
"stub": "tsup --format esm",
|
|
62
|
+
"build": "tsdown",
|
|
61
63
|
"dev": "npx @eslint/config-inspector --config eslint.config.ts",
|
|
62
64
|
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
|
|
63
65
|
"lint": "eslint --cache .",
|