@lightwing/eslint-config 1.0.151 → 1.0.153
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 +43 -80
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +42 -58
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -1,82 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
44
|
+
//#endregion
|
|
45
|
+
module.exports = lightwing;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { OptionsConfig, TypedFlatConfigItem
|
|
3
|
-
import { Linter } from
|
|
4
|
-
import { FlatConfigComposer } from
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
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
|
|
2
|
-
import { OptionsConfig, TypedFlatConfigItem
|
|
3
|
-
import { Linter } from
|
|
4
|
-
import { FlatConfigComposer } from
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
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
|
-
|
|
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.
|
|
4
|
+
"version": "1.0.153",
|
|
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": "^
|
|
34
|
-
"@eslint-react/eslint-plugin": "^
|
|
35
|
-
"@unocss/eslint-plugin": "^66.6.
|
|
36
|
-
"eslint-flat-config-utils": "^3.0
|
|
33
|
+
"@antfu/eslint-config": "^8.1.1",
|
|
34
|
+
"@eslint-react/eslint-plugin": "^4.2.3",
|
|
35
|
+
"@unocss/eslint-plugin": "^66.6.8",
|
|
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": "
|
|
42
|
+
"build": "tsdown src/index.ts --format esm --format cjs --clean --dts --no-fixed-extension"
|
|
43
43
|
}
|
|
44
44
|
}
|