@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,293 +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/vue.ts
31
- var vue_exports = {};
32
- __export(vue_exports, {
33
- vue: () => vue
34
- });
35
- module.exports = __toCommonJS(vue_exports);
36
- var import_eslint_merge_processors = require("eslint-merge-processors");
37
-
38
- // src/globs.ts
39
- var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
40
- var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
41
- var GLOB_MARKDOWN = "**/*.md";
42
- var GLOB_VUE = "**/*.vue";
43
- var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
44
- var GLOB_TESTS = [
45
- `**/__tests__/**/*.${GLOB_SRC_EXT}`,
46
- `**/*.spec.${GLOB_SRC_EXT}`,
47
- `**/*.test.${GLOB_SRC_EXT}`,
48
- `**/*.bench.${GLOB_SRC_EXT}`,
49
- `**/*.benchmark.${GLOB_SRC_EXT}`
50
- ];
51
- var GLOB_NEXTJS_ROUTES = [
52
- `**/app/**/page.${GLOB_SRC_EXT}`,
53
- `**/app/**/layout.${GLOB_SRC_EXT}`,
54
- `**/app/**/error.${GLOB_SRC_EXT}`,
55
- `**/app/**/template.${GLOB_SRC_EXT}`,
56
- `**/app/**/not-found.${GLOB_SRC_EXT}`,
57
- `**/app/**/loading.${GLOB_SRC_EXT}`,
58
- `**/app/**/robots.${GLOB_SRC_EXT}`,
59
- `**/app/**/sitemap.${GLOB_SRC_EXT}`,
60
- `**/pages/**/*.${GLOB_SRC_EXT}`
61
- ];
62
-
63
- // src/utils.ts
64
- var import_node_process = __toESM(require("process"), 1);
65
- var import_local_pkg = require("local-pkg");
66
- async function interop(m) {
67
- const resolved = await m;
68
- return resolved.default || resolved;
69
- }
70
- async function ensure(packages) {
71
- if (import_node_process.default.env.CI || import_node_process.default.stdout.isTTY === false) {
72
- return;
73
- }
74
- ;
75
- const nonExistingPackages = packages.filter((i) => !(0, import_local_pkg.isPackageExists)(i));
76
- if (nonExistingPackages.length === 0) {
77
- return;
78
- }
79
- ;
80
- const { default: prompts } = await import("prompts");
81
- const { result } = await prompts([
82
- {
83
- name: "result",
84
- message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
85
- type: "confirm"
86
- }
87
- ]);
88
- if (result) {
89
- await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, {
90
- dev: true
91
- }));
92
- }
93
- ;
94
- }
95
-
96
- // src/configs/vue.ts
97
- async function vue(options = {}) {
98
- const {
99
- a11y = false,
100
- files = [GLOB_VUE],
101
- overrides = {},
102
- stylistic = true
103
- } = options;
104
- if (a11y) {
105
- await ensure(["eslint-plugin-vuejs-accessibility"]);
106
- }
107
- const [
108
- pluginVue,
109
- parserVue,
110
- processorVueBlocks,
111
- pluginA11y
112
- ] = await Promise.all([
113
- interop(import("eslint-plugin-vue")),
114
- interop(import("vue-eslint-parser")),
115
- interop(import("eslint-processor-vue-blocks")),
116
- ...a11y ? [interop(import("eslint-plugin-vuejs-accessibility"))] : []
117
- ]);
118
- const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
119
- const {
120
- indent = 2
121
- } = typeof stylistic === "boolean" ? {} : stylistic;
122
- return [
123
- {
124
- name: "luxass:vue:setup",
125
- plugins: {
126
- vue: pluginVue,
127
- ...a11y ? { "vue-a11y": pluginA11y } : {}
128
- }
129
- },
130
- {
131
- name: "luxass:vue:rules",
132
- files,
133
- languageOptions: {
134
- parser: parserVue,
135
- parserOptions: {
136
- ecmaFeatures: {
137
- jsx: true
138
- },
139
- extraFileExtensions: [".vue"],
140
- parser: options.typescript ? await interop(import("@typescript-eslint/parser")) : null,
141
- sourceType: "module"
142
- }
143
- },
144
- processor: sfcBlocks === false ? pluginVue.processors[".vue"] : (0, import_eslint_merge_processors.mergeProcessors)([
145
- pluginVue.processors[".vue"],
146
- processorVueBlocks({
147
- ...sfcBlocks,
148
- blocks: {
149
- styles: true,
150
- ...sfcBlocks.blocks
151
- }
152
- })
153
- ]),
154
- rules: {
155
- ...pluginVue.configs.base.rules,
156
- ...pluginVue.configs["vue3-essential"].rules,
157
- ...pluginVue.configs["vue3-strongly-recommended"].rules,
158
- ...pluginVue.configs["vue3-recommended"].rules,
159
- "node/prefer-global/process": "off",
160
- "vue/block-order": [
161
- "error",
162
- {
163
- order: ["script", "template", "style"]
164
- }
165
- ],
166
- "vue/component-name-in-template-casing": ["error", "PascalCase"],
167
- "vue/component-options-name-casing": ["error", "PascalCase"],
168
- // this is deprecated
169
- "vue/component-tags-order": "off",
170
- "vue/custom-event-name-casing": ["error", "camelCase"],
171
- "vue/define-macros-order": [
172
- "error",
173
- {
174
- order: [
175
- "defineOptions",
176
- "defineProps",
177
- "defineEmits",
178
- "defineSlots"
179
- ]
180
- }
181
- ],
182
- "vue/dot-location": ["error", "property"],
183
- "vue/dot-notation": ["error", { allowKeywords: true }],
184
- "vue/eqeqeq": ["error", "smart"],
185
- "vue/html-indent": ["error", indent],
186
- "vue/html-quotes": ["error", "double"],
187
- "vue/max-attributes-per-line": "off",
188
- "vue/multi-word-component-names": "off",
189
- "vue/no-dupe-keys": "off",
190
- "vue/no-empty-pattern": "error",
191
- "vue/no-irregular-whitespace": "error",
192
- "vue/no-loss-of-precision": "error",
193
- "vue/no-restricted-syntax": [
194
- "error",
195
- "DebuggerStatement",
196
- "LabeledStatement",
197
- "WithStatement"
198
- ],
199
- "vue/no-restricted-v-bind": ["error", "/^v-/"],
200
- "vue/no-setup-props-reactivity-loss": "off",
201
- "vue/no-sparse-arrays": "error",
202
- "vue/no-unused-refs": "error",
203
- "vue/no-useless-v-bind": "error",
204
- "vue/no-v-html": "off",
205
- "vue/object-shorthand": [
206
- "error",
207
- "always",
208
- {
209
- avoidQuotes: true,
210
- ignoreConstructors: false
211
- }
212
- ],
213
- "vue/prefer-separate-static-class": "error",
214
- "vue/prefer-template": "error",
215
- "vue/prop-name-casing": ["error", "camelCase"],
216
- "vue/require-default-prop": "off",
217
- "vue/require-prop-types": "off",
218
- "vue/space-infix-ops": "error",
219
- "vue/space-unary-ops": ["error", { nonwords: false, words: true }],
220
- ...stylistic ? {
221
- "vue/array-bracket-spacing": ["error", "never"],
222
- "vue/arrow-spacing": ["error", { after: true, before: true }],
223
- "vue/block-spacing": ["error", "always"],
224
- "vue/block-tag-newline": [
225
- "error",
226
- {
227
- multiline: "always",
228
- singleline: "always"
229
- }
230
- ],
231
- "vue/brace-style": [
232
- "error",
233
- "stroustrup",
234
- { allowSingleLine: true }
235
- ],
236
- "vue/comma-dangle": ["error", "always-multiline"],
237
- "vue/comma-spacing": ["error", { after: true, before: false }],
238
- "vue/comma-style": ["error", "last"],
239
- "vue/html-comment-content-spacing": [
240
- "error",
241
- "always",
242
- {
243
- exceptions: ["-"]
244
- }
245
- ],
246
- "vue/key-spacing": [
247
- "error",
248
- { afterColon: true, beforeColon: false }
249
- ],
250
- "vue/keyword-spacing": ["error", { after: true, before: true }],
251
- "vue/object-curly-newline": "off",
252
- "vue/object-curly-spacing": ["error", "always"],
253
- "vue/object-property-newline": [
254
- "error",
255
- { allowMultiplePropertiesPerLine: true }
256
- ],
257
- "vue/operator-linebreak": ["error", "before"],
258
- "vue/padding-line-between-blocks": ["error", "always"],
259
- "vue/quote-props": ["error", "consistent-as-needed"],
260
- "vue/space-in-parens": ["error", "never"],
261
- "vue/template-curly-spacing": "error"
262
- } : {},
263
- ...a11y ? {
264
- "vue-a11y/alt-text": "error",
265
- "vue-a11y/anchor-has-content": "error",
266
- "vue-a11y/aria-props": "error",
267
- "vue-a11y/aria-role": "error",
268
- "vue-a11y/aria-unsupported-elements": "error",
269
- "vue-a11y/click-events-have-key-events": "error",
270
- "vue-a11y/form-control-has-label": "error",
271
- "vue-a11y/heading-has-content": "error",
272
- "vue-a11y/iframe-has-title": "error",
273
- "vue-a11y/interactive-supports-focus": "error",
274
- "vue-a11y/label-has-for": "error",
275
- "vue-a11y/media-has-caption": "error",
276
- "vue-a11y/mouse-events-have-key-events": "error",
277
- "vue-a11y/no-access-key": "error",
278
- "vue-a11y/no-autofocus": "error",
279
- "vue-a11y/no-distracting-elements": "error",
280
- "vue-a11y/no-redundant-roles": "error",
281
- "vue-a11y/no-static-element-interactions": "error",
282
- "vue-a11y/role-has-required-aria-props": "error",
283
- "vue-a11y/tabindex-no-positive": "error"
284
- } : {},
285
- ...overrides
286
- }
287
- }
288
- ];
289
- }
290
- // Annotate the CommonJS export names for ESM import in node:
291
- 0 && (module.exports = {
292
- vue
293
- });
@@ -1,11 +0,0 @@
1
- import 'eslint-processor-vue-blocks';
2
- export { V as VueOptions, v as vue } 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 '@stylistic/eslint-plugin';
10
- import 'eslint';
11
- import '@typescript-eslint/parser';
@@ -1,11 +0,0 @@
1
- import 'eslint-processor-vue-blocks';
2
- export { V as VueOptions, v as vue } 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 '@stylistic/eslint-plugin';
10
- import 'eslint';
11
- import '@typescript-eslint/parser';
@@ -1,8 +0,0 @@
1
- import {
2
- vue
3
- } from "../chunk-MT5P5EKH.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-KOXCJL3C.mjs";
6
- export {
7
- vue
8
- };
@@ -1,143 +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/yaml.ts
31
- var yaml_exports = {};
32
- __export(yaml_exports, {
33
- yaml: () => yaml
34
- });
35
- module.exports = __toCommonJS(yaml_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_YAML = "**/*.y?(a)ml";
42
- var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
43
- var GLOB_TESTS = [
44
- `**/__tests__/**/*.${GLOB_SRC_EXT}`,
45
- `**/*.spec.${GLOB_SRC_EXT}`,
46
- `**/*.test.${GLOB_SRC_EXT}`,
47
- `**/*.bench.${GLOB_SRC_EXT}`,
48
- `**/*.benchmark.${GLOB_SRC_EXT}`
49
- ];
50
- var GLOB_NEXTJS_ROUTES = [
51
- `**/app/**/page.${GLOB_SRC_EXT}`,
52
- `**/app/**/layout.${GLOB_SRC_EXT}`,
53
- `**/app/**/error.${GLOB_SRC_EXT}`,
54
- `**/app/**/template.${GLOB_SRC_EXT}`,
55
- `**/app/**/not-found.${GLOB_SRC_EXT}`,
56
- `**/app/**/loading.${GLOB_SRC_EXT}`,
57
- `**/app/**/robots.${GLOB_SRC_EXT}`,
58
- `**/app/**/sitemap.${GLOB_SRC_EXT}`,
59
- `**/pages/**/*.${GLOB_SRC_EXT}`
60
- ];
61
-
62
- // src/utils.ts
63
- var import_node_process = __toESM(require("process"), 1);
64
- var import_local_pkg = require("local-pkg");
65
- async function interop(m) {
66
- const resolved = await m;
67
- return resolved.default || resolved;
68
- }
69
-
70
- // src/configs/yaml.ts
71
- async function yaml(options = {}) {
72
- const {
73
- files = [GLOB_YAML],
74
- overrides = {},
75
- stylistic = true
76
- } = options;
77
- const [
78
- pluginYaml,
79
- parserYaml
80
- ] = await Promise.all([
81
- interop(import("eslint-plugin-yml")),
82
- interop(import("yaml-eslint-parser"))
83
- ]);
84
- const {
85
- indent = 2,
86
- quotes = "double"
87
- } = typeof stylistic === "boolean" ? {} : stylistic;
88
- return [
89
- {
90
- name: "luxass:yaml:setup",
91
- plugins: {
92
- yaml: pluginYaml
93
- }
94
- },
95
- {
96
- name: "luxass:yaml:rules",
97
- files,
98
- languageOptions: {
99
- parser: parserYaml
100
- },
101
- rules: {
102
- "style/spaced-comment": "off",
103
- "yaml/block-mapping": "error",
104
- "yaml/block-sequence": "error",
105
- "yaml/no-empty-key": "error",
106
- "yaml/no-empty-mapping-value": "error",
107
- "yaml/no-empty-sequence-entry": "error",
108
- "yaml/no-irregular-whitespace": "error",
109
- "yaml/plain-scalar": "error",
110
- "yaml/vue-custom-block/no-parsing-error": "error",
111
- ...stylistic ? {
112
- "yaml/block-mapping-question-indicator-newline": "error",
113
- "yaml/block-sequence-hyphen-indicator-newline": "error",
114
- "yaml/flow-mapping-curly-newline": "error",
115
- "yaml/flow-mapping-curly-spacing": "error",
116
- "yaml/flow-sequence-bracket-newline": "error",
117
- "yaml/flow-sequence-bracket-spacing": "error",
118
- "yaml/indent": ["error", indent === "tab" ? 2 : indent],
119
- "yaml/key-spacing": "error",
120
- "yaml/no-tab-indent": "error",
121
- "yaml/quotes": [
122
- "error",
123
- { avoidEscape: false, prefer: quotes }
124
- ],
125
- "yaml/spaced-comment": "error"
126
- } : {},
127
- ...overrides
128
- }
129
- },
130
- {
131
- name: "luxass:yaml:github-actions",
132
- files: ["**/.github/workflows/*.{yml,yaml}"],
133
- rules: {
134
- // GitHub Actions supports empty values to enable features
135
- "yaml/no-empty-mapping-value": "off"
136
- }
137
- }
138
- ];
139
- }
140
- // Annotate the CommonJS export names for ESM import in node:
141
- 0 && (module.exports = {
142
- yaml
143
- });
@@ -1,11 +0,0 @@
1
- export { Y as YAMLOptions, y as yaml } 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 { Y as YAMLOptions, y as yaml } 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,8 +0,0 @@
1
- import {
2
- yaml
3
- } from "../chunk-V57HXOSW.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-KOXCJL3C.mjs";
6
- export {
7
- yaml
8
- };
@@ -1,31 +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/custom-rules/utils.ts
21
- var utils_exports = {};
22
- __export(utils_exports, {
23
- createRule: () => createRule
24
- });
25
- module.exports = __toCommonJS(utils_exports);
26
- var import_utils = require("@typescript-eslint/utils");
27
- var createRule = import_utils.ESLintUtils.RuleCreator((ruleName) => `https://github.com/luxass/eslint-config/blob/main/src/custom-rules/${ruleName}/README.md`);
28
- // Annotate the CommonJS export names for ESM import in node:
29
- 0 && (module.exports = {
30
- createRule
31
- });
@@ -1,6 +0,0 @@
1
- import { ESLintUtils } from '@typescript-eslint/utils';
2
- export { ESLintUtils } from '@typescript-eslint/utils';
3
-
4
- declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<TOptions, TMessageIds>>) => ESLintUtils.RuleModule<TMessageIds, TOptions, ESLintUtils.RuleListener>;
5
-
6
- export { createRule };
@@ -1,6 +0,0 @@
1
- import { ESLintUtils } from '@typescript-eslint/utils';
2
- export { ESLintUtils } from '@typescript-eslint/utils';
3
-
4
- declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<TOptions, TMessageIds>>) => ESLintUtils.RuleModule<TMessageIds, TOptions, ESLintUtils.RuleListener>;
5
-
6
- export { createRule };
@@ -1,6 +0,0 @@
1
- import {
2
- createRule
3
- } from "../chunk-WDSV2EFG.mjs";
4
- export {
5
- createRule
6
- };