@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 CHANGED
@@ -1,71 +1,53 @@
1
- "use strict";
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
- 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;
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
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
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
- // src/index.ts
31
- var index_exports = {};
32
- __export(index_exports, {
33
- curev: () => curev,
34
- default: () => index_default,
35
- defaultConfig: () => defaultConfig
36
- });
37
- module.exports = __toCommonJS(index_exports);
38
- var import_eslint_config = require("@antfu/eslint-config");
39
- var import_defu = __toESM(require("defu"), 1);
40
- var defaultConfig = {
41
- stylistic: {
42
- indent: 2,
43
- semi: true,
44
- quotes: "double",
45
- overrides: {
46
- "style/comma-dangle": ["error", "only-multiline"],
47
- "style/brace-style": ["error", "1tbs"],
48
- "style/arrow-parens": ["error", "always"],
49
- "style/multiline-ternary": ["error", "always-multiline"],
50
- "curly": ["error", "multi-line", "consistent"]
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
- return (0, import_eslint_config.antfu)((0, import_defu.default)(
62
- options,
63
- defaultConfig
64
- ), ...userConfigs);
46
+ return (0, __antfu_eslint_config.antfu)((0, defu.default)(options, defaultConfig), ...userConfigs);
65
47
  }
66
- var index_default = curev;
67
- // Annotate the CommonJS export names for ESM import in node:
68
- 0 && (module.exports = {
69
- curev,
70
- defaultConfig
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 * as _antfu_eslint_config from '@antfu/eslint-config';
2
- import { OptionsConfig, TypedFlatConfigItem } from '@antfu/eslint-config';
3
- import { Linter } from 'eslint';
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: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config.ConfigNames>;
9
-
10
- export { type CurevOptions, curev, curev as default, defaultConfig };
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 * as _antfu_eslint_config from '@antfu/eslint-config';
2
- import { OptionsConfig, TypedFlatConfigItem } from '@antfu/eslint-config';
3
- import { Linter } from 'eslint';
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: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config.ConfigNames>;
9
-
10
- export { type CurevOptions, curev, curev as default, defaultConfig };
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
- var defaultConfig = {
5
- 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": ["error", "multi-line", "consistent"]
15
- }
16
- },
17
- unocss: {
18
- overrides: {
19
- "unocss/order": ["error"]
20
- },
21
- strict: true
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
- return antfu(defu(
26
- options,
27
- defaultConfig
28
- ), ...userConfigs);
22
+ return antfu(defu(options, defaultConfig), ...userConfigs);
29
23
  }
30
- var index_default = curev;
31
- export {
32
- curev,
33
- index_default as default,
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.2",
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
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js"
12
- }
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./package.json": "./package.json"
13
14
  },
14
- "main": "./dist/index.js",
15
- "types": "./dist/index.d.ts",
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": "^3.14.0",
25
+ "@antfu/eslint-config": "^4.16.1",
24
26
  "defu": "^6.1.4"
25
27
  },
26
28
  "devDependencies": {
27
- "@antfu/ni": "^23.2.0",
28
- "@eslint/config-inspector": "^1.0.0",
29
+ "@antfu/ni": "^25.0.0",
30
+ "@eslint/config-inspector": "^1.1.0",
29
31
  "@types/fs-extra": "^11.0.4",
30
- "@types/node": "^20.17.13",
31
- "bumpp": "^9.10.1",
32
- "eslint": "^9.18.0",
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.5.2",
37
+ "execa": "^9.6.0",
35
38
  "fast-glob": "^3.3.3",
36
- "fs-extra": "^11.2.0",
37
- "lint-staged": "^15.3.0",
38
- "simple-git-hooks": "^2.11.1",
39
- "taze": "^18.2.0",
40
- "tsup": "^8.3.5",
41
- "typescript": "^5.7.3",
42
- "vitest": "^2.1.8"
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.4.1",
46
- "@typescript-eslint/utils": "^8.20.0",
47
- "eslint": "^9.18.0",
48
- "tsx": "^4.19.2"
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": "tsup --format esm,cjs --clean --dts",
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 .",