@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.
Files changed (134) hide show
  1. package/README.md +4 -5
  2. package/dist/index.cjs +165 -446
  3. package/dist/index.d.cts +733 -12
  4. package/dist/index.d.ts +733 -12
  5. package/dist/{configs/index.cjs → index.js} +308 -516
  6. package/package.json +51 -85
  7. package/dist/chunk-2IR43M6N.mjs +0 -48
  8. package/dist/chunk-47ISSTHW.mjs +0 -291
  9. package/dist/chunk-4YBQZLPS.mjs +0 -68
  10. package/dist/chunk-4YT54JFZ.mjs +0 -48
  11. package/dist/chunk-5NK24IKQ.mjs +0 -26
  12. package/dist/chunk-AJS3TMZE.mjs +0 -63
  13. package/dist/chunk-C6FE5KXJ.mjs +0 -104
  14. package/dist/chunk-DAJA5AV3.mjs +0 -29
  15. package/dist/chunk-DCOLHWHC.mjs +0 -269
  16. package/dist/chunk-E4RVBKZB.mjs +0 -207
  17. package/dist/chunk-HZNHG5PB.mjs +0 -45
  18. package/dist/chunk-KOXCJL3C.mjs +0 -109
  19. package/dist/chunk-PFCAWBCD.mjs +0 -93
  20. package/dist/chunk-PFYV2TWZ.mjs +0 -117
  21. package/dist/chunk-QT6FHTFU.mjs +0 -92
  22. package/dist/chunk-RDZJT36Z.mjs +0 -57
  23. package/dist/chunk-RVSUTDCE.mjs +0 -57
  24. package/dist/chunk-TWAETZPX.mjs +0 -149
  25. package/dist/chunk-WSQOWO67.mjs +0 -16
  26. package/dist/chunk-XBASVDU6.mjs +0 -215
  27. package/dist/chunk-XD3UVRU7.mjs +0 -274
  28. package/dist/chunk-XGI647GZ.mjs +0 -81
  29. package/dist/chunk-XMXYE5WC.mjs +0 -183
  30. package/dist/chunk-YNMFVYL6.mjs +0 -69
  31. package/dist/chunk-YO3IYQ2L.mjs +0 -220
  32. package/dist/chunk-YZCJUX6Z.mjs +0 -0
  33. package/dist/configs/comments.cjs +0 -63
  34. package/dist/configs/comments.d.cts +0 -15
  35. package/dist/configs/comments.d.ts +0 -15
  36. package/dist/configs/comments.mjs +0 -6
  37. package/dist/configs/css/tailwindcss.cjs +0 -148
  38. package/dist/configs/css/tailwindcss.d.cts +0 -11
  39. package/dist/configs/css/tailwindcss.d.ts +0 -11
  40. package/dist/configs/css/tailwindcss.mjs +0 -8
  41. package/dist/configs/css/unocss.cjs +0 -133
  42. package/dist/configs/css/unocss.d.cts +0 -11
  43. package/dist/configs/css/unocss.d.ts +0 -11
  44. package/dist/configs/css/unocss.mjs +0 -8
  45. package/dist/configs/data/json.cjs +0 -155
  46. package/dist/configs/data/json.d.cts +0 -11
  47. package/dist/configs/data/json.d.ts +0 -11
  48. package/dist/configs/data/json.mjs +0 -8
  49. package/dist/configs/data/toml.cjs +0 -131
  50. package/dist/configs/data/toml.d.cts +0 -11
  51. package/dist/configs/data/toml.d.ts +0 -11
  52. package/dist/configs/data/toml.mjs +0 -8
  53. package/dist/configs/data/yaml.cjs +0 -143
  54. package/dist/configs/data/yaml.d.cts +0 -11
  55. package/dist/configs/data/yaml.d.ts +0 -11
  56. package/dist/configs/data/yaml.mjs +0 -8
  57. package/dist/configs/docs/jsdoc.cjs +0 -85
  58. package/dist/configs/docs/jsdoc.d.cts +0 -27
  59. package/dist/configs/docs/jsdoc.d.ts +0 -27
  60. package/dist/configs/docs/jsdoc.mjs +0 -7
  61. package/dist/configs/docs/markdown.cjs +0 -164
  62. package/dist/configs/docs/markdown.d.cts +0 -35
  63. package/dist/configs/docs/markdown.d.ts +0 -35
  64. package/dist/configs/docs/markdown.mjs +0 -8
  65. package/dist/configs/formatters.cjs +0 -274
  66. package/dist/configs/formatters.d.cts +0 -11
  67. package/dist/configs/formatters.d.ts +0 -11
  68. package/dist/configs/formatters.mjs +0 -9
  69. package/dist/configs/frameworks/astro.cjs +0 -179
  70. package/dist/configs/frameworks/astro.d.cts +0 -11
  71. package/dist/configs/frameworks/astro.d.ts +0 -11
  72. package/dist/configs/frameworks/astro.mjs +0 -8
  73. package/dist/configs/frameworks/nextjs.cjs +0 -180
  74. package/dist/configs/frameworks/nextjs.d.cts +0 -11
  75. package/dist/configs/frameworks/nextjs.d.ts +0 -11
  76. package/dist/configs/frameworks/nextjs.mjs +0 -8
  77. package/dist/configs/frameworks/react.cjs +0 -377
  78. package/dist/configs/frameworks/react.d.cts +0 -11
  79. package/dist/configs/frameworks/react.d.ts +0 -11
  80. package/dist/configs/frameworks/react.mjs +0 -8
  81. package/dist/configs/frameworks/solid.cjs +0 -360
  82. package/dist/configs/frameworks/solid.d.cts +0 -11
  83. package/dist/configs/frameworks/solid.d.ts +0 -11
  84. package/dist/configs/frameworks/solid.mjs +0 -8
  85. package/dist/configs/frameworks/vue.cjs +0 -293
  86. package/dist/configs/frameworks/vue.d.cts +0 -11
  87. package/dist/configs/frameworks/vue.d.ts +0 -11
  88. package/dist/configs/frameworks/vue.mjs +0 -8
  89. package/dist/configs/ignores.cjs +0 -96
  90. package/dist/configs/ignores.d.cts +0 -15
  91. package/dist/configs/ignores.d.ts +0 -15
  92. package/dist/configs/ignores.mjs +0 -7
  93. package/dist/configs/imports.cjs +0 -104
  94. package/dist/configs/imports.d.cts +0 -23
  95. package/dist/configs/imports.d.ts +0 -23
  96. package/dist/configs/imports.mjs +0 -7
  97. package/dist/configs/index.d.cts +0 -19
  98. package/dist/configs/index.d.ts +0 -19
  99. package/dist/configs/index.mjs +0 -99
  100. package/dist/configs/javascript.cjs +0 -324
  101. package/dist/configs/javascript.d.cts +0 -11
  102. package/dist/configs/javascript.d.ts +0 -11
  103. package/dist/configs/javascript.mjs +0 -7
  104. package/dist/configs/node.cjs +0 -60
  105. package/dist/configs/node.d.cts +0 -15
  106. package/dist/configs/node.d.ts +0 -15
  107. package/dist/configs/node.mjs +0 -6
  108. package/dist/configs/sort.cjs +0 -240
  109. package/dist/configs/sort.d.cts +0 -26
  110. package/dist/configs/sort.d.ts +0 -26
  111. package/dist/configs/sort.mjs +0 -8
  112. package/dist/configs/stylistic.cjs +0 -98
  113. package/dist/configs/stylistic.d.cts +0 -11
  114. package/dist/configs/stylistic.d.ts +0 -11
  115. package/dist/configs/stylistic.mjs +0 -9
  116. package/dist/configs/test.cjs +0 -210
  117. package/dist/configs/test.d.cts +0 -11
  118. package/dist/configs/test.d.ts +0 -11
  119. package/dist/configs/test.mjs +0 -8
  120. package/dist/configs/typescript.cjs +0 -291
  121. package/dist/configs/typescript.d.cts +0 -11
  122. package/dist/configs/typescript.d.ts +0 -11
  123. package/dist/configs/typescript.mjs +0 -8
  124. package/dist/configs/unicorn.cjs +0 -91
  125. package/dist/configs/unicorn.d.cts +0 -15
  126. package/dist/configs/unicorn.d.ts +0 -15
  127. package/dist/configs/unicorn.mjs +0 -6
  128. package/dist/globs.cjs +0 -158
  129. package/dist/globs.d.cts +0 -28
  130. package/dist/globs.d.ts +0 -28
  131. package/dist/globs.mjs +0 -56
  132. package/dist/index.mjs +0 -278
  133. package/dist/types-HqEzZfQU.d.cts +0 -668
  134. package/dist/types-HqEzZfQU.d.ts +0 -668
@@ -1,291 +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/typescript.ts
31
- var typescript_exports = {};
32
- __export(typescript_exports, {
33
- typescript: () => typescript
34
- });
35
- module.exports = __toCommonJS(typescript_exports);
36
- var import_node_process2 = __toESM(require("process"), 1);
37
- var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
38
-
39
- // src/globs.ts
40
- var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
41
- var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
42
- var GLOB_TS = "**/*.?([cm])ts";
43
- var GLOB_TSX = "**/*.?([cm])tsx";
44
- var GLOB_MARKDOWN = "**/*.md";
45
- var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
46
- var GLOB_TESTS = [
47
- `**/__tests__/**/*.${GLOB_SRC_EXT}`,
48
- `**/*.spec.${GLOB_SRC_EXT}`,
49
- `**/*.test.${GLOB_SRC_EXT}`,
50
- `**/*.bench.${GLOB_SRC_EXT}`,
51
- `**/*.benchmark.${GLOB_SRC_EXT}`
52
- ];
53
- var GLOB_NEXTJS_ROUTES = [
54
- `**/app/**/page.${GLOB_SRC_EXT}`,
55
- `**/app/**/layout.${GLOB_SRC_EXT}`,
56
- `**/app/**/error.${GLOB_SRC_EXT}`,
57
- `**/app/**/template.${GLOB_SRC_EXT}`,
58
- `**/app/**/not-found.${GLOB_SRC_EXT}`,
59
- `**/app/**/loading.${GLOB_SRC_EXT}`,
60
- `**/app/**/robots.${GLOB_SRC_EXT}`,
61
- `**/app/**/sitemap.${GLOB_SRC_EXT}`,
62
- `**/pages/**/*.${GLOB_SRC_EXT}`
63
- ];
64
-
65
- // src/utils.ts
66
- var import_node_process = __toESM(require("process"), 1);
67
- var import_local_pkg = require("local-pkg");
68
- function renameRules(rules, from, to) {
69
- return Object.fromEntries(
70
- Object.entries(rules).map(([key, value]) => {
71
- if (key.startsWith(from)) {
72
- return [to + key.slice(from.length), value];
73
- }
74
- return [key, value];
75
- })
76
- );
77
- }
78
- function toArray(value) {
79
- return Array.isArray(value) ? value : [value];
80
- }
81
- async function interop(m) {
82
- const resolved = await m;
83
- return resolved.default || resolved;
84
- }
85
-
86
- // src/configs/typescript.ts
87
- async function typescript(options = {}) {
88
- const {
89
- exts = [],
90
- overrides = {},
91
- parserOptions = {}
92
- } = options ?? {};
93
- const files = options.files ?? [
94
- GLOB_SRC,
95
- ...exts.map((ext) => `**/*.${ext}`)
96
- ];
97
- const filesTypeAware = options.typeAwareFileS ?? [GLOB_TS, GLOB_TSX];
98
- const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
99
- const isTypeAware = !!tsconfigPath;
100
- const typeAwareRules = {
101
- "dot-notation": "off",
102
- "no-implied-eval": "off",
103
- "no-throw-literal": "off",
104
- "ts/await-thenable": "error",
105
- "ts/dot-notation": ["error", { allowKeywords: true }],
106
- "ts/no-floating-promises": "error",
107
- "ts/no-for-in-array": "error",
108
- "ts/no-implied-eval": "error",
109
- "ts/no-misused-promises": "error",
110
- "ts/no-throw-literal": "error",
111
- "ts/no-unnecessary-type-assertion": "error",
112
- "ts/no-unsafe-argument": "error",
113
- "ts/no-unsafe-assignment": "error",
114
- "ts/no-unsafe-call": "error",
115
- "ts/no-unsafe-member-access": "error",
116
- "ts/no-unsafe-return": "error",
117
- "ts/restrict-plus-operands": "error",
118
- "ts/restrict-template-expressions": "error",
119
- "ts/unbound-method": "error"
120
- };
121
- const [
122
- pluginTs,
123
- parserTs
124
- ] = await Promise.all([
125
- interop(import("@typescript-eslint/eslint-plugin")),
126
- interop(import("@typescript-eslint/parser"))
127
- ]);
128
- function makeParser(typeAware, files2, ignores) {
129
- return {
130
- files: files2,
131
- ...ignores ? { ignores } : {},
132
- name: `luxass:typescript:${typeAware ? "type-aware-parser" : "parser"}`,
133
- languageOptions: {
134
- parser: parserTs,
135
- parserOptions: {
136
- extraFileExtensions: exts.map((ext) => `.${ext}`),
137
- sourceType: "module",
138
- ...typeAware ? {
139
- project: tsconfigPath,
140
- tsconfigRootDir: import_node_process2.default.cwd()
141
- } : {},
142
- ...parserOptions
143
- }
144
- }
145
- };
146
- }
147
- return [
148
- {
149
- // Install the plugins without globs, so they can be configured separately.
150
- name: "luxass:typescript:setup",
151
- plugins: {
152
- antfu: import_eslint_plugin_antfu.default,
153
- ts: pluginTs
154
- }
155
- },
156
- ...isTypeAware ? [
157
- makeParser(true, filesTypeAware),
158
- makeParser(false, files, filesTypeAware)
159
- ] : [makeParser(false, files)],
160
- {
161
- name: "luxass:typescript:rules",
162
- files,
163
- rules: {
164
- ...renameRules(
165
- pluginTs.configs["eslint-recommended"].overrides[0].rules,
166
- "@typescript-eslint/",
167
- "ts/"
168
- ),
169
- ...renameRules(
170
- pluginTs.configs.strict.rules,
171
- "@typescript-eslint/",
172
- "ts/"
173
- ),
174
- "no-dupe-class-members": "off",
175
- "no-invalid-this": "off",
176
- "no-loss-of-precision": "off",
177
- "no-redeclare": "off",
178
- "no-use-before-define": "off",
179
- "no-useless-constructor": "off",
180
- "ts/ban-ts-comment": [
181
- "error",
182
- { "ts-ignore": "allow-with-description" }
183
- ],
184
- "ts/ban-types": ["error", {
185
- extendDefaults: false,
186
- types: {
187
- BigInt: {
188
- fixWith: "bigint",
189
- message: "Use `bigint` instead."
190
- },
191
- Boolean: {
192
- fixWith: "boolean",
193
- message: "Use `boolean` instead."
194
- },
195
- Function: "Use a specific function type instead, like `() => void`.",
196
- Number: {
197
- fixWith: "number",
198
- message: "Use `number` instead."
199
- },
200
- Object: {
201
- fixWith: "Record<string, unknown>",
202
- message: "The `Object` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead. See https://github.com/typescript-eslint/typescript-eslint/pull/848"
203
- },
204
- String: {
205
- fixWith: "string",
206
- message: "Use `string` instead."
207
- },
208
- Symbol: {
209
- fixWith: "symbol",
210
- message: "Use `symbol` instead."
211
- },
212
- object: {
213
- fixWith: "Record<string, unknown>",
214
- message: "The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848"
215
- }
216
- }
217
- }],
218
- "ts/consistent-type-definitions": ["error", "interface"],
219
- "ts/consistent-type-imports": [
220
- "error",
221
- { disallowTypeAnnotations: false, prefer: "type-imports" }
222
- ],
223
- "ts/no-dupe-class-members": "error",
224
- "ts/no-dynamic-delete": "off",
225
- "ts/no-explicit-any": "off",
226
- "ts/no-extraneous-class": "off",
227
- "ts/no-import-type-side-effects": "error",
228
- "ts/no-invalid-this": "error",
229
- "ts/no-invalid-void-type": "off",
230
- "ts/no-loss-of-precision": "error",
231
- "ts/no-non-null-assertion": "off",
232
- "ts/no-redeclare": "error",
233
- "ts/no-require-imports": "error",
234
- "ts/no-unused-vars": "off",
235
- "ts/no-use-before-define": [
236
- "error",
237
- { classes: false, functions: false, variables: true }
238
- ],
239
- "ts/no-useless-constructor": "off",
240
- "ts/prefer-ts-expect-error": "error",
241
- "ts/triple-slash-reference": "off",
242
- "ts/unified-signatures": "off",
243
- ...overrides
244
- }
245
- },
246
- {
247
- name: "luxass:typescript:rules-type-aware",
248
- files: filesTypeAware,
249
- rules: {
250
- ...tsconfigPath ? typeAwareRules : {},
251
- ...overrides
252
- }
253
- },
254
- {
255
- name: "luxass:typescript:dts-overrides",
256
- files: ["**/*.d.ts"],
257
- rules: {
258
- "eslint-comments/no-unlimited-disable": "off",
259
- "import/no-duplicates": "off",
260
- "no-restricted-syntax": "off",
261
- "unused-imports/no-unused-vars": "off"
262
- }
263
- },
264
- {
265
- name: "luxass:typescript:tests-overrides",
266
- files: ["**/*.{test,spec}.ts?(x)"],
267
- rules: {
268
- "no-unused-expressions": "off"
269
- }
270
- },
271
- {
272
- name: "luxass:typescript:playground-overrides",
273
- files: [`**/playground.${GLOB_SRC_EXT}`],
274
- rules: {
275
- "no-console": "off"
276
- }
277
- },
278
- {
279
- name: "luxass:typescript:javascript-overrides",
280
- files: ["**/*.js", "**/*.cjs"],
281
- rules: {
282
- "ts/no-require-imports": "off",
283
- "ts/no-var-requires": "off"
284
- }
285
- }
286
- ];
287
- }
288
- // Annotate the CommonJS export names for ESM import in node:
289
- 0 && (module.exports = {
290
- typescript
291
- });
@@ -1,11 +0,0 @@
1
- import '@typescript-eslint/parser';
2
- export { T as TypeScriptOptions, t as typescript } 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 'eslint-processor-vue-blocks';
@@ -1,11 +0,0 @@
1
- import '@typescript-eslint/parser';
2
- export { T as TypeScriptOptions, t as typescript } 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 'eslint-processor-vue-blocks';
@@ -1,8 +0,0 @@
1
- import {
2
- typescript
3
- } from "../chunk-YO3IYQ2L.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-KOXCJL3C.mjs";
6
- export {
7
- typescript
8
- };
@@ -1,91 +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/unicorn.ts
31
- var unicorn_exports = {};
32
- __export(unicorn_exports, {
33
- unicorn: () => unicorn
34
- });
35
- module.exports = __toCommonJS(unicorn_exports);
36
- var import_eslint_plugin_unicorn = __toESM(require("eslint-plugin-unicorn"), 1);
37
- function unicorn() {
38
- return [
39
- {
40
- name: "luxass:unicorn",
41
- plugins: {
42
- unicorn: import_eslint_plugin_unicorn.default
43
- },
44
- rules: {
45
- // Pass error message when throwing errors
46
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md
47
- "unicorn/error-message": "error",
48
- // Uppercase regex escapes
49
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/escape-case.md
50
- "unicorn/escape-case": "error",
51
- // Array.isArray instead of instanceof
52
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-array.md
53
- "unicorn/no-instanceof-array": "error",
54
- // Ban `new Array` as `Array` constructor's params are ambiguous
55
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-array.md
56
- "unicorn/no-new-array": "error",
57
- // Prevent deprecated `new Buffer()`
58
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-buffer.md
59
- "unicorn/no-new-buffer": "error",
60
- // Lowercase number formatting for octal, hex, binary (0x1'error' instead of 0X1'error')
61
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/number-literal-case.md
62
- "unicorn/number-literal-case": "error",
63
- // textContent instead of innerText
64
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-text-content.md
65
- "unicorn/prefer-dom-node-text-content": "error",
66
- // includes over indexOf when checking for existence
67
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes.md
68
- "unicorn/prefer-includes": "error",
69
- // Prefer using the node: protocol
70
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
71
- "unicorn/prefer-node-protocol": "error",
72
- // Prefer using number properties like `Number.isNaN` rather than `isNaN`
73
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-properties.md
74
- "unicorn/prefer-number-properties": "error",
75
- // String methods startsWith/endsWith instead of more complicated stuff
76
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-starts-ends-with.md
77
- "unicorn/prefer-string-starts-ends-with": "error",
78
- // Enforce throwing type error when throwing error while checking typeof
79
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md
80
- "unicorn/prefer-type-error": "error",
81
- // Use new when throwing error
82
- // https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md
83
- "unicorn/throw-new-error": "error"
84
- }
85
- }
86
- ];
87
- }
88
- // Annotate the CommonJS export names for ESM import in node:
89
- 0 && (module.exports = {
90
- unicorn
91
- });
@@ -1,15 +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
- declare function unicorn(): FlatConfigItem[];
14
-
15
- export { unicorn };
@@ -1,15 +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
- declare function unicorn(): FlatConfigItem[];
14
-
15
- export { unicorn };
@@ -1,6 +0,0 @@
1
- import {
2
- unicorn
3
- } from "../chunk-RVSUTDCE.mjs";
4
- export {
5
- unicorn
6
- };
package/dist/globs.cjs DELETED
@@ -1,158 +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/globs.ts
21
- var globs_exports = {};
22
- __export(globs_exports, {
23
- GLOB_ASTRO: () => GLOB_ASTRO,
24
- GLOB_CSS: () => GLOB_CSS,
25
- GLOB_EXCLUDE: () => GLOB_EXCLUDE,
26
- GLOB_HTML: () => GLOB_HTML,
27
- GLOB_JS: () => GLOB_JS,
28
- GLOB_JSON: () => GLOB_JSON,
29
- GLOB_JSON5: () => GLOB_JSON5,
30
- GLOB_JSONC: () => GLOB_JSONC,
31
- GLOB_JSX: () => GLOB_JSX,
32
- GLOB_LESS: () => GLOB_LESS,
33
- GLOB_MARKDOWN: () => GLOB_MARKDOWN,
34
- GLOB_MARKDOWN_CODE: () => GLOB_MARKDOWN_CODE,
35
- GLOB_MARKDOWN_IN_MARKDOWN: () => GLOB_MARKDOWN_IN_MARKDOWN,
36
- GLOB_NEXTJS_OG: () => GLOB_NEXTJS_OG,
37
- GLOB_NEXTJS_ROUTES: () => GLOB_NEXTJS_ROUTES,
38
- GLOB_POSTCSS: () => GLOB_POSTCSS,
39
- GLOB_SCSS: () => GLOB_SCSS,
40
- GLOB_SRC: () => GLOB_SRC,
41
- GLOB_SRC_EXT: () => GLOB_SRC_EXT,
42
- GLOB_STYLE: () => GLOB_STYLE,
43
- GLOB_TESTS: () => GLOB_TESTS,
44
- GLOB_TOML: () => GLOB_TOML,
45
- GLOB_TS: () => GLOB_TS,
46
- GLOB_TSX: () => GLOB_TSX,
47
- GLOB_VUE: () => GLOB_VUE,
48
- GLOB_YAML: () => GLOB_YAML
49
- });
50
- module.exports = __toCommonJS(globs_exports);
51
- var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
52
- var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
53
- var GLOB_JS = "**/*.?([cm])js";
54
- var GLOB_JSX = "**/*.?([cm])jsx";
55
- var GLOB_TS = "**/*.?([cm])ts";
56
- var GLOB_TSX = "**/*.?([cm])tsx";
57
- var GLOB_STYLE = "**/*.{c,le,sc}ss";
58
- var GLOB_CSS = "**/*.css";
59
- var GLOB_POSTCSS = "**/*.{p,post}css";
60
- var GLOB_LESS = "**/*.less";
61
- var GLOB_SCSS = "**/*.scss";
62
- var GLOB_JSON = "**/*.json";
63
- var GLOB_JSON5 = "**/*.json5";
64
- var GLOB_JSONC = "**/*.jsonc";
65
- var GLOB_MARKDOWN = "**/*.md";
66
- var GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
67
- var GLOB_VUE = "**/*.vue";
68
- var GLOB_YAML = "**/*.y?(a)ml";
69
- var GLOB_TOML = "**/*.toml";
70
- var GLOB_HTML = "**/*.htm?(l)";
71
- var GLOB_ASTRO = "**/*.astro";
72
- var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
73
- var GLOB_TESTS = [
74
- `**/__tests__/**/*.${GLOB_SRC_EXT}`,
75
- `**/*.spec.${GLOB_SRC_EXT}`,
76
- `**/*.test.${GLOB_SRC_EXT}`,
77
- `**/*.bench.${GLOB_SRC_EXT}`,
78
- `**/*.benchmark.${GLOB_SRC_EXT}`
79
- ];
80
- var GLOB_NEXTJS_OG = [
81
- `**/app/**/opengraph-image.[jt]s?(x)`,
82
- `**/app/**/twitter-image.[jt]s?(x)`,
83
- `**/app/**/route.[jt]s?(x)`
84
- ];
85
- var GLOB_NEXTJS_ROUTES = [
86
- `**/app/**/page.${GLOB_SRC_EXT}`,
87
- `**/app/**/layout.${GLOB_SRC_EXT}`,
88
- `**/app/**/error.${GLOB_SRC_EXT}`,
89
- `**/app/**/template.${GLOB_SRC_EXT}`,
90
- `**/app/**/not-found.${GLOB_SRC_EXT}`,
91
- `**/app/**/loading.${GLOB_SRC_EXT}`,
92
- `**/app/**/robots.${GLOB_SRC_EXT}`,
93
- `**/app/**/sitemap.${GLOB_SRC_EXT}`,
94
- `**/pages/**/*.${GLOB_SRC_EXT}`
95
- ];
96
- var GLOB_EXCLUDE = [
97
- "**/node_modules",
98
- "**/dist",
99
- "**/out",
100
- "**/build",
101
- "**/package-lock.json",
102
- "**/yarn.lock",
103
- "**/pnpm-lock.yaml",
104
- "**/bun.lockb",
105
- "**/output",
106
- "**/coverage",
107
- "**/temp",
108
- "**/.temp",
109
- "**/tmp",
110
- "**/.tmp",
111
- "**/.history",
112
- "**/.vitepress/cache",
113
- "**/.nuxt",
114
- "**/.next",
115
- "**/.vercel",
116
- "**/.netlify",
117
- "**/.changeset",
118
- "**/.idea",
119
- "**/.cache",
120
- "**/.output",
121
- "**/.vite-inspect",
122
- "**/.astro",
123
- "**/CHANGELOG*.md",
124
- "**/*.min.*",
125
- "**/LICENSE*",
126
- "**/__snapshots__",
127
- "**/auto-import?(s).d.ts",
128
- "**/components.d.ts"
129
- ];
130
- // Annotate the CommonJS export names for ESM import in node:
131
- 0 && (module.exports = {
132
- GLOB_ASTRO,
133
- GLOB_CSS,
134
- GLOB_EXCLUDE,
135
- GLOB_HTML,
136
- GLOB_JS,
137
- GLOB_JSON,
138
- GLOB_JSON5,
139
- GLOB_JSONC,
140
- GLOB_JSX,
141
- GLOB_LESS,
142
- GLOB_MARKDOWN,
143
- GLOB_MARKDOWN_CODE,
144
- GLOB_MARKDOWN_IN_MARKDOWN,
145
- GLOB_NEXTJS_OG,
146
- GLOB_NEXTJS_ROUTES,
147
- GLOB_POSTCSS,
148
- GLOB_SCSS,
149
- GLOB_SRC,
150
- GLOB_SRC_EXT,
151
- GLOB_STYLE,
152
- GLOB_TESTS,
153
- GLOB_TOML,
154
- GLOB_TS,
155
- GLOB_TSX,
156
- GLOB_VUE,
157
- GLOB_YAML
158
- });
package/dist/globs.d.cts DELETED
@@ -1,28 +0,0 @@
1
- declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
2
- declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
3
- declare const GLOB_JS = "**/*.?([cm])js";
4
- declare const GLOB_JSX = "**/*.?([cm])jsx";
5
- declare const GLOB_TS = "**/*.?([cm])ts";
6
- declare const GLOB_TSX = "**/*.?([cm])tsx";
7
- declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
8
- declare const GLOB_CSS = "**/*.css";
9
- declare const GLOB_POSTCSS = "**/*.{p,post}css";
10
- declare const GLOB_LESS = "**/*.less";
11
- declare const GLOB_SCSS = "**/*.scss";
12
- declare const GLOB_JSON = "**/*.json";
13
- declare const GLOB_JSON5 = "**/*.json5";
14
- declare const GLOB_JSONC = "**/*.jsonc";
15
- declare const GLOB_MARKDOWN = "**/*.md";
16
- declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
17
- declare const GLOB_VUE = "**/*.vue";
18
- declare const GLOB_YAML = "**/*.y?(a)ml";
19
- declare const GLOB_TOML = "**/*.toml";
20
- declare const GLOB_HTML = "**/*.htm?(l)";
21
- declare const GLOB_ASTRO = "**/*.astro";
22
- declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
23
- declare const GLOB_TESTS: string[];
24
- declare const GLOB_NEXTJS_OG: string[];
25
- declare const GLOB_NEXTJS_ROUTES: string[];
26
- declare const GLOB_EXCLUDE: string[];
27
-
28
- export { GLOB_ASTRO, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_NEXTJS_OG, GLOB_NEXTJS_ROUTES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML };
package/dist/globs.d.ts DELETED
@@ -1,28 +0,0 @@
1
- declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
2
- declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
3
- declare const GLOB_JS = "**/*.?([cm])js";
4
- declare const GLOB_JSX = "**/*.?([cm])jsx";
5
- declare const GLOB_TS = "**/*.?([cm])ts";
6
- declare const GLOB_TSX = "**/*.?([cm])tsx";
7
- declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
8
- declare const GLOB_CSS = "**/*.css";
9
- declare const GLOB_POSTCSS = "**/*.{p,post}css";
10
- declare const GLOB_LESS = "**/*.less";
11
- declare const GLOB_SCSS = "**/*.scss";
12
- declare const GLOB_JSON = "**/*.json";
13
- declare const GLOB_JSON5 = "**/*.json5";
14
- declare const GLOB_JSONC = "**/*.jsonc";
15
- declare const GLOB_MARKDOWN = "**/*.md";
16
- declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
17
- declare const GLOB_VUE = "**/*.vue";
18
- declare const GLOB_YAML = "**/*.y?(a)ml";
19
- declare const GLOB_TOML = "**/*.toml";
20
- declare const GLOB_HTML = "**/*.htm?(l)";
21
- declare const GLOB_ASTRO = "**/*.astro";
22
- declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
23
- declare const GLOB_TESTS: string[];
24
- declare const GLOB_NEXTJS_OG: string[];
25
- declare const GLOB_NEXTJS_ROUTES: string[];
26
- declare const GLOB_EXCLUDE: string[];
27
-
28
- export { GLOB_ASTRO, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_NEXTJS_OG, GLOB_NEXTJS_ROUTES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML };