@lightwing/eslint-config 1.0.150 → 1.0.152

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,82 +1,45 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- default: () => index_default
24
- });
25
- module.exports = __toCommonJS(index_exports);
26
- var import_eslint_config = require("@antfu/eslint-config");
1
+ let _antfu_eslint_config = require("@antfu/eslint-config");
2
+ //#region src/index.ts
27
3
  function lightwing(options = {}, ...userConfigs) {
28
- const lightwingConfigs = [
29
- {
30
- rules: {
31
- "node/prefer-global/process": "off",
32
- "unicorn/consistent-function-scoping": "off"
33
- }
34
- },
35
- {
36
- files: [
37
- "**/*.{adapter,gateway,guard}.{ts,js}",
38
- "**/*.{module,service,controller,middleware}.{ts,js}",
39
- "**/*.{model,entity,repository,mapper,validator,helper,strategy}.{ts,js}",
40
- "**/*.{mcp,tool,prompt,resource}.{ts,js}"
41
- ],
42
- rules: {
43
- "ts/interface-name-prefix": "off",
44
- "ts/consistent-type-imports": "off",
45
- "react/no-forward-ref": "off"
46
- }
47
- },
48
- {
49
- files: [
50
- "**/*.{ts,js,tsx,jsx}"
51
- ],
52
- rules: {
53
- "ts/no-unused-vars": [
54
- "error",
55
- {
56
- argsIgnorePattern: "^_",
57
- varsIgnorePattern: "^_",
58
- caughtErrorsIgnorePattern: "^_"
59
- }
60
- ]
61
- }
62
- },
63
- {
64
- files: ["pnpm-workspace.yaml"],
65
- rules: {
66
- "yaml/sort-keys": "off"
67
- }
68
- }
69
- ];
70
- const defaultOpts = {
71
- formatters: {
72
- css: true,
73
- html: true,
74
- markdown: "prettier"
75
- }
76
- };
77
- return (0, import_eslint_config.antfu)({
78
- ...defaultOpts,
79
- ...options
80
- }, ...lightwingConfigs, ...userConfigs);
4
+ const lightwingConfigs = [
5
+ { rules: {
6
+ "node/prefer-global/process": "off",
7
+ "unicorn/consistent-function-scoping": "off"
8
+ } },
9
+ {
10
+ files: [
11
+ "**/*.{adapter,gateway,guard}.{ts,js}",
12
+ "**/*.{module,service,controller,middleware}.{ts,js}",
13
+ "**/*.{model,entity,repository,mapper,validator,helper,strategy}.{ts,js}",
14
+ "**/*.{mcp,tool,prompt,resource}.{ts,js}"
15
+ ],
16
+ rules: {
17
+ "ts/interface-name-prefix": "off",
18
+ "ts/consistent-type-imports": "off",
19
+ "react/no-forward-ref": "off"
20
+ }
21
+ },
22
+ {
23
+ files: ["**/*.{ts,js,tsx,jsx}"],
24
+ rules: { "ts/no-unused-vars": ["error", {
25
+ argsIgnorePattern: "^_",
26
+ varsIgnorePattern: "^_",
27
+ caughtErrorsIgnorePattern: "^_"
28
+ }] }
29
+ },
30
+ {
31
+ files: ["pnpm-workspace.yaml"],
32
+ rules: { "yaml/sort-keys": "off" }
33
+ }
34
+ ];
35
+ return (0, _antfu_eslint_config.antfu)({
36
+ formatters: {
37
+ css: true,
38
+ html: true,
39
+ markdown: "prettier"
40
+ },
41
+ ...options
42
+ }, ...lightwingConfigs, ...userConfigs);
81
43
  }
82
- var index_default = lightwing;
44
+ //#endregion
45
+ module.exports = lightwing;
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- import * as _antfu_eslint_config from '@antfu/eslint-config';
2
- import { OptionsConfig, TypedFlatConfigItem, Awaitable } from '@antfu/eslint-config';
3
- import { Linter } from 'eslint';
4
- import { FlatConfigComposer } from 'eslint-flat-config-utils';
1
+ import * as _$_antfu_eslint_config0 from "@antfu/eslint-config";
2
+ import { Awaitable, OptionsConfig, TypedFlatConfigItem } from "@antfu/eslint-config";
3
+ import { Linter } from "eslint";
4
+ import { FlatConfigComposer } from "eslint-flat-config-utils";
5
5
 
6
- declare function lightwing(options?: OptionsConfig & TypedFlatConfigItem, ...userConfigs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config.ConfigNames>;
7
-
8
- export { lightwing as default };
6
+ //#region src/index.d.ts
7
+ declare function lightwing(options?: OptionsConfig & TypedFlatConfigItem, ...userConfigs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<TypedFlatConfigItem, _$_antfu_eslint_config0.ConfigNames>;
8
+ export = lightwing;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import * as _antfu_eslint_config from '@antfu/eslint-config';
2
- import { OptionsConfig, TypedFlatConfigItem, Awaitable } from '@antfu/eslint-config';
3
- import { Linter } from 'eslint';
4
- import { FlatConfigComposer } from 'eslint-flat-config-utils';
1
+ import * as _$_antfu_eslint_config0 from "@antfu/eslint-config";
2
+ import { Awaitable, OptionsConfig, TypedFlatConfigItem } from "@antfu/eslint-config";
3
+ import { Linter } from "eslint";
4
+ import { FlatConfigComposer } from "eslint-flat-config-utils";
5
5
 
6
- declare function lightwing(options?: OptionsConfig & TypedFlatConfigItem, ...userConfigs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<TypedFlatConfigItem, _antfu_eslint_config.ConfigNames>;
7
-
8
- export { lightwing as default };
6
+ //#region src/index.d.ts
7
+ declare function lightwing(options?: OptionsConfig & TypedFlatConfigItem, ...userConfigs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<TypedFlatConfigItem, _$_antfu_eslint_config0.ConfigNames>;
8
+ //#endregion
9
+ export { lightwing as default };
package/dist/index.js CHANGED
@@ -1,61 +1,45 @@
1
- // src/index.ts
2
1
  import { antfu } from "@antfu/eslint-config";
2
+ //#region src/index.ts
3
3
  function lightwing(options = {}, ...userConfigs) {
4
- const lightwingConfigs = [
5
- {
6
- rules: {
7
- "node/prefer-global/process": "off",
8
- "unicorn/consistent-function-scoping": "off"
9
- }
10
- },
11
- {
12
- files: [
13
- "**/*.{adapter,gateway,guard}.{ts,js}",
14
- "**/*.{module,service,controller,middleware}.{ts,js}",
15
- "**/*.{model,entity,repository,mapper,validator,helper,strategy}.{ts,js}",
16
- "**/*.{mcp,tool,prompt,resource}.{ts,js}"
17
- ],
18
- rules: {
19
- "ts/interface-name-prefix": "off",
20
- "ts/consistent-type-imports": "off",
21
- "react/no-forward-ref": "off"
22
- }
23
- },
24
- {
25
- files: [
26
- "**/*.{ts,js,tsx,jsx}"
27
- ],
28
- rules: {
29
- "ts/no-unused-vars": [
30
- "error",
31
- {
32
- argsIgnorePattern: "^_",
33
- varsIgnorePattern: "^_",
34
- caughtErrorsIgnorePattern: "^_"
35
- }
36
- ]
37
- }
38
- },
39
- {
40
- files: ["pnpm-workspace.yaml"],
41
- rules: {
42
- "yaml/sort-keys": "off"
43
- }
44
- }
45
- ];
46
- const defaultOpts = {
47
- formatters: {
48
- css: true,
49
- html: true,
50
- markdown: "prettier"
51
- }
52
- };
53
- return antfu({
54
- ...defaultOpts,
55
- ...options
56
- }, ...lightwingConfigs, ...userConfigs);
4
+ const lightwingConfigs = [
5
+ { rules: {
6
+ "node/prefer-global/process": "off",
7
+ "unicorn/consistent-function-scoping": "off"
8
+ } },
9
+ {
10
+ files: [
11
+ "**/*.{adapter,gateway,guard}.{ts,js}",
12
+ "**/*.{module,service,controller,middleware}.{ts,js}",
13
+ "**/*.{model,entity,repository,mapper,validator,helper,strategy}.{ts,js}",
14
+ "**/*.{mcp,tool,prompt,resource}.{ts,js}"
15
+ ],
16
+ rules: {
17
+ "ts/interface-name-prefix": "off",
18
+ "ts/consistent-type-imports": "off",
19
+ "react/no-forward-ref": "off"
20
+ }
21
+ },
22
+ {
23
+ files: ["**/*.{ts,js,tsx,jsx}"],
24
+ rules: { "ts/no-unused-vars": ["error", {
25
+ argsIgnorePattern: "^_",
26
+ varsIgnorePattern: "^_",
27
+ caughtErrorsIgnorePattern: "^_"
28
+ }] }
29
+ },
30
+ {
31
+ files: ["pnpm-workspace.yaml"],
32
+ rules: { "yaml/sort-keys": "off" }
33
+ }
34
+ ];
35
+ return antfu({
36
+ formatters: {
37
+ css: true,
38
+ html: true,
39
+ markdown: "prettier"
40
+ },
41
+ ...options
42
+ }, ...lightwingConfigs, ...userConfigs);
57
43
  }
58
- var index_default = lightwing;
59
- export {
60
- index_default as default
61
- };
44
+ //#endregion
45
+ export { lightwing as default };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lightwing/eslint-config",
3
3
  "type": "module",
4
- "version": "1.0.150",
4
+ "version": "1.0.152",
5
5
  "description": "Lightwing ESLint config",
6
6
  "author": "Archer Gu (https://github.com/ArcherGu/)",
7
7
  "license": "MIT",
@@ -30,15 +30,15 @@
30
30
  "typescript": ">=4.0.0"
31
31
  },
32
32
  "dependencies": {
33
- "@antfu/eslint-config": "^7.7.3",
34
- "@eslint-react/eslint-plugin": "^3.0.0",
35
- "@unocss/eslint-plugin": "^66.6.6",
36
- "eslint-flat-config-utils": "^3.0.2",
33
+ "@antfu/eslint-config": "^8.0.0",
34
+ "@eslint-react/eslint-plugin": "^4.2.1",
35
+ "@unocss/eslint-plugin": "^66.6.7",
36
+ "eslint-flat-config-utils": "^3.1.0",
37
37
  "eslint-plugin-format": "^2.0.1",
38
38
  "eslint-plugin-react-hooks": "^7.0.1",
39
39
  "eslint-plugin-react-refresh": "^0.5.2"
40
40
  },
41
41
  "scripts": {
42
- "build": "tsup src/index.ts --format esm,cjs --clean --dts"
42
+ "build": "tsdown src/index.ts --format esm --format cjs --clean --dts --no-fixed-extension"
43
43
  }
44
44
  }