@lincy/eslint-config 6.1.0 → 6.2.0
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 +197 -158
- package/dist/index.d.cts +7 -4
- package/dist/{index.d.ts → index.d.mts} +8 -5
- package/dist/{index.js → index.mjs} +158 -140
- package/package.json +25 -18
- package/dist/chunk-DWy1uDak.cjs +0 -39
- package/dist/lib-CEKTiw7V.js +0 -11176
- package/dist/lib-DS4wQk2J.cjs +0 -11153
package/dist/index.cjs
CHANGED
|
@@ -1,39 +1,60 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
2
|
+
//#region rolldown:runtime
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
+
__defProp(to, key, {
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
3
29
|
let eslint_flat_config_utils = require("eslint-flat-config-utils");
|
|
4
|
-
eslint_flat_config_utils = require_chunk.__toESM(eslint_flat_config_utils);
|
|
5
30
|
let node_process = require("node:process");
|
|
6
|
-
node_process =
|
|
31
|
+
node_process = __toESM(node_process);
|
|
7
32
|
let node_url = require("node:url");
|
|
8
|
-
node_url = require_chunk.__toESM(node_url);
|
|
9
33
|
let node_fs = require("node:fs");
|
|
10
|
-
node_fs =
|
|
34
|
+
node_fs = __toESM(node_fs);
|
|
11
35
|
let node_path = require("node:path");
|
|
12
|
-
node_path =
|
|
36
|
+
node_path = __toESM(node_path);
|
|
13
37
|
let local_pkg = require("local-pkg");
|
|
14
|
-
local_pkg = require_chunk.__toESM(local_pkg);
|
|
15
38
|
let __eslint_community_eslint_plugin_eslint_comments = require("@eslint-community/eslint-plugin-eslint-comments");
|
|
16
|
-
__eslint_community_eslint_plugin_eslint_comments =
|
|
39
|
+
__eslint_community_eslint_plugin_eslint_comments = __toESM(__eslint_community_eslint_plugin_eslint_comments);
|
|
17
40
|
let eslint_plugin_antfu = require("eslint-plugin-antfu");
|
|
18
|
-
eslint_plugin_antfu =
|
|
41
|
+
eslint_plugin_antfu = __toESM(eslint_plugin_antfu);
|
|
19
42
|
let eslint_plugin_import_lite = require("eslint-plugin-import-lite");
|
|
20
|
-
eslint_plugin_import_lite =
|
|
43
|
+
eslint_plugin_import_lite = __toESM(eslint_plugin_import_lite);
|
|
21
44
|
let eslint_plugin_n = require("eslint-plugin-n");
|
|
22
|
-
eslint_plugin_n =
|
|
45
|
+
eslint_plugin_n = __toESM(eslint_plugin_n);
|
|
23
46
|
let eslint_plugin_perfectionist = require("eslint-plugin-perfectionist");
|
|
24
|
-
eslint_plugin_perfectionist =
|
|
47
|
+
eslint_plugin_perfectionist = __toESM(eslint_plugin_perfectionist);
|
|
25
48
|
let eslint_plugin_unicorn = require("eslint-plugin-unicorn");
|
|
26
|
-
eslint_plugin_unicorn =
|
|
49
|
+
eslint_plugin_unicorn = __toESM(eslint_plugin_unicorn);
|
|
27
50
|
let eslint_plugin_unused_imports = require("eslint-plugin-unused-imports");
|
|
28
|
-
eslint_plugin_unused_imports =
|
|
51
|
+
eslint_plugin_unused_imports = __toESM(eslint_plugin_unused_imports);
|
|
29
52
|
let globals = require("globals");
|
|
30
|
-
globals =
|
|
53
|
+
globals = __toESM(globals);
|
|
31
54
|
let eslint_merge_processors = require("eslint-merge-processors");
|
|
32
|
-
eslint_merge_processors = require_chunk.__toESM(eslint_merge_processors);
|
|
33
55
|
let eslint_parser_plain = require("eslint-parser-plain");
|
|
34
|
-
eslint_parser_plain =
|
|
56
|
+
eslint_parser_plain = __toESM(eslint_parser_plain);
|
|
35
57
|
let eslint_plugin_regexp = require("eslint-plugin-regexp");
|
|
36
|
-
eslint_plugin_regexp = require_chunk.__toESM(eslint_plugin_regexp);
|
|
37
58
|
|
|
38
59
|
//#region node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
|
|
39
60
|
const toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
@@ -1013,31 +1034,109 @@ async function pnpm(options = {}) {
|
|
|
1013
1034
|
interopDefault(import("yaml-eslint-parser")),
|
|
1014
1035
|
interopDefault(import("jsonc-eslint-parser"))
|
|
1015
1036
|
]);
|
|
1016
|
-
return [
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1037
|
+
return [
|
|
1038
|
+
{
|
|
1039
|
+
files: ["package.json", "**/package.json"],
|
|
1040
|
+
languageOptions: { parser: jsoncParser },
|
|
1041
|
+
name: "eslint/pnpm/package-json",
|
|
1042
|
+
plugins: { pnpm: pluginPnpm },
|
|
1043
|
+
rules: {
|
|
1044
|
+
"pnpm/json-enforce-catalog": ["error", { autofix: !options.isInEditor }],
|
|
1045
|
+
"pnpm/json-prefer-workspace-settings": ["error", { autofix: !options.isInEditor }],
|
|
1046
|
+
"pnpm/json-valid-catalog": ["error", { autofix: !options.isInEditor }]
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
files: ["pnpm-workspace.yaml"],
|
|
1051
|
+
languageOptions: { parser: yamlParser },
|
|
1052
|
+
name: "eslint/pnpm/pnpm-workspace-yaml",
|
|
1053
|
+
plugins: { pnpm: pluginPnpm },
|
|
1054
|
+
rules: {
|
|
1055
|
+
"pnpm/yaml-enforce-settings": ["error", { settings: {
|
|
1056
|
+
catalogMode: "prefer",
|
|
1057
|
+
shellEmulator: true
|
|
1058
|
+
} }],
|
|
1059
|
+
"pnpm/yaml-no-duplicate-catalog-item": "error",
|
|
1060
|
+
"pnpm/yaml-no-unused-catalog-item": "error"
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
files: ["pnpm-workspace.yaml"],
|
|
1065
|
+
name: "eslint/yaml/pnpm-workspace",
|
|
1066
|
+
rules: { "yaml/sort-keys": [
|
|
1067
|
+
"error",
|
|
1068
|
+
{
|
|
1069
|
+
order: [
|
|
1070
|
+
...[
|
|
1071
|
+
"cacheDir",
|
|
1072
|
+
"catalogMode",
|
|
1073
|
+
"cleanupUnusedCatalogs",
|
|
1074
|
+
"dedupeDirectDeps",
|
|
1075
|
+
"deployAllFiles",
|
|
1076
|
+
"enablePrePostScripts",
|
|
1077
|
+
"engineStrict",
|
|
1078
|
+
"extendNodePath",
|
|
1079
|
+
"hoist",
|
|
1080
|
+
"hoistPattern",
|
|
1081
|
+
"hoistWorkspacePackages",
|
|
1082
|
+
"ignoreCompatibilityDb",
|
|
1083
|
+
"ignoreDepScripts",
|
|
1084
|
+
"ignoreScripts",
|
|
1085
|
+
"ignoreWorkspaceRootCheck",
|
|
1086
|
+
"managePackageManagerVersions",
|
|
1087
|
+
"minimumReleaseAge",
|
|
1088
|
+
"minimumReleaseAgeExclude",
|
|
1089
|
+
"modulesDir",
|
|
1090
|
+
"nodeLinker",
|
|
1091
|
+
"nodeVersion",
|
|
1092
|
+
"optimisticRepeatInstall",
|
|
1093
|
+
"packageManagerStrict",
|
|
1094
|
+
"packageManagerStrictVersion",
|
|
1095
|
+
"preferSymlinkedExecutables",
|
|
1096
|
+
"preferWorkspacePackages",
|
|
1097
|
+
"publicHoistPattern",
|
|
1098
|
+
"registrySupportsTimeField",
|
|
1099
|
+
"requiredScripts",
|
|
1100
|
+
"resolutionMode",
|
|
1101
|
+
"savePrefix",
|
|
1102
|
+
"scriptShell",
|
|
1103
|
+
"shamefullyHoist",
|
|
1104
|
+
"shellEmulator",
|
|
1105
|
+
"stateDir",
|
|
1106
|
+
"supportedArchitectures",
|
|
1107
|
+
"symlink",
|
|
1108
|
+
"tag",
|
|
1109
|
+
"trustPolicy",
|
|
1110
|
+
"trustPolicyExclude",
|
|
1111
|
+
"updateNotifier"
|
|
1112
|
+
],
|
|
1113
|
+
"packages",
|
|
1114
|
+
"overrides",
|
|
1115
|
+
"patchedDependencies",
|
|
1116
|
+
"catalog",
|
|
1117
|
+
"catalogs",
|
|
1118
|
+
...[
|
|
1119
|
+
"allowedDeprecatedVersions",
|
|
1120
|
+
"allowNonAppliedPatches",
|
|
1121
|
+
"configDependencies",
|
|
1122
|
+
"ignoredBuiltDependencies",
|
|
1123
|
+
"ignoredOptionalDependencies",
|
|
1124
|
+
"neverBuiltDependencies",
|
|
1125
|
+
"onlyBuiltDependencies",
|
|
1126
|
+
"onlyBuiltDependenciesFile",
|
|
1127
|
+
"packageExtensions",
|
|
1128
|
+
"peerDependencyRules"
|
|
1129
|
+
]
|
|
1130
|
+
],
|
|
1131
|
+
pathPattern: "^$"
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
order: { type: "asc" },
|
|
1135
|
+
pathPattern: ".*"
|
|
1136
|
+
}
|
|
1137
|
+
] }
|
|
1039
1138
|
}
|
|
1040
|
-
|
|
1139
|
+
];
|
|
1041
1140
|
}
|
|
1042
1141
|
|
|
1043
1142
|
//#endregion
|
|
@@ -1056,8 +1155,9 @@ const ReactRouterPackages = [
|
|
|
1056
1155
|
"@react-router/dev"
|
|
1057
1156
|
];
|
|
1058
1157
|
const NextJsPackages = ["next"];
|
|
1158
|
+
const ReactCompilerPackages = ["babel-plugin-react-compiler"];
|
|
1059
1159
|
async function react(options = {}) {
|
|
1060
|
-
const { files = [GLOB_SRC], filesTypeAware = [GLOB_TS, GLOB_TSX], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`], overrides = {}, tsconfigPath } = options;
|
|
1160
|
+
const { files = [GLOB_SRC], filesTypeAware = [GLOB_TS, GLOB_TSX], ignoresTypeAware = [`${GLOB_MARKDOWN}/**`], overrides = {}, reactCompiler = ReactCompilerPackages.some((i) => (0, local_pkg.isPackageExists)(i)), tsconfigPath } = options;
|
|
1061
1161
|
await ensurePackages([
|
|
1062
1162
|
"@eslint-react/eslint-plugin",
|
|
1063
1163
|
"eslint-plugin-react-hooks",
|
|
@@ -1111,6 +1211,8 @@ async function react(options = {}) {
|
|
|
1111
1211
|
"react-dom/no-unsafe-target-blank": "warn",
|
|
1112
1212
|
"react-dom/no-use-form-state": "error",
|
|
1113
1213
|
"react-dom/no-void-elements-with-children": "error",
|
|
1214
|
+
"react-hooks/exhaustive-deps": "warn",
|
|
1215
|
+
"react-hooks/rules-of-hooks": "error",
|
|
1114
1216
|
"react/jsx-no-comment-textnodes": "warn",
|
|
1115
1217
|
"react/jsx-no-duplicate-props": "warn",
|
|
1116
1218
|
"react/jsx-uses-vars": "warn",
|
|
@@ -1151,7 +1253,23 @@ async function react(options = {}) {
|
|
|
1151
1253
|
"react/no-use-context": "warn",
|
|
1152
1254
|
"react/no-useless-forward-ref": "warn",
|
|
1153
1255
|
"react/prefer-use-state-lazy-initialization": "warn",
|
|
1154
|
-
...
|
|
1256
|
+
...reactCompiler ? {
|
|
1257
|
+
"react-hooks/component-hook-factories": "error",
|
|
1258
|
+
"react-hooks/config": "error",
|
|
1259
|
+
"react-hooks/error-boundaries": "error",
|
|
1260
|
+
"react-hooks/gating": "error",
|
|
1261
|
+
"react-hooks/globals": "error",
|
|
1262
|
+
"react-hooks/immutability": "error",
|
|
1263
|
+
"react-hooks/incompatible-library": "warn",
|
|
1264
|
+
"react-hooks/preserve-manual-memoization": "error",
|
|
1265
|
+
"react-hooks/purity": "error",
|
|
1266
|
+
"react-hooks/refs": "error",
|
|
1267
|
+
"react-hooks/set-state-in-effect": "error",
|
|
1268
|
+
"react-hooks/set-state-in-render": "error",
|
|
1269
|
+
"react-hooks/static-components": "error",
|
|
1270
|
+
"react-hooks/unsupported-syntax": "warn",
|
|
1271
|
+
"react-hooks/use-memo": "error"
|
|
1272
|
+
} : {},
|
|
1155
1273
|
"react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
|
|
1156
1274
|
"react-refresh/only-export-components": ["warn", {
|
|
1157
1275
|
allowConstantExport: isAllowConstantExport,
|
|
@@ -1664,7 +1782,7 @@ async function typescript(options = {}) {
|
|
|
1664
1782
|
}] : [],
|
|
1665
1783
|
...erasableOnly ? [{
|
|
1666
1784
|
name: "eslint/typescript/erasable-syntax-only",
|
|
1667
|
-
plugins: { "erasable-syntax-only": await interopDefault(
|
|
1785
|
+
plugins: { "erasable-syntax-only": await interopDefault(import("eslint-plugin-erasable-syntax-only")) },
|
|
1668
1786
|
rules: {
|
|
1669
1787
|
"erasable-syntax-only/enums": "error",
|
|
1670
1788
|
"erasable-syntax-only/import-aliases": "error",
|
|
@@ -1940,120 +2058,41 @@ async function yaml(options = {}) {
|
|
|
1940
2058
|
const { files = [GLOB_YAML], overrides = {}, stylistic: stylistic$1 = true } = options;
|
|
1941
2059
|
const { quotes = "single" } = typeof stylistic$1 === "boolean" ? {} : stylistic$1;
|
|
1942
2060
|
const [pluginYaml, parserYaml] = await Promise.all([interopDefault(import("eslint-plugin-yml")), interopDefault(import("yaml-eslint-parser"))]);
|
|
1943
|
-
return [
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
{
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
"yaml/
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
} : {},
|
|
1977
|
-
...overrides
|
|
1978
|
-
}
|
|
1979
|
-
},
|
|
1980
|
-
{
|
|
1981
|
-
files: ["pnpm-workspace.yaml"],
|
|
1982
|
-
name: "eslint/yaml/pnpm-workspace",
|
|
1983
|
-
rules: { "yaml/sort-keys": [
|
|
1984
|
-
"error",
|
|
1985
|
-
{
|
|
1986
|
-
order: [
|
|
1987
|
-
...[
|
|
1988
|
-
"cacheDir",
|
|
1989
|
-
"catalogMode",
|
|
1990
|
-
"cleanupUnusedCatalogs",
|
|
1991
|
-
"dedupeDirectDeps",
|
|
1992
|
-
"deployAllFiles",
|
|
1993
|
-
"enablePrePostScripts",
|
|
1994
|
-
"engineStrict",
|
|
1995
|
-
"extendNodePath",
|
|
1996
|
-
"hoist",
|
|
1997
|
-
"hoistPattern",
|
|
1998
|
-
"hoistWorkspacePackages",
|
|
1999
|
-
"ignoreCompatibilityDb",
|
|
2000
|
-
"ignoreDepScripts",
|
|
2001
|
-
"ignoreScripts",
|
|
2002
|
-
"ignoreWorkspaceRootCheck",
|
|
2003
|
-
"managePackageManagerVersions",
|
|
2004
|
-
"minimumReleaseAge",
|
|
2005
|
-
"minimumReleaseAgeExclude",
|
|
2006
|
-
"modulesDir",
|
|
2007
|
-
"nodeLinker",
|
|
2008
|
-
"nodeVersion",
|
|
2009
|
-
"optimisticRepeatInstall",
|
|
2010
|
-
"packageManagerStrict",
|
|
2011
|
-
"packageManagerStrictVersion",
|
|
2012
|
-
"preferSymlinkedExecutables",
|
|
2013
|
-
"preferWorkspacePackages",
|
|
2014
|
-
"publicHoistPattern",
|
|
2015
|
-
"registrySupportsTimeField",
|
|
2016
|
-
"requiredScrpts",
|
|
2017
|
-
"resolutionMode",
|
|
2018
|
-
"savePrefix",
|
|
2019
|
-
"scriptShell",
|
|
2020
|
-
"shamefullyHoist",
|
|
2021
|
-
"shellEmulator",
|
|
2022
|
-
"stateDir",
|
|
2023
|
-
"supportedArchitectures",
|
|
2024
|
-
"symlink",
|
|
2025
|
-
"tag",
|
|
2026
|
-
"trustPolicy",
|
|
2027
|
-
"trustPolicyExclude",
|
|
2028
|
-
"updateNotifier"
|
|
2029
|
-
],
|
|
2030
|
-
"packages",
|
|
2031
|
-
"overrides",
|
|
2032
|
-
"patchedDependencies",
|
|
2033
|
-
"catalog",
|
|
2034
|
-
"catalogs",
|
|
2035
|
-
...[
|
|
2036
|
-
"allowedDeprecatedVersions",
|
|
2037
|
-
"allowNonAppliedPatches",
|
|
2038
|
-
"configDependencies",
|
|
2039
|
-
"ignoredBuiltDependencies",
|
|
2040
|
-
"ignoredOptionalDependencies",
|
|
2041
|
-
"neverBuiltDependencies",
|
|
2042
|
-
"onlyBuiltDependencies",
|
|
2043
|
-
"onlyBuiltDependenciesFile",
|
|
2044
|
-
"packageExtensions",
|
|
2045
|
-
"peerDependencyRules"
|
|
2046
|
-
]
|
|
2047
|
-
],
|
|
2048
|
-
pathPattern: "^$"
|
|
2049
|
-
},
|
|
2050
|
-
{
|
|
2051
|
-
order: { type: "asc" },
|
|
2052
|
-
pathPattern: ".*"
|
|
2053
|
-
}
|
|
2054
|
-
] }
|
|
2061
|
+
return [{
|
|
2062
|
+
name: "eslint/yaml/setup",
|
|
2063
|
+
plugins: { yaml: pluginYaml }
|
|
2064
|
+
}, {
|
|
2065
|
+
files,
|
|
2066
|
+
languageOptions: { parser: parserYaml },
|
|
2067
|
+
name: "eslint/yaml/rules",
|
|
2068
|
+
rules: {
|
|
2069
|
+
"style/spaced-comment": "off",
|
|
2070
|
+
"yaml/block-mapping": "error",
|
|
2071
|
+
"yaml/block-sequence": "error",
|
|
2072
|
+
"yaml/no-empty-key": "error",
|
|
2073
|
+
"yaml/no-empty-sequence-entry": "error",
|
|
2074
|
+
"yaml/no-irregular-whitespace": "error",
|
|
2075
|
+
"yaml/plain-scalar": "error",
|
|
2076
|
+
"yaml/vue-custom-block/no-parsing-error": "error",
|
|
2077
|
+
...stylistic$1 ? {
|
|
2078
|
+
"yaml/block-mapping-question-indicator-newline": "error",
|
|
2079
|
+
"yaml/block-sequence-hyphen-indicator-newline": "error",
|
|
2080
|
+
"yaml/flow-mapping-curly-newline": "error",
|
|
2081
|
+
"yaml/flow-mapping-curly-spacing": "error",
|
|
2082
|
+
"yaml/flow-sequence-bracket-newline": "error",
|
|
2083
|
+
"yaml/flow-sequence-bracket-spacing": "error",
|
|
2084
|
+
"yaml/indent": ["error", 2],
|
|
2085
|
+
"yaml/key-spacing": "error",
|
|
2086
|
+
"yaml/no-tab-indent": "error",
|
|
2087
|
+
"yaml/quotes": ["error", {
|
|
2088
|
+
avoidEscape: true,
|
|
2089
|
+
prefer: quotes === "backtick" ? "single" : quotes
|
|
2090
|
+
}],
|
|
2091
|
+
"yaml/spaced-comment": "error"
|
|
2092
|
+
} : {},
|
|
2093
|
+
...overrides
|
|
2055
2094
|
}
|
|
2056
|
-
];
|
|
2095
|
+
}];
|
|
2057
2096
|
}
|
|
2058
2097
|
|
|
2059
2098
|
//#endregion
|
package/dist/index.d.cts
CHANGED
|
@@ -16264,7 +16264,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
16264
16264
|
onlyEquality?: boolean;
|
|
16265
16265
|
}];
|
|
16266
16266
|
// Names of all the configs
|
|
16267
|
-
type ConfigNames = 'eslint/comments/rules' | 'eslint/formatter/setup' | 'eslint/formatter/html' | 'eslint/formatter/xml' | 'eslint/formatter/svg' | 'eslint/formatter/markdown' | 'eslint/formatter/graphql' | 'eslint/imports/rules' | 'eslint/javascript/setup' | 'eslint/javascript/rules' | 'eslint/jsdoc/rules' | 'eslint/jsonc/setup' | 'eslint/jsonc/rules' | 'eslint/markdown/setup' | 'eslint/markdown/processor' | 'eslint/markdown/parser' | 'eslint/markdown/disables' | 'eslint/node/rules' | 'eslint/perfectionist/setup' | 'eslint/react/setup' | 'eslint/react/rules' | 'eslint/regexp/rules' | 'eslint/sort/package-json' | 'eslint/stylistic/rules' | 'eslint/test/setup' | 'eslint/test/rules' | 'eslint/toml/setup' | 'eslint/toml/rules' | 'eslint/typescript/setup' | 'eslint/typescript/parser' | 'eslint/typescript/rules' | 'eslint/unicorn/rules' | 'eslint/unocss/rules' | 'eslint/vue/setup' | 'eslint/vue/rules' | 'eslint/yaml/setup' | 'eslint/yaml/rules'
|
|
16267
|
+
type ConfigNames = 'eslint/comments/rules' | 'eslint/formatter/setup' | 'eslint/formatter/html' | 'eslint/formatter/xml' | 'eslint/formatter/svg' | 'eslint/formatter/markdown' | 'eslint/formatter/graphql' | 'eslint/imports/rules' | 'eslint/javascript/setup' | 'eslint/javascript/rules' | 'eslint/jsdoc/rules' | 'eslint/jsonc/setup' | 'eslint/jsonc/rules' | 'eslint/markdown/setup' | 'eslint/markdown/processor' | 'eslint/markdown/parser' | 'eslint/markdown/disables' | 'eslint/node/rules' | 'eslint/perfectionist/setup' | 'eslint/react/setup' | 'eslint/react/rules' | 'eslint/regexp/rules' | 'eslint/sort/package-json' | 'eslint/stylistic/rules' | 'eslint/test/setup' | 'eslint/test/rules' | 'eslint/toml/setup' | 'eslint/toml/rules' | 'eslint/typescript/setup' | 'eslint/typescript/parser' | 'eslint/typescript/rules' | 'eslint/unicorn/rules' | 'eslint/unocss/rules' | 'eslint/vue/setup' | 'eslint/vue/rules' | 'eslint/yaml/setup' | 'eslint/yaml/rules';
|
|
16268
16268
|
//#endregion
|
|
16269
16269
|
//#region src/prettier.types.d.ts
|
|
16270
16270
|
/**
|
|
@@ -16422,6 +16422,9 @@ interface OptionsVue {
|
|
|
16422
16422
|
*/
|
|
16423
16423
|
sfcBlocks?: boolean | Options;
|
|
16424
16424
|
}
|
|
16425
|
+
interface OptionsReact extends OptionsFiles {
|
|
16426
|
+
reactCompiler?: boolean;
|
|
16427
|
+
}
|
|
16425
16428
|
type OptionsTypescript = (OptionsTypeScriptWithTypes & OptionsOverrides & OptionsTypeScriptErasableOnly) | (OptionsTypeScriptParserOptions & OptionsOverrides & OptionsTypeScriptErasableOnly);
|
|
16426
16429
|
interface OptionsFormatters {
|
|
16427
16430
|
/**
|
|
@@ -16686,7 +16689,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
|
16686
16689
|
*
|
|
16687
16690
|
* @default 根据依赖关系自动检测
|
|
16688
16691
|
*/
|
|
16689
|
-
react?: boolean |
|
|
16692
|
+
react?: boolean | OptionsReact;
|
|
16690
16693
|
/**
|
|
16691
16694
|
* 启用 nextjs 支持.
|
|
16692
16695
|
*
|
|
@@ -16856,7 +16859,7 @@ declare function perfectionist(options?: OptionsOverrides): Promise<TypedFlatCon
|
|
|
16856
16859
|
declare function pnpm(options?: OptionsIsInEditor): Promise<TypedFlatConfigItem[]>;
|
|
16857
16860
|
//#endregion
|
|
16858
16861
|
//#region src/configs/react.d.ts
|
|
16859
|
-
declare function react(options?: OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsOverrides &
|
|
16862
|
+
declare function react(options?: OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsOverrides & OptionsReact): Promise<TypedFlatConfigItem[]>;
|
|
16860
16863
|
//#endregion
|
|
16861
16864
|
//#region src/configs/regexp.d.ts
|
|
16862
16865
|
declare function regexp(options?: OptionsRegExp & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
@@ -16973,4 +16976,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
|
|
|
16973
16976
|
declare function isInEditorEnv(): boolean;
|
|
16974
16977
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
16975
16978
|
//#endregion
|
|
16976
|
-
export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsOverrides, OptionsProjectType, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, lincy as default, lincy, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
|
16979
|
+
export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsOverrides, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, lincy as default, lincy, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
2
|
-
import { Linter } from "eslint";
|
|
3
2
|
import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
|
|
4
3
|
import { ParserOptions } from "@typescript-eslint/parser";
|
|
5
4
|
import { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
|
|
6
5
|
import { Options } from "eslint-processor-vue-blocks";
|
|
6
|
+
import { Linter } from "eslint";
|
|
7
7
|
|
|
8
8
|
//#region src/typegen.d.ts
|
|
9
9
|
interface RuleOptions {
|
|
@@ -16264,7 +16264,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
16264
16264
|
onlyEquality?: boolean;
|
|
16265
16265
|
}];
|
|
16266
16266
|
// Names of all the configs
|
|
16267
|
-
type ConfigNames = 'eslint/comments/rules' | 'eslint/formatter/setup' | 'eslint/formatter/html' | 'eslint/formatter/xml' | 'eslint/formatter/svg' | 'eslint/formatter/markdown' | 'eslint/formatter/graphql' | 'eslint/imports/rules' | 'eslint/javascript/setup' | 'eslint/javascript/rules' | 'eslint/jsdoc/rules' | 'eslint/jsonc/setup' | 'eslint/jsonc/rules' | 'eslint/markdown/setup' | 'eslint/markdown/processor' | 'eslint/markdown/parser' | 'eslint/markdown/disables' | 'eslint/node/rules' | 'eslint/perfectionist/setup' | 'eslint/react/setup' | 'eslint/react/rules' | 'eslint/regexp/rules' | 'eslint/sort/package-json' | 'eslint/stylistic/rules' | 'eslint/test/setup' | 'eslint/test/rules' | 'eslint/toml/setup' | 'eslint/toml/rules' | 'eslint/typescript/setup' | 'eslint/typescript/parser' | 'eslint/typescript/rules' | 'eslint/unicorn/rules' | 'eslint/unocss/rules' | 'eslint/vue/setup' | 'eslint/vue/rules' | 'eslint/yaml/setup' | 'eslint/yaml/rules'
|
|
16267
|
+
type ConfigNames = 'eslint/comments/rules' | 'eslint/formatter/setup' | 'eslint/formatter/html' | 'eslint/formatter/xml' | 'eslint/formatter/svg' | 'eslint/formatter/markdown' | 'eslint/formatter/graphql' | 'eslint/imports/rules' | 'eslint/javascript/setup' | 'eslint/javascript/rules' | 'eslint/jsdoc/rules' | 'eslint/jsonc/setup' | 'eslint/jsonc/rules' | 'eslint/markdown/setup' | 'eslint/markdown/processor' | 'eslint/markdown/parser' | 'eslint/markdown/disables' | 'eslint/node/rules' | 'eslint/perfectionist/setup' | 'eslint/react/setup' | 'eslint/react/rules' | 'eslint/regexp/rules' | 'eslint/sort/package-json' | 'eslint/stylistic/rules' | 'eslint/test/setup' | 'eslint/test/rules' | 'eslint/toml/setup' | 'eslint/toml/rules' | 'eslint/typescript/setup' | 'eslint/typescript/parser' | 'eslint/typescript/rules' | 'eslint/unicorn/rules' | 'eslint/unocss/rules' | 'eslint/vue/setup' | 'eslint/vue/rules' | 'eslint/yaml/setup' | 'eslint/yaml/rules';
|
|
16268
16268
|
//#endregion
|
|
16269
16269
|
//#region src/prettier.types.d.ts
|
|
16270
16270
|
/**
|
|
@@ -16422,6 +16422,9 @@ interface OptionsVue {
|
|
|
16422
16422
|
*/
|
|
16423
16423
|
sfcBlocks?: boolean | Options;
|
|
16424
16424
|
}
|
|
16425
|
+
interface OptionsReact extends OptionsFiles {
|
|
16426
|
+
reactCompiler?: boolean;
|
|
16427
|
+
}
|
|
16425
16428
|
type OptionsTypescript = (OptionsTypeScriptWithTypes & OptionsOverrides & OptionsTypeScriptErasableOnly) | (OptionsTypeScriptParserOptions & OptionsOverrides & OptionsTypeScriptErasableOnly);
|
|
16426
16429
|
interface OptionsFormatters {
|
|
16427
16430
|
/**
|
|
@@ -16686,7 +16689,7 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
|
|
|
16686
16689
|
*
|
|
16687
16690
|
* @default 根据依赖关系自动检测
|
|
16688
16691
|
*/
|
|
16689
|
-
react?: boolean |
|
|
16692
|
+
react?: boolean | OptionsReact;
|
|
16690
16693
|
/**
|
|
16691
16694
|
* 启用 nextjs 支持.
|
|
16692
16695
|
*
|
|
@@ -16856,7 +16859,7 @@ declare function perfectionist(options?: OptionsOverrides): Promise<TypedFlatCon
|
|
|
16856
16859
|
declare function pnpm(options?: OptionsIsInEditor): Promise<TypedFlatConfigItem[]>;
|
|
16857
16860
|
//#endregion
|
|
16858
16861
|
//#region src/configs/react.d.ts
|
|
16859
|
-
declare function react(options?: OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsOverrides &
|
|
16862
|
+
declare function react(options?: OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsOverrides & OptionsReact): Promise<TypedFlatConfigItem[]>;
|
|
16860
16863
|
//#endregion
|
|
16861
16864
|
//#region src/configs/regexp.d.ts
|
|
16862
16865
|
declare function regexp(options?: OptionsRegExp & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
@@ -16973,4 +16976,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
|
|
|
16973
16976
|
declare function isInEditorEnv(): boolean;
|
|
16974
16977
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
16975
16978
|
//#endregion
|
|
16976
|
-
export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsOverrides, OptionsProjectType, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, lincy as default, lincy, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|
|
16979
|
+
export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsOverrides, OptionsProjectType, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, lincy as default, lincy, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|