@luxass/eslint-config 4.2.5 → 4.2.7

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.
Files changed (144) hide show
  1. package/README.md +35 -54
  2. package/dist/index.cjs +166 -479
  3. package/dist/index.d.cts +733 -12
  4. package/dist/index.d.ts +733 -12
  5. package/dist/{configs/index.cjs → index.js} +300 -542
  6. package/package.json +51 -86
  7. package/dist/chunk-4YBQZLPS.mjs +0 -68
  8. package/dist/chunk-4YT54JFZ.mjs +0 -48
  9. package/dist/chunk-5NK24IKQ.mjs +0 -26
  10. package/dist/chunk-6T7MXPCT.mjs +0 -17
  11. package/dist/chunk-7ODEIBF5.mjs +0 -144
  12. package/dist/chunk-AQRBQAKE.mjs +0 -48
  13. package/dist/chunk-DAJA5AV3.mjs +0 -29
  14. package/dist/chunk-DCOLHWHC.mjs +0 -269
  15. package/dist/chunk-DVQQVCGF.mjs +0 -45
  16. package/dist/chunk-EHWA727G.mjs +0 -69
  17. package/dist/chunk-FNOIGW47.mjs +0 -104
  18. package/dist/chunk-KOXCJL3C.mjs +0 -109
  19. package/dist/chunk-MMSZW2UW.mjs +0 -92
  20. package/dist/chunk-MT5P5EKH.mjs +0 -207
  21. package/dist/chunk-O2BXTQHK.mjs +0 -117
  22. package/dist/chunk-QDSV5ONX.mjs +0 -93
  23. package/dist/chunk-QMGT2Z63.mjs +0 -57
  24. package/dist/chunk-RVSUTDCE.mjs +0 -57
  25. package/dist/chunk-SPD4DGYN.mjs +0 -274
  26. package/dist/chunk-UITQW3RA.mjs +0 -293
  27. package/dist/chunk-V57HXOSW.mjs +0 -81
  28. package/dist/chunk-WDSV2EFG.mjs +0 -7
  29. package/dist/chunk-WOBGA3K2.mjs +0 -63
  30. package/dist/chunk-WSQOWO67.mjs +0 -16
  31. package/dist/chunk-XBASVDU6.mjs +0 -215
  32. package/dist/chunk-XPKGXA67.mjs +0 -183
  33. package/dist/chunk-YGZJUKJC.mjs +0 -0
  34. package/dist/chunk-YO3IYQ2L.mjs +0 -220
  35. package/dist/configs/astro.cjs +0 -179
  36. package/dist/configs/astro.d.cts +0 -11
  37. package/dist/configs/astro.d.ts +0 -11
  38. package/dist/configs/astro.mjs +0 -8
  39. package/dist/configs/comments.cjs +0 -63
  40. package/dist/configs/comments.d.cts +0 -15
  41. package/dist/configs/comments.d.ts +0 -15
  42. package/dist/configs/comments.mjs +0 -6
  43. package/dist/configs/formatters.cjs +0 -274
  44. package/dist/configs/formatters.d.cts +0 -11
  45. package/dist/configs/formatters.d.ts +0 -11
  46. package/dist/configs/formatters.mjs +0 -9
  47. package/dist/configs/ignores.cjs +0 -96
  48. package/dist/configs/ignores.d.cts +0 -15
  49. package/dist/configs/ignores.d.ts +0 -15
  50. package/dist/configs/ignores.mjs +0 -7
  51. package/dist/configs/imports.cjs +0 -104
  52. package/dist/configs/imports.d.cts +0 -23
  53. package/dist/configs/imports.d.ts +0 -23
  54. package/dist/configs/imports.mjs +0 -7
  55. package/dist/configs/index.d.cts +0 -20
  56. package/dist/configs/index.d.ts +0 -20
  57. package/dist/configs/index.mjs +0 -104
  58. package/dist/configs/javascript.cjs +0 -324
  59. package/dist/configs/javascript.d.cts +0 -11
  60. package/dist/configs/javascript.d.ts +0 -11
  61. package/dist/configs/javascript.mjs +0 -7
  62. package/dist/configs/jsdoc.cjs +0 -85
  63. package/dist/configs/jsdoc.d.cts +0 -27
  64. package/dist/configs/jsdoc.d.ts +0 -27
  65. package/dist/configs/jsdoc.mjs +0 -7
  66. package/dist/configs/jsonc.cjs +0 -155
  67. package/dist/configs/jsonc.d.cts +0 -11
  68. package/dist/configs/jsonc.d.ts +0 -11
  69. package/dist/configs/jsonc.mjs +0 -8
  70. package/dist/configs/markdown.cjs +0 -164
  71. package/dist/configs/markdown.d.cts +0 -35
  72. package/dist/configs/markdown.d.ts +0 -35
  73. package/dist/configs/markdown.mjs +0 -8
  74. package/dist/configs/nextjs.cjs +0 -180
  75. package/dist/configs/nextjs.d.cts +0 -11
  76. package/dist/configs/nextjs.d.ts +0 -11
  77. package/dist/configs/nextjs.mjs +0 -8
  78. package/dist/configs/node.cjs +0 -60
  79. package/dist/configs/node.d.cts +0 -15
  80. package/dist/configs/node.d.ts +0 -15
  81. package/dist/configs/node.mjs +0 -6
  82. package/dist/configs/perfectionist.cjs +0 -51
  83. package/dist/configs/perfectionist.d.cts +0 -20
  84. package/dist/configs/perfectionist.d.ts +0 -20
  85. package/dist/configs/perfectionist.mjs +0 -6
  86. package/dist/configs/react.cjs +0 -379
  87. package/dist/configs/react.d.cts +0 -11
  88. package/dist/configs/react.d.ts +0 -11
  89. package/dist/configs/react.mjs +0 -8
  90. package/dist/configs/solid.cjs +0 -360
  91. package/dist/configs/solid.d.cts +0 -11
  92. package/dist/configs/solid.d.ts +0 -11
  93. package/dist/configs/solid.mjs +0 -8
  94. package/dist/configs/sort.cjs +0 -240
  95. package/dist/configs/sort.d.cts +0 -26
  96. package/dist/configs/sort.d.ts +0 -26
  97. package/dist/configs/sort.mjs +0 -8
  98. package/dist/configs/stylistic.cjs +0 -98
  99. package/dist/configs/stylistic.d.cts +0 -11
  100. package/dist/configs/stylistic.d.ts +0 -11
  101. package/dist/configs/stylistic.mjs +0 -9
  102. package/dist/configs/tailwindcss.cjs +0 -148
  103. package/dist/configs/tailwindcss.d.cts +0 -11
  104. package/dist/configs/tailwindcss.d.ts +0 -11
  105. package/dist/configs/tailwindcss.mjs +0 -8
  106. package/dist/configs/test.cjs +0 -206
  107. package/dist/configs/test.d.cts +0 -11
  108. package/dist/configs/test.d.ts +0 -11
  109. package/dist/configs/test.mjs +0 -9
  110. package/dist/configs/toml.cjs +0 -131
  111. package/dist/configs/toml.d.cts +0 -11
  112. package/dist/configs/toml.d.ts +0 -11
  113. package/dist/configs/toml.mjs +0 -8
  114. package/dist/configs/typescript.cjs +0 -291
  115. package/dist/configs/typescript.d.cts +0 -11
  116. package/dist/configs/typescript.d.ts +0 -11
  117. package/dist/configs/typescript.mjs +0 -8
  118. package/dist/configs/unicorn.cjs +0 -91
  119. package/dist/configs/unicorn.d.cts +0 -15
  120. package/dist/configs/unicorn.d.ts +0 -15
  121. package/dist/configs/unicorn.mjs +0 -6
  122. package/dist/configs/unocss.cjs +0 -133
  123. package/dist/configs/unocss.d.cts +0 -11
  124. package/dist/configs/unocss.d.ts +0 -11
  125. package/dist/configs/unocss.mjs +0 -8
  126. package/dist/configs/vue.cjs +0 -293
  127. package/dist/configs/vue.d.cts +0 -11
  128. package/dist/configs/vue.d.ts +0 -11
  129. package/dist/configs/vue.mjs +0 -8
  130. package/dist/configs/yaml.cjs +0 -143
  131. package/dist/configs/yaml.d.cts +0 -11
  132. package/dist/configs/yaml.d.ts +0 -11
  133. package/dist/configs/yaml.mjs +0 -8
  134. package/dist/custom-rules/utils.cjs +0 -31
  135. package/dist/custom-rules/utils.d.cts +0 -6
  136. package/dist/custom-rules/utils.d.ts +0 -6
  137. package/dist/custom-rules/utils.mjs +0 -6
  138. package/dist/globs.cjs +0 -158
  139. package/dist/globs.d.cts +0 -28
  140. package/dist/globs.d.ts +0 -28
  141. package/dist/globs.mjs +0 -56
  142. package/dist/index.mjs +0 -284
  143. package/dist/types-HqEzZfQU.d.cts +0 -668
  144. package/dist/types-HqEzZfQU.d.ts +0 -668
@@ -1,324 +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/javascript.ts
31
- var javascript_exports = {};
32
- __export(javascript_exports, {
33
- javascript: () => javascript
34
- });
35
- module.exports = __toCommonJS(javascript_exports);
36
- var import_globals = __toESM(require("globals"), 1);
37
- var import_eslint_plugin_unused_imports = __toESM(require("eslint-plugin-unused-imports"), 1);
38
- var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
39
-
40
- // src/globs.ts
41
- var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
42
- var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
43
- var GLOB_MARKDOWN = "**/*.md";
44
- var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
45
- var GLOB_TESTS = [
46
- `**/__tests__/**/*.${GLOB_SRC_EXT}`,
47
- `**/*.spec.${GLOB_SRC_EXT}`,
48
- `**/*.test.${GLOB_SRC_EXT}`,
49
- `**/*.bench.${GLOB_SRC_EXT}`,
50
- `**/*.benchmark.${GLOB_SRC_EXT}`
51
- ];
52
- var GLOB_NEXTJS_ROUTES = [
53
- `**/app/**/page.${GLOB_SRC_EXT}`,
54
- `**/app/**/layout.${GLOB_SRC_EXT}`,
55
- `**/app/**/error.${GLOB_SRC_EXT}`,
56
- `**/app/**/template.${GLOB_SRC_EXT}`,
57
- `**/app/**/not-found.${GLOB_SRC_EXT}`,
58
- `**/app/**/loading.${GLOB_SRC_EXT}`,
59
- `**/app/**/robots.${GLOB_SRC_EXT}`,
60
- `**/app/**/sitemap.${GLOB_SRC_EXT}`,
61
- `**/pages/**/*.${GLOB_SRC_EXT}`
62
- ];
63
-
64
- // src/configs/javascript.ts
65
- async function javascript(options = {}) {
66
- const { editor = false, overrides = {} } = options;
67
- return [
68
- {
69
- name: "luxass:javascript",
70
- languageOptions: {
71
- ecmaVersion: 2022,
72
- globals: {
73
- ...import_globals.default.browser,
74
- ...import_globals.default.es2021,
75
- ...import_globals.default.node,
76
- document: "readonly",
77
- navigator: "readonly",
78
- window: "readonly"
79
- },
80
- parserOptions: {
81
- ecmaFeatures: {
82
- jsx: true
83
- },
84
- ecmaVersion: 2022,
85
- sourceType: "module"
86
- },
87
- sourceType: "module"
88
- },
89
- linterOptions: {
90
- reportUnusedDisableDirectives: true
91
- },
92
- plugins: {
93
- "antfu": import_eslint_plugin_antfu.default,
94
- "unused-imports": import_eslint_plugin_unused_imports.default
95
- },
96
- rules: {
97
- "accessor-pairs": [
98
- "error",
99
- { enforceForClassMembers: true, setWithoutGet: true }
100
- ],
101
- "array-callback-return": "error",
102
- "block-scoped-var": "error",
103
- "constructor-super": "error",
104
- "default-case-last": "error",
105
- "dot-notation": ["error", { allowKeywords: true }],
106
- "eqeqeq": ["error", "smart"],
107
- "new-cap": [
108
- "error",
109
- { capIsNew: false, newIsCap: true, properties: true }
110
- ],
111
- "no-alert": "error",
112
- "no-array-constructor": "error",
113
- "no-async-promise-executor": "error",
114
- "no-caller": "error",
115
- "no-case-declarations": "error",
116
- "no-class-assign": "error",
117
- "no-compare-neg-zero": "error",
118
- "no-cond-assign": ["error", "always"],
119
- "no-console": ["error", { allow: ["warn", "error"] }],
120
- "no-const-assign": "error",
121
- "no-control-regex": "error",
122
- "no-debugger": "error",
123
- "no-delete-var": "error",
124
- "no-dupe-args": "error",
125
- "no-dupe-class-members": "error",
126
- "no-dupe-keys": "error",
127
- "no-duplicate-case": "error",
128
- "no-empty": ["error", { allowEmptyCatch: true }],
129
- "no-empty-character-class": "error",
130
- "no-empty-pattern": "error",
131
- "no-eval": "error",
132
- "no-ex-assign": "error",
133
- "no-extend-native": "error",
134
- "no-extra-bind": "error",
135
- "no-extra-boolean-cast": "error",
136
- "no-fallthrough": "error",
137
- "no-func-assign": "error",
138
- "no-global-assign": "error",
139
- "no-implied-eval": "error",
140
- "no-import-assign": "error",
141
- "no-invalid-regexp": "error",
142
- "no-invalid-this": "error",
143
- "no-irregular-whitespace": "error",
144
- "no-iterator": "error",
145
- "no-labels": ["error", { allowLoop: false, allowSwitch: false }],
146
- "no-lone-blocks": "error",
147
- "no-loss-of-precision": "error",
148
- "no-misleading-character-class": "error",
149
- "no-multi-str": "error",
150
- "no-new": "error",
151
- "no-new-func": "error",
152
- "no-new-symbol": "error",
153
- "no-new-wrappers": "error",
154
- "no-obj-calls": "error",
155
- "no-octal": "error",
156
- "no-octal-escape": "error",
157
- "no-proto": "error",
158
- "no-prototype-builtins": "error",
159
- "no-redeclare": ["error", { builtinGlobals: false }],
160
- "no-regex-spaces": "error",
161
- "no-restricted-globals": [
162
- "error",
163
- { name: "global", message: "Use `globalThis` instead." },
164
- { name: "self", message: "Use `globalThis` instead." }
165
- ],
166
- "no-restricted-properties": [
167
- "error",
168
- {
169
- message: "Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",
170
- property: "__proto__"
171
- },
172
- {
173
- message: "Use `Object.defineProperty` instead.",
174
- property: "__defineGetter__"
175
- },
176
- {
177
- message: "Use `Object.defineProperty` instead.",
178
- property: "__defineSetter__"
179
- },
180
- {
181
- message: "Use `Object.getOwnPropertyDescriptor` instead.",
182
- property: "__lookupGetter__"
183
- },
184
- {
185
- message: "Use `Object.getOwnPropertyDescriptor` instead.",
186
- property: "__lookupSetter__"
187
- }
188
- ],
189
- "no-restricted-syntax": [
190
- "error",
191
- "DebuggerStatement",
192
- "LabeledStatement",
193
- "WithStatement",
194
- "TSEnumDeclaration[const=true]",
195
- "TSExportAssignment"
196
- ],
197
- "no-self-assign": ["error", { props: true }],
198
- "no-self-compare": "error",
199
- "no-sequences": "error",
200
- "no-shadow-restricted-names": "error",
201
- "no-sparse-arrays": "error",
202
- "no-template-curly-in-string": "error",
203
- "no-this-before-super": "error",
204
- "no-throw-literal": "error",
205
- "no-undef": "error",
206
- "no-undef-init": "error",
207
- "no-unexpected-multiline": "error",
208
- "no-unmodified-loop-condition": "error",
209
- "no-unneeded-ternary": ["error", { defaultAssignment: false }],
210
- "no-unreachable": "error",
211
- "no-unreachable-loop": "error",
212
- "no-unsafe-finally": "error",
213
- "no-unsafe-negation": "error",
214
- "no-unused-expressions": [
215
- "error",
216
- {
217
- allowShortCircuit: true,
218
- allowTaggedTemplates: true,
219
- allowTernary: true
220
- }
221
- ],
222
- "no-unused-vars": [
223
- "error",
224
- {
225
- args: "none",
226
- caughtErrors: "none",
227
- ignoreRestSiblings: true,
228
- vars: "all"
229
- }
230
- ],
231
- "no-use-before-define": [
232
- "error",
233
- { classes: false, functions: false, variables: true }
234
- ],
235
- "no-useless-backreference": "error",
236
- "no-useless-call": "error",
237
- "no-useless-catch": "error",
238
- "no-useless-computed-key": "error",
239
- "no-useless-constructor": "error",
240
- "no-useless-rename": "error",
241
- "no-useless-return": "error",
242
- "no-var": "error",
243
- "no-with": "error",
244
- "object-shorthand": [
245
- "error",
246
- "always",
247
- {
248
- avoidQuotes: true,
249
- ignoreConstructors: false
250
- }
251
- ],
252
- "one-var": ["error", { initialized: "never" }],
253
- "prefer-arrow-callback": [
254
- "error",
255
- {
256
- allowNamedFunctions: false,
257
- allowUnboundThis: true
258
- }
259
- ],
260
- "prefer-const": [
261
- "error",
262
- {
263
- destructuring: "all",
264
- ignoreReadBeforeAssign: true
265
- }
266
- ],
267
- "prefer-exponentiation-operator": "error",
268
- "prefer-promise-reject-errors": "error",
269
- "prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
270
- "prefer-rest-params": "error",
271
- "prefer-spread": "error",
272
- "prefer-template": "error",
273
- "sort-imports": [
274
- "error",
275
- {
276
- allowSeparatedGroups: false,
277
- ignoreCase: false,
278
- ignoreDeclarationSort: true,
279
- ignoreMemberSort: false,
280
- memberSyntaxSortOrder: ["none", "all", "multiple", "single"]
281
- }
282
- ],
283
- "symbol-description": "error",
284
- "unicode-bom": ["error", "never"],
285
- "unused-imports/no-unused-imports": editor ? "off" : "error",
286
- "unused-imports/no-unused-vars": [
287
- "error",
288
- {
289
- args: "after-used",
290
- argsIgnorePattern: "^_",
291
- vars: "all",
292
- varsIgnorePattern: "^_"
293
- }
294
- ],
295
- "use-isnan": [
296
- "error",
297
- { enforceForIndexOf: true, enforceForSwitchCase: true }
298
- ],
299
- "valid-typeof": ["error", { requireStringLiterals: true }],
300
- "vars-on-top": "error",
301
- "yoda": ["error", "never"],
302
- ...overrides
303
- }
304
- },
305
- {
306
- name: "luxass:scripts-overrides",
307
- files: [`scripts/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],
308
- rules: {
309
- "no-console": "off"
310
- }
311
- },
312
- {
313
- name: "luxass:playground-overrides",
314
- files: [`**/playground.${GLOB_SRC_EXT}`],
315
- rules: {
316
- "no-console": "off"
317
- }
318
- }
319
- ];
320
- }
321
- // Annotate the CommonJS export names for ESM import in node:
322
- 0 && (module.exports = {
323
- javascript
324
- });
@@ -1,11 +0,0 @@
1
- export { J as JavaScriptOptions, j as javascript } 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';
@@ -1,11 +0,0 @@
1
- export { J as JavaScriptOptions, j as javascript } 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';
@@ -1,7 +0,0 @@
1
- import {
2
- javascript
3
- } from "../chunk-DCOLHWHC.mjs";
4
- import "../chunk-KOXCJL3C.mjs";
5
- export {
6
- javascript
7
- };
@@ -1,85 +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/jsdoc.ts
31
- var jsdoc_exports = {};
32
- __export(jsdoc_exports, {
33
- jsdoc: () => jsdoc
34
- });
35
- module.exports = __toCommonJS(jsdoc_exports);
36
-
37
- // src/utils.ts
38
- var import_node_process = __toESM(require("process"), 1);
39
- var import_local_pkg = require("local-pkg");
40
- async function interop(m) {
41
- const resolved = await m;
42
- return resolved.default || resolved;
43
- }
44
-
45
- // src/configs/jsdoc.ts
46
- async function jsdoc(options = {}) {
47
- const {
48
- overrides,
49
- stylistic = true
50
- } = options;
51
- return [
52
- {
53
- name: "luxass:jsdoc",
54
- plugins: {
55
- jsdoc: await interop(import("eslint-plugin-jsdoc"))
56
- },
57
- rules: {
58
- "jsdoc/check-access": "warn",
59
- "jsdoc/check-param-names": "warn",
60
- "jsdoc/check-property-names": "warn",
61
- "jsdoc/check-types": "warn",
62
- "jsdoc/empty-tags": "warn",
63
- "jsdoc/implements-on-classes": "warn",
64
- "jsdoc/no-defaults": "warn",
65
- "jsdoc/no-multi-asterisks": "warn",
66
- "jsdoc/require-param-name": "warn",
67
- "jsdoc/require-property": "warn",
68
- "jsdoc/require-property-description": "warn",
69
- "jsdoc/require-property-name": "warn",
70
- "jsdoc/require-returns-check": "warn",
71
- "jsdoc/require-returns-description": "warn",
72
- "jsdoc/require-yields-check": "warn",
73
- ...stylistic ? {
74
- "jsdoc/check-alignment": "warn",
75
- "jsdoc/multiline-blocks": "warn"
76
- } : {},
77
- ...overrides
78
- }
79
- }
80
- ];
81
- }
82
- // Annotate the CommonJS export names for ESM import in node:
83
- 0 && (module.exports = {
84
- jsdoc
85
- });
@@ -1,27 +0,0 @@
1
- import { S as StylisticConfig, 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
- interface JSDOCOptions {
14
- /**
15
- * Enable stylistic rules.
16
- *
17
- * @default true
18
- */
19
- stylistic?: boolean | StylisticConfig;
20
- /**
21
- * Overrides for the config.
22
- */
23
- overrides?: FlatConfigItem["rules"];
24
- }
25
- declare function jsdoc(options?: JSDOCOptions): Promise<FlatConfigItem[]>;
26
-
27
- export { type JSDOCOptions, jsdoc };
@@ -1,27 +0,0 @@
1
- import { S as StylisticConfig, 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
- interface JSDOCOptions {
14
- /**
15
- * Enable stylistic rules.
16
- *
17
- * @default true
18
- */
19
- stylistic?: boolean | StylisticConfig;
20
- /**
21
- * Overrides for the config.
22
- */
23
- overrides?: FlatConfigItem["rules"];
24
- }
25
- declare function jsdoc(options?: JSDOCOptions): Promise<FlatConfigItem[]>;
26
-
27
- export { type JSDOCOptions, jsdoc };
@@ -1,7 +0,0 @@
1
- import {
2
- jsdoc
3
- } from "../chunk-DVQQVCGF.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- export {
6
- jsdoc
7
- };
@@ -1,155 +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/jsonc.ts
31
- var jsonc_exports = {};
32
- __export(jsonc_exports, {
33
- jsonc: () => jsonc
34
- });
35
- module.exports = __toCommonJS(jsonc_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_JSON = "**/*.json";
41
- var GLOB_JSON5 = "**/*.json5";
42
- var GLOB_JSONC = "**/*.jsonc";
43
- var GLOB_MARKDOWN = "**/*.md";
44
- var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
45
- var GLOB_TESTS = [
46
- `**/__tests__/**/*.${GLOB_SRC_EXT}`,
47
- `**/*.spec.${GLOB_SRC_EXT}`,
48
- `**/*.test.${GLOB_SRC_EXT}`,
49
- `**/*.bench.${GLOB_SRC_EXT}`,
50
- `**/*.benchmark.${GLOB_SRC_EXT}`
51
- ];
52
- var GLOB_NEXTJS_ROUTES = [
53
- `**/app/**/page.${GLOB_SRC_EXT}`,
54
- `**/app/**/layout.${GLOB_SRC_EXT}`,
55
- `**/app/**/error.${GLOB_SRC_EXT}`,
56
- `**/app/**/template.${GLOB_SRC_EXT}`,
57
- `**/app/**/not-found.${GLOB_SRC_EXT}`,
58
- `**/app/**/loading.${GLOB_SRC_EXT}`,
59
- `**/app/**/robots.${GLOB_SRC_EXT}`,
60
- `**/app/**/sitemap.${GLOB_SRC_EXT}`,
61
- `**/pages/**/*.${GLOB_SRC_EXT}`
62
- ];
63
-
64
- // src/utils.ts
65
- var import_node_process = __toESM(require("process"), 1);
66
- var import_local_pkg = require("local-pkg");
67
- async function interop(m) {
68
- const resolved = await m;
69
- return resolved.default || resolved;
70
- }
71
-
72
- // src/configs/jsonc.ts
73
- async function jsonc(options = {}) {
74
- const {
75
- files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
76
- overrides = {},
77
- stylistic = true
78
- } = options;
79
- const [
80
- pluginJsonc,
81
- parserJsonc
82
- ] = await Promise.all([
83
- interop(import("eslint-plugin-jsonc")),
84
- interop(import("jsonc-eslint-parser"))
85
- ]);
86
- return [
87
- {
88
- name: "luxass:jsonc:setup",
89
- plugins: {
90
- jsonc: pluginJsonc
91
- }
92
- },
93
- {
94
- name: "luxass:jsonc:rules",
95
- files,
96
- languageOptions: {
97
- parser: parserJsonc
98
- },
99
- rules: {
100
- "jsonc/no-bigint-literals": "error",
101
- "jsonc/no-binary-expression": "error",
102
- "jsonc/no-binary-numeric-literals": "error",
103
- "jsonc/no-dupe-keys": "error",
104
- "jsonc/no-escape-sequence-in-identifier": "error",
105
- "jsonc/no-floating-decimal": "error",
106
- "jsonc/no-hexadecimal-numeric-literals": "error",
107
- "jsonc/no-infinity": "error",
108
- "jsonc/no-multi-str": "error",
109
- "jsonc/no-nan": "error",
110
- "jsonc/no-number-props": "error",
111
- "jsonc/no-numeric-separators": "error",
112
- "jsonc/no-octal": "error",
113
- "jsonc/no-octal-escape": "error",
114
- "jsonc/no-octal-numeric-literals": "error",
115
- "jsonc/no-parenthesized": "error",
116
- "jsonc/no-plus-sign": "error",
117
- "jsonc/no-regexp-literals": "error",
118
- "jsonc/no-sparse-arrays": "error",
119
- "jsonc/no-template-literals": "error",
120
- "jsonc/no-undefined-value": "error",
121
- "jsonc/no-unicode-codepoint-escapes": "error",
122
- "jsonc/no-useless-escape": "error",
123
- "jsonc/space-unary-ops": "error",
124
- "jsonc/valid-json-number": "error",
125
- "jsonc/vue-custom-block/no-parsing-error": "error",
126
- ...stylistic ? {
127
- "jsonc/array-bracket-spacing": ["error", "never"],
128
- "jsonc/comma-dangle": ["error", "never"],
129
- "jsonc/comma-style": ["error", "last"],
130
- "jsonc/indent": ["error", 2],
131
- "jsonc/key-spacing": [
132
- "error",
133
- { afterColon: true, beforeColon: false }
134
- ],
135
- "jsonc/object-curly-newline": [
136
- "error",
137
- { consistent: true, multiline: true }
138
- ],
139
- "jsonc/object-curly-spacing": ["error", "always"],
140
- "jsonc/object-property-newline": [
141
- "error",
142
- { allowMultiplePropertiesPerLine: true }
143
- ],
144
- "jsonc/quote-props": "error",
145
- "jsonc/quotes": "error"
146
- } : {},
147
- ...overrides
148
- }
149
- }
150
- ];
151
- }
152
- // Annotate the CommonJS export names for ESM import in node:
153
- 0 && (module.exports = {
154
- jsonc
155
- });
@@ -1,11 +0,0 @@
1
- export { b as JSONOptions, a as jsonc } 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';