@luxass/eslint-config 4.2.6 → 4.2.8
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/README.md +4 -5
- package/dist/index.cjs +165 -446
- package/dist/index.d.cts +733 -12
- package/dist/index.d.ts +733 -12
- package/dist/{configs/index.cjs → index.js} +308 -516
- package/package.json +51 -85
- package/dist/chunk-2IR43M6N.mjs +0 -48
- package/dist/chunk-47ISSTHW.mjs +0 -291
- package/dist/chunk-4YBQZLPS.mjs +0 -68
- package/dist/chunk-4YT54JFZ.mjs +0 -48
- package/dist/chunk-5NK24IKQ.mjs +0 -26
- package/dist/chunk-AJS3TMZE.mjs +0 -63
- package/dist/chunk-C6FE5KXJ.mjs +0 -104
- package/dist/chunk-DAJA5AV3.mjs +0 -29
- package/dist/chunk-DCOLHWHC.mjs +0 -269
- package/dist/chunk-E4RVBKZB.mjs +0 -207
- package/dist/chunk-HZNHG5PB.mjs +0 -45
- package/dist/chunk-KOXCJL3C.mjs +0 -109
- package/dist/chunk-PFCAWBCD.mjs +0 -93
- package/dist/chunk-PFYV2TWZ.mjs +0 -117
- package/dist/chunk-QT6FHTFU.mjs +0 -92
- package/dist/chunk-RDZJT36Z.mjs +0 -57
- package/dist/chunk-RVSUTDCE.mjs +0 -57
- package/dist/chunk-TWAETZPX.mjs +0 -149
- package/dist/chunk-WSQOWO67.mjs +0 -16
- package/dist/chunk-XBASVDU6.mjs +0 -215
- package/dist/chunk-XD3UVRU7.mjs +0 -274
- package/dist/chunk-XGI647GZ.mjs +0 -81
- package/dist/chunk-XMXYE5WC.mjs +0 -183
- package/dist/chunk-YNMFVYL6.mjs +0 -69
- package/dist/chunk-YO3IYQ2L.mjs +0 -220
- package/dist/chunk-YZCJUX6Z.mjs +0 -0
- package/dist/configs/comments.cjs +0 -63
- package/dist/configs/comments.d.cts +0 -15
- package/dist/configs/comments.d.ts +0 -15
- package/dist/configs/comments.mjs +0 -6
- package/dist/configs/css/tailwindcss.cjs +0 -148
- package/dist/configs/css/tailwindcss.d.cts +0 -11
- package/dist/configs/css/tailwindcss.d.ts +0 -11
- package/dist/configs/css/tailwindcss.mjs +0 -8
- package/dist/configs/css/unocss.cjs +0 -133
- package/dist/configs/css/unocss.d.cts +0 -11
- package/dist/configs/css/unocss.d.ts +0 -11
- package/dist/configs/css/unocss.mjs +0 -8
- package/dist/configs/data/json.cjs +0 -155
- package/dist/configs/data/json.d.cts +0 -11
- package/dist/configs/data/json.d.ts +0 -11
- package/dist/configs/data/json.mjs +0 -8
- package/dist/configs/data/toml.cjs +0 -131
- package/dist/configs/data/toml.d.cts +0 -11
- package/dist/configs/data/toml.d.ts +0 -11
- package/dist/configs/data/toml.mjs +0 -8
- package/dist/configs/data/yaml.cjs +0 -143
- package/dist/configs/data/yaml.d.cts +0 -11
- package/dist/configs/data/yaml.d.ts +0 -11
- package/dist/configs/data/yaml.mjs +0 -8
- package/dist/configs/docs/jsdoc.cjs +0 -85
- package/dist/configs/docs/jsdoc.d.cts +0 -27
- package/dist/configs/docs/jsdoc.d.ts +0 -27
- package/dist/configs/docs/jsdoc.mjs +0 -7
- package/dist/configs/docs/markdown.cjs +0 -164
- package/dist/configs/docs/markdown.d.cts +0 -35
- package/dist/configs/docs/markdown.d.ts +0 -35
- package/dist/configs/docs/markdown.mjs +0 -8
- package/dist/configs/formatters.cjs +0 -274
- package/dist/configs/formatters.d.cts +0 -11
- package/dist/configs/formatters.d.ts +0 -11
- package/dist/configs/formatters.mjs +0 -9
- package/dist/configs/frameworks/astro.cjs +0 -179
- package/dist/configs/frameworks/astro.d.cts +0 -11
- package/dist/configs/frameworks/astro.d.ts +0 -11
- package/dist/configs/frameworks/astro.mjs +0 -8
- package/dist/configs/frameworks/nextjs.cjs +0 -180
- package/dist/configs/frameworks/nextjs.d.cts +0 -11
- package/dist/configs/frameworks/nextjs.d.ts +0 -11
- package/dist/configs/frameworks/nextjs.mjs +0 -8
- package/dist/configs/frameworks/react.cjs +0 -377
- package/dist/configs/frameworks/react.d.cts +0 -11
- package/dist/configs/frameworks/react.d.ts +0 -11
- package/dist/configs/frameworks/react.mjs +0 -8
- package/dist/configs/frameworks/solid.cjs +0 -360
- package/dist/configs/frameworks/solid.d.cts +0 -11
- package/dist/configs/frameworks/solid.d.ts +0 -11
- package/dist/configs/frameworks/solid.mjs +0 -8
- package/dist/configs/frameworks/vue.cjs +0 -293
- package/dist/configs/frameworks/vue.d.cts +0 -11
- package/dist/configs/frameworks/vue.d.ts +0 -11
- package/dist/configs/frameworks/vue.mjs +0 -8
- package/dist/configs/ignores.cjs +0 -96
- package/dist/configs/ignores.d.cts +0 -15
- package/dist/configs/ignores.d.ts +0 -15
- package/dist/configs/ignores.mjs +0 -7
- package/dist/configs/imports.cjs +0 -104
- package/dist/configs/imports.d.cts +0 -23
- package/dist/configs/imports.d.ts +0 -23
- package/dist/configs/imports.mjs +0 -7
- package/dist/configs/index.d.cts +0 -19
- package/dist/configs/index.d.ts +0 -19
- package/dist/configs/index.mjs +0 -99
- package/dist/configs/javascript.cjs +0 -324
- package/dist/configs/javascript.d.cts +0 -11
- package/dist/configs/javascript.d.ts +0 -11
- package/dist/configs/javascript.mjs +0 -7
- package/dist/configs/node.cjs +0 -60
- package/dist/configs/node.d.cts +0 -15
- package/dist/configs/node.d.ts +0 -15
- package/dist/configs/node.mjs +0 -6
- package/dist/configs/sort.cjs +0 -240
- package/dist/configs/sort.d.cts +0 -26
- package/dist/configs/sort.d.ts +0 -26
- package/dist/configs/sort.mjs +0 -8
- package/dist/configs/stylistic.cjs +0 -98
- package/dist/configs/stylistic.d.cts +0 -11
- package/dist/configs/stylistic.d.ts +0 -11
- package/dist/configs/stylistic.mjs +0 -9
- package/dist/configs/test.cjs +0 -210
- package/dist/configs/test.d.cts +0 -11
- package/dist/configs/test.d.ts +0 -11
- package/dist/configs/test.mjs +0 -8
- package/dist/configs/typescript.cjs +0 -291
- package/dist/configs/typescript.d.cts +0 -11
- package/dist/configs/typescript.d.ts +0 -11
- package/dist/configs/typescript.mjs +0 -8
- package/dist/configs/unicorn.cjs +0 -91
- package/dist/configs/unicorn.d.cts +0 -15
- package/dist/configs/unicorn.d.ts +0 -15
- package/dist/configs/unicorn.mjs +0 -6
- package/dist/globs.cjs +0 -158
- package/dist/globs.d.cts +0 -28
- package/dist/globs.d.ts +0 -28
- package/dist/globs.mjs +0 -56
- package/dist/index.mjs +0 -278
- package/dist/types-HqEzZfQU.d.cts +0 -668
- package/dist/types-HqEzZfQU.d.ts +0 -668
package/dist/configs/sort.cjs
DELETED
|
@@ -1,240 +0,0 @@
|
|
|
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/configs/sort.ts
|
|
21
|
-
var sort_exports = {};
|
|
22
|
-
__export(sort_exports, {
|
|
23
|
-
sortPackageJson: () => sortPackageJson,
|
|
24
|
-
sortTsconfig: () => sortTsconfig
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(sort_exports);
|
|
27
|
-
function sortPackageJson() {
|
|
28
|
-
return [
|
|
29
|
-
{
|
|
30
|
-
name: "luxass:sort-package-json",
|
|
31
|
-
files: ["**/package.json"],
|
|
32
|
-
rules: {
|
|
33
|
-
"jsonc/sort-array-values": [
|
|
34
|
-
"error",
|
|
35
|
-
{
|
|
36
|
-
order: { type: "asc" },
|
|
37
|
-
pathPattern: "^files$"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"jsonc/sort-keys": [
|
|
41
|
-
"error",
|
|
42
|
-
{
|
|
43
|
-
order: [
|
|
44
|
-
"name",
|
|
45
|
-
"displayName",
|
|
46
|
-
"version",
|
|
47
|
-
"description",
|
|
48
|
-
"type",
|
|
49
|
-
"private",
|
|
50
|
-
"author",
|
|
51
|
-
"publisher",
|
|
52
|
-
"packageManager",
|
|
53
|
-
"license",
|
|
54
|
-
"funding",
|
|
55
|
-
"homepage",
|
|
56
|
-
"repository",
|
|
57
|
-
"bugs",
|
|
58
|
-
"keywords",
|
|
59
|
-
"categories",
|
|
60
|
-
"sideEffects",
|
|
61
|
-
"exports",
|
|
62
|
-
"main",
|
|
63
|
-
"module",
|
|
64
|
-
"unpkg",
|
|
65
|
-
"jsdelivr",
|
|
66
|
-
"types",
|
|
67
|
-
"typesVersions",
|
|
68
|
-
"bin",
|
|
69
|
-
"icon",
|
|
70
|
-
"files",
|
|
71
|
-
"engines",
|
|
72
|
-
"activationEvents",
|
|
73
|
-
"contributes",
|
|
74
|
-
"scripts",
|
|
75
|
-
"peerDependencies",
|
|
76
|
-
"peerDependenciesMeta",
|
|
77
|
-
"dependencies",
|
|
78
|
-
"optionalDependencies",
|
|
79
|
-
"devDependencies",
|
|
80
|
-
"pnpm",
|
|
81
|
-
"overrides",
|
|
82
|
-
"resolutions",
|
|
83
|
-
"husky",
|
|
84
|
-
"simple-git-hooks",
|
|
85
|
-
"lint-staged",
|
|
86
|
-
"eslintConfig"
|
|
87
|
-
],
|
|
88
|
-
pathPattern: "^$"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
order: { type: "asc" },
|
|
92
|
-
pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies$"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
order: { type: "asc" },
|
|
96
|
-
pathPattern: "^resolutions$"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
order: { type: "asc" },
|
|
100
|
-
pathPattern: "^pnpm.overrides$"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
order: ["types", "import", "require", "default"],
|
|
104
|
-
pathPattern: "^exports.*$"
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
];
|
|
110
|
-
}
|
|
111
|
-
function sortTsconfig() {
|
|
112
|
-
return [
|
|
113
|
-
{
|
|
114
|
-
name: "luxass:sort-tsconfig",
|
|
115
|
-
files: ["**/tsconfig.json", "**/tsconfig.*.json"],
|
|
116
|
-
rules: {
|
|
117
|
-
"jsonc/sort-keys": [
|
|
118
|
-
"error",
|
|
119
|
-
{
|
|
120
|
-
order: [
|
|
121
|
-
"extends",
|
|
122
|
-
"compilerOptions",
|
|
123
|
-
"references",
|
|
124
|
-
"files",
|
|
125
|
-
"include",
|
|
126
|
-
"exclude"
|
|
127
|
-
],
|
|
128
|
-
pathPattern: "^$"
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
order: [
|
|
132
|
-
/* Projects */
|
|
133
|
-
"incremental",
|
|
134
|
-
"composite",
|
|
135
|
-
"tsBuildInfoFile",
|
|
136
|
-
"disableSourceOfProjectReferenceRedirect",
|
|
137
|
-
"disableSolutionSearching",
|
|
138
|
-
"disableReferencedProjectLoad",
|
|
139
|
-
/* Language and Environment */
|
|
140
|
-
"target",
|
|
141
|
-
"jsx",
|
|
142
|
-
"jsxFactory",
|
|
143
|
-
"jsxFragmentFactory",
|
|
144
|
-
"jsxImportSource",
|
|
145
|
-
"lib",
|
|
146
|
-
"moduleDetection",
|
|
147
|
-
"noLib",
|
|
148
|
-
"reactNamespace",
|
|
149
|
-
"useDefineForClassFields",
|
|
150
|
-
"emitDecoratorMetadata",
|
|
151
|
-
"experimentalDecorators",
|
|
152
|
-
/* Modules */
|
|
153
|
-
"baseUrl",
|
|
154
|
-
"rootDir",
|
|
155
|
-
"rootDirs",
|
|
156
|
-
"customConditions",
|
|
157
|
-
"module",
|
|
158
|
-
"moduleResolution",
|
|
159
|
-
"moduleSuffixes",
|
|
160
|
-
"noResolve",
|
|
161
|
-
"paths",
|
|
162
|
-
"resolveJsonModule",
|
|
163
|
-
"resolvePackageJsonExports",
|
|
164
|
-
"resolvePackageJsonImports",
|
|
165
|
-
"typeRoots",
|
|
166
|
-
"types",
|
|
167
|
-
"allowArbitraryExtensions",
|
|
168
|
-
"allowImportingTsExtensions",
|
|
169
|
-
"allowUmdGlobalAccess",
|
|
170
|
-
/* JavaScript Support */
|
|
171
|
-
"allowJs",
|
|
172
|
-
"checkJs",
|
|
173
|
-
"maxNodeModuleJsDepth",
|
|
174
|
-
/* Type Checking */
|
|
175
|
-
"strict",
|
|
176
|
-
"strictBindCallApply",
|
|
177
|
-
"strictFunctionTypes",
|
|
178
|
-
"strictNullChecks",
|
|
179
|
-
"strictPropertyInitialization",
|
|
180
|
-
"allowUnreachableCode",
|
|
181
|
-
"allowUnusedLabels",
|
|
182
|
-
"alwaysStrict",
|
|
183
|
-
"exactOptionalPropertyTypes",
|
|
184
|
-
"noFallthroughCasesInSwitch",
|
|
185
|
-
"noImplicitAny",
|
|
186
|
-
"noImplicitOverride",
|
|
187
|
-
"noImplicitReturns",
|
|
188
|
-
"noImplicitThis",
|
|
189
|
-
"noPropertyAccessFromIndexSignature",
|
|
190
|
-
"noUncheckedIndexedAccess",
|
|
191
|
-
"noUnusedLocals",
|
|
192
|
-
"noUnusedParameters",
|
|
193
|
-
"useUnknownInCatchVariables",
|
|
194
|
-
/* Emit */
|
|
195
|
-
"declaration",
|
|
196
|
-
"declarationDir",
|
|
197
|
-
"declarationMap",
|
|
198
|
-
"downlevelIteration",
|
|
199
|
-
"emitBOM",
|
|
200
|
-
"emitDeclarationOnly",
|
|
201
|
-
"importHelpers",
|
|
202
|
-
"importsNotUsedAsValues",
|
|
203
|
-
"inlineSourceMap",
|
|
204
|
-
"inlineSources",
|
|
205
|
-
"mapRoot",
|
|
206
|
-
"newLine",
|
|
207
|
-
"noEmit",
|
|
208
|
-
"noEmitHelpers",
|
|
209
|
-
"noEmitOnError",
|
|
210
|
-
"outDir",
|
|
211
|
-
"outFile",
|
|
212
|
-
"preserveConstEnums",
|
|
213
|
-
"preserveValueImports",
|
|
214
|
-
"removeComments",
|
|
215
|
-
"sourceMap",
|
|
216
|
-
"sourceRoot",
|
|
217
|
-
"stripInternal",
|
|
218
|
-
/* Interop Constraints */
|
|
219
|
-
"allowSyntheticDefaultImports",
|
|
220
|
-
"esModuleInterop",
|
|
221
|
-
"forceConsistentCasingInFileNames",
|
|
222
|
-
"isolatedModules",
|
|
223
|
-
"preserveSymlinks",
|
|
224
|
-
"verbatimModuleSyntax",
|
|
225
|
-
/* Completeness */
|
|
226
|
-
"skipDefaultLibCheck",
|
|
227
|
-
"skipLibCheck"
|
|
228
|
-
],
|
|
229
|
-
pathPattern: "^compilerOptions$"
|
|
230
|
-
}
|
|
231
|
-
]
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
];
|
|
235
|
-
}
|
|
236
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
237
|
-
0 && (module.exports = {
|
|
238
|
-
sortPackageJson,
|
|
239
|
-
sortTsconfig
|
|
240
|
-
});
|
package/dist/configs/sort.d.cts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { p as FlatConfigItem } from '../types-HqEzZfQU.cjs';
|
|
2
|
-
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@antfu/eslint-define-config';
|
|
4
|
-
import '@eslint-types/jsdoc/types';
|
|
5
|
-
import '@eslint-types/typescript-eslint/types';
|
|
6
|
-
import '@eslint-types/unicorn/types';
|
|
7
|
-
import 'eslint-plugin-antfu';
|
|
8
|
-
import '@stylistic/eslint-plugin';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Sort package.json
|
|
15
|
-
*
|
|
16
|
-
* Requires `jsonc` config
|
|
17
|
-
*/
|
|
18
|
-
declare function sortPackageJson(): FlatConfigItem[];
|
|
19
|
-
/**
|
|
20
|
-
* Sort tsconfig.json
|
|
21
|
-
*
|
|
22
|
-
* Requires `jsonc` config
|
|
23
|
-
*/
|
|
24
|
-
declare function sortTsconfig(): FlatConfigItem[];
|
|
25
|
-
|
|
26
|
-
export { sortPackageJson, sortTsconfig };
|
package/dist/configs/sort.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { p as FlatConfigItem } from '../types-HqEzZfQU.js';
|
|
2
|
-
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@antfu/eslint-define-config';
|
|
4
|
-
import '@eslint-types/jsdoc/types';
|
|
5
|
-
import '@eslint-types/typescript-eslint/types';
|
|
6
|
-
import '@eslint-types/unicorn/types';
|
|
7
|
-
import 'eslint-plugin-antfu';
|
|
8
|
-
import '@stylistic/eslint-plugin';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Sort package.json
|
|
15
|
-
*
|
|
16
|
-
* Requires `jsonc` config
|
|
17
|
-
*/
|
|
18
|
-
declare function sortPackageJson(): FlatConfigItem[];
|
|
19
|
-
/**
|
|
20
|
-
* Sort tsconfig.json
|
|
21
|
-
*
|
|
22
|
-
* Requires `jsonc` config
|
|
23
|
-
*/
|
|
24
|
-
declare function sortTsconfig(): FlatConfigItem[];
|
|
25
|
-
|
|
26
|
-
export { sortPackageJson, sortTsconfig };
|
package/dist/configs/sort.mjs
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
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
|
-
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;
|
|
19
|
-
};
|
|
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);
|
|
29
|
-
|
|
30
|
-
// src/configs/stylistic.ts
|
|
31
|
-
var stylistic_exports = {};
|
|
32
|
-
__export(stylistic_exports, {
|
|
33
|
-
StylisticConfigDefaults: () => StylisticConfigDefaults,
|
|
34
|
-
stylistic: () => stylistic
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(stylistic_exports);
|
|
37
|
-
var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
|
|
38
|
-
|
|
39
|
-
// src/utils.ts
|
|
40
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
41
|
-
var import_local_pkg = require("local-pkg");
|
|
42
|
-
async function interop(m) {
|
|
43
|
-
const resolved = await m;
|
|
44
|
-
return resolved.default || resolved;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// src/configs/stylistic.ts
|
|
48
|
-
var StylisticConfigDefaults = {
|
|
49
|
-
indent: 2,
|
|
50
|
-
jsx: true,
|
|
51
|
-
quotes: "double",
|
|
52
|
-
semi: true
|
|
53
|
-
};
|
|
54
|
-
async function stylistic(options = {}) {
|
|
55
|
-
const {
|
|
56
|
-
indent,
|
|
57
|
-
jsx,
|
|
58
|
-
overrides = {},
|
|
59
|
-
quotes,
|
|
60
|
-
semi
|
|
61
|
-
} = {
|
|
62
|
-
...StylisticConfigDefaults,
|
|
63
|
-
...options
|
|
64
|
-
};
|
|
65
|
-
const pluginStylistic = await interop(import("@stylistic/eslint-plugin"));
|
|
66
|
-
const config = pluginStylistic.configs.customize({
|
|
67
|
-
flat: true,
|
|
68
|
-
indent,
|
|
69
|
-
jsx,
|
|
70
|
-
pluginName: "style",
|
|
71
|
-
quotes,
|
|
72
|
-
semi
|
|
73
|
-
});
|
|
74
|
-
return [
|
|
75
|
-
{
|
|
76
|
-
name: "luxass:stylistic",
|
|
77
|
-
plugins: {
|
|
78
|
-
antfu: import_eslint_plugin_antfu.default,
|
|
79
|
-
style: pluginStylistic
|
|
80
|
-
},
|
|
81
|
-
rules: {
|
|
82
|
-
...config.rules,
|
|
83
|
-
"antfu/consistent-list-newline": "error",
|
|
84
|
-
"antfu/if-newline": "off",
|
|
85
|
-
"antfu/top-level-function": "error",
|
|
86
|
-
"curly": ["error", "multi-line", "consistent"],
|
|
87
|
-
"style/arrow-parens": ["error", "always", { requireForBlockBody: true }],
|
|
88
|
-
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
89
|
-
...overrides
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
];
|
|
93
|
-
}
|
|
94
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
95
|
-
0 && (module.exports = {
|
|
96
|
-
StylisticConfigDefaults,
|
|
97
|
-
stylistic
|
|
98
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '@stylistic/eslint-plugin';
|
|
2
|
-
export { S as StylisticConfig, x as StylisticConfigDefaults, c as StylisticOptions, s as stylistic } from '../types-HqEzZfQU.cjs';
|
|
3
|
-
import 'eslint-config-flat-gitignore';
|
|
4
|
-
import '@antfu/eslint-define-config';
|
|
5
|
-
import '@eslint-types/jsdoc/types';
|
|
6
|
-
import '@eslint-types/typescript-eslint/types';
|
|
7
|
-
import '@eslint-types/unicorn/types';
|
|
8
|
-
import 'eslint-plugin-antfu';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '@stylistic/eslint-plugin';
|
|
2
|
-
export { S as StylisticConfig, x as StylisticConfigDefaults, c as StylisticOptions, s as stylistic } from '../types-HqEzZfQU.js';
|
|
3
|
-
import 'eslint-config-flat-gitignore';
|
|
4
|
-
import '@antfu/eslint-define-config';
|
|
5
|
-
import '@eslint-types/jsdoc/types';
|
|
6
|
-
import '@eslint-types/typescript-eslint/types';
|
|
7
|
-
import '@eslint-types/unicorn/types';
|
|
8
|
-
import 'eslint-plugin-antfu';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
package/dist/configs/test.cjs
DELETED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
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
|
-
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;
|
|
19
|
-
};
|
|
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);
|
|
29
|
-
|
|
30
|
-
// src/configs/test.ts
|
|
31
|
-
var test_exports = {};
|
|
32
|
-
__export(test_exports, {
|
|
33
|
-
test: () => test
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(test_exports);
|
|
36
|
-
|
|
37
|
-
// src/globs.ts
|
|
38
|
-
var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
39
|
-
var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
|
|
40
|
-
var GLOB_MARKDOWN = "**/*.md";
|
|
41
|
-
var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
42
|
-
var GLOB_TESTS = [
|
|
43
|
-
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
44
|
-
`**/*.spec.${GLOB_SRC_EXT}`,
|
|
45
|
-
`**/*.test.${GLOB_SRC_EXT}`,
|
|
46
|
-
`**/*.bench.${GLOB_SRC_EXT}`,
|
|
47
|
-
`**/*.benchmark.${GLOB_SRC_EXT}`
|
|
48
|
-
];
|
|
49
|
-
var GLOB_NEXTJS_ROUTES = [
|
|
50
|
-
`**/app/**/page.${GLOB_SRC_EXT}`,
|
|
51
|
-
`**/app/**/layout.${GLOB_SRC_EXT}`,
|
|
52
|
-
`**/app/**/error.${GLOB_SRC_EXT}`,
|
|
53
|
-
`**/app/**/template.${GLOB_SRC_EXT}`,
|
|
54
|
-
`**/app/**/not-found.${GLOB_SRC_EXT}`,
|
|
55
|
-
`**/app/**/loading.${GLOB_SRC_EXT}`,
|
|
56
|
-
`**/app/**/robots.${GLOB_SRC_EXT}`,
|
|
57
|
-
`**/app/**/sitemap.${GLOB_SRC_EXT}`,
|
|
58
|
-
`**/pages/**/*.${GLOB_SRC_EXT}`
|
|
59
|
-
];
|
|
60
|
-
|
|
61
|
-
// src/utils.ts
|
|
62
|
-
var import_node_process = __toESM(require("process"), 1);
|
|
63
|
-
var import_local_pkg = require("local-pkg");
|
|
64
|
-
async function interop(m) {
|
|
65
|
-
const resolved = await m;
|
|
66
|
-
return resolved.default || resolved;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// src/custom-rules/utils.ts
|
|
70
|
-
var import_utils = require("@typescript-eslint/utils");
|
|
71
|
-
var createRule = import_utils.ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
|
|
72
|
-
|
|
73
|
-
// src/custom-rules/no-only-tests/index.ts
|
|
74
|
-
var RULE_NAME = "no-only-tests";
|
|
75
|
-
var DEFAULT_OPTIONS = {
|
|
76
|
-
blocks: ["describe", "it", "test"],
|
|
77
|
-
focus: ["only"]
|
|
78
|
-
};
|
|
79
|
-
function getPath(node, path = []) {
|
|
80
|
-
if (node) {
|
|
81
|
-
const nodeName = node.name || node.property && node.property.name;
|
|
82
|
-
if (node.object) {
|
|
83
|
-
return getPath(
|
|
84
|
-
node.object,
|
|
85
|
-
[nodeName, ...path]
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
if (node.callee)
|
|
89
|
-
return getPath(node.callee, path);
|
|
90
|
-
return [nodeName, ...path];
|
|
91
|
-
}
|
|
92
|
-
return path;
|
|
93
|
-
}
|
|
94
|
-
var noOnlyTests = createRule({
|
|
95
|
-
name: RULE_NAME,
|
|
96
|
-
create: (context, [options]) => {
|
|
97
|
-
const {
|
|
98
|
-
blocks = DEFAULT_OPTIONS.blocks,
|
|
99
|
-
focus = DEFAULT_OPTIONS.focus
|
|
100
|
-
} = options;
|
|
101
|
-
return {
|
|
102
|
-
Identifier(node) {
|
|
103
|
-
const parent = node.parent?.object;
|
|
104
|
-
if (!parent)
|
|
105
|
-
return;
|
|
106
|
-
if (!focus.includes(node.name))
|
|
107
|
-
return;
|
|
108
|
-
const callPath = getPath(node.parent).join(".");
|
|
109
|
-
const found = blocks.find((block) => {
|
|
110
|
-
if (block.endsWith("*")) {
|
|
111
|
-
return callPath.startsWith(block.replace(/\*$/, ""));
|
|
112
|
-
}
|
|
113
|
-
return callPath.startsWith(`${block}.`);
|
|
114
|
-
});
|
|
115
|
-
if (found) {
|
|
116
|
-
context.report({
|
|
117
|
-
data: { block: callPath.split(".")[0], focus: node.name },
|
|
118
|
-
messageId: "not-permitted",
|
|
119
|
-
node
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
},
|
|
125
|
-
defaultOptions: [
|
|
126
|
-
{
|
|
127
|
-
blocks: ["describe", "it", "test"],
|
|
128
|
-
focus: ["only"]
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
meta: {
|
|
132
|
-
docs: {
|
|
133
|
-
description: "disallow .only blocks in tests",
|
|
134
|
-
recommended: "recommended"
|
|
135
|
-
},
|
|
136
|
-
messages: {
|
|
137
|
-
"not-permitted": "{{ block }}.{{ focus }} not permitted"
|
|
138
|
-
},
|
|
139
|
-
schema: [
|
|
140
|
-
{
|
|
141
|
-
additionalProperties: false,
|
|
142
|
-
properties: {
|
|
143
|
-
blocks: {
|
|
144
|
-
items: {
|
|
145
|
-
type: "string"
|
|
146
|
-
},
|
|
147
|
-
type: "array",
|
|
148
|
-
uniqueItems: true
|
|
149
|
-
},
|
|
150
|
-
focus: {
|
|
151
|
-
items: {
|
|
152
|
-
type: "string"
|
|
153
|
-
},
|
|
154
|
-
type: "array",
|
|
155
|
-
uniqueItems: true
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
type: "object"
|
|
159
|
-
}
|
|
160
|
-
],
|
|
161
|
-
type: "layout"
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
// src/configs/test.ts
|
|
166
|
-
async function test(options = {}) {
|
|
167
|
-
const {
|
|
168
|
-
editor = false,
|
|
169
|
-
files = GLOB_TESTS,
|
|
170
|
-
overrides = {}
|
|
171
|
-
} = options;
|
|
172
|
-
const [
|
|
173
|
-
pluginVitest
|
|
174
|
-
] = await Promise.all([
|
|
175
|
-
interop(import("eslint-plugin-vitest"))
|
|
176
|
-
]);
|
|
177
|
-
return [
|
|
178
|
-
{
|
|
179
|
-
name: "luxass:test:setup",
|
|
180
|
-
plugins: {
|
|
181
|
-
test: {
|
|
182
|
-
...pluginVitest,
|
|
183
|
-
rules: {
|
|
184
|
-
...pluginVitest.rules,
|
|
185
|
-
"no-only-tests": noOnlyTests
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
name: "luxass:test:rules",
|
|
192
|
-
files,
|
|
193
|
-
rules: {
|
|
194
|
-
"test/consistent-test-it": [
|
|
195
|
-
"error",
|
|
196
|
-
{ fn: "it", withinDescribe: "it" }
|
|
197
|
-
],
|
|
198
|
-
"test/no-identical-title": "error",
|
|
199
|
-
"test/no-only-tests": editor ? "off" : "error",
|
|
200
|
-
"test/prefer-hooks-in-order": "error",
|
|
201
|
-
"test/prefer-lowercase-title": "error",
|
|
202
|
-
...overrides
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
];
|
|
206
|
-
}
|
|
207
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
208
|
-
0 && (module.exports = {
|
|
209
|
-
test
|
|
210
|
-
});
|
package/dist/configs/test.d.cts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { e as TestOptions, d as test } from '../types-HqEzZfQU.cjs';
|
|
2
|
-
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@antfu/eslint-define-config';
|
|
4
|
-
import '@eslint-types/jsdoc/types';
|
|
5
|
-
import '@eslint-types/typescript-eslint/types';
|
|
6
|
-
import '@eslint-types/unicorn/types';
|
|
7
|
-
import 'eslint-plugin-antfu';
|
|
8
|
-
import '@stylistic/eslint-plugin';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|
package/dist/configs/test.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { e as TestOptions, d as test } from '../types-HqEzZfQU.js';
|
|
2
|
-
import 'eslint-config-flat-gitignore';
|
|
3
|
-
import '@antfu/eslint-define-config';
|
|
4
|
-
import '@eslint-types/jsdoc/types';
|
|
5
|
-
import '@eslint-types/typescript-eslint/types';
|
|
6
|
-
import '@eslint-types/unicorn/types';
|
|
7
|
-
import 'eslint-plugin-antfu';
|
|
8
|
-
import '@stylistic/eslint-plugin';
|
|
9
|
-
import 'eslint';
|
|
10
|
-
import '@typescript-eslint/parser';
|
|
11
|
-
import 'eslint-processor-vue-blocks';
|