@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,11 +0,0 @@
1
- export { b as JSONOptions, a as jsonc } 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
- jsonc
3
- } from "../chunk-QDSV5ONX.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-KOXCJL3C.mjs";
6
- export {
7
- jsonc
8
- };
@@ -1,164 +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/markdown.ts
31
- var markdown_exports = {};
32
- __export(markdown_exports, {
33
- markdown: () => markdown
34
- });
35
- module.exports = __toCommonJS(markdown_exports);
36
- var parserPlain = __toESM(require("eslint-parser-plain"), 1);
37
- var import_eslint_merge_processors = require("eslint-merge-processors");
38
-
39
- // src/globs.ts
40
- var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
41
- var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
42
- var GLOB_MARKDOWN = "**/*.md";
43
- var GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.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/markdown.ts
73
- async function markdown(options = {}) {
74
- const {
75
- exts = [],
76
- files = [GLOB_MARKDOWN],
77
- overrides = {}
78
- } = options;
79
- const markdown2 = await interop(import("eslint-plugin-markdown"));
80
- return [
81
- {
82
- name: "luxass:markdown:setup",
83
- plugins: {
84
- markdown: markdown2
85
- }
86
- },
87
- {
88
- name: "luxass:markdown:processor",
89
- files,
90
- ignores: [GLOB_MARKDOWN_IN_MARKDOWN],
91
- // `eslint-plugin-markdown` only creates virtual files for code blocks,
92
- // but not the markdown file itself. We use `eslint-merge-processors` to
93
- // add a pass-through processor for the markdown file itself.
94
- processor: (0, import_eslint_merge_processors.mergeProcessors)([
95
- markdown2.processors.markdown,
96
- import_eslint_merge_processors.processorPassThrough
97
- ])
98
- },
99
- {
100
- name: "luxass:markdown:parser",
101
- files,
102
- languageOptions: {
103
- parser: parserPlain
104
- }
105
- },
106
- {
107
- name: "luxass:markdown:disables",
108
- files: [
109
- GLOB_MARKDOWN_CODE,
110
- ...exts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
111
- ],
112
- languageOptions: {
113
- parserOptions: {
114
- ecmaFeatures: {
115
- impliedStrict: true
116
- }
117
- }
118
- },
119
- rules: {
120
- "import/newline-after-import": "off",
121
- "no-alert": "off",
122
- "no-console": "off",
123
- "no-undef": "off",
124
- "no-unused-expressions": "off",
125
- "no-unused-vars": "off",
126
- "node/prefer-global/process": "off",
127
- "style/comma-dangle": "off",
128
- "style/eol-last": "off",
129
- // Type aware rules
130
- "ts/await-thenable": "off",
131
- "ts/consistent-type-imports": "off",
132
- "ts/dot-notation": "off",
133
- "ts/no-floating-promises": "off",
134
- "ts/no-for-in-array": "off",
135
- "ts/no-implied-eval": "off",
136
- "ts/no-misused-promises": "off",
137
- "ts/no-namespace": "off",
138
- "ts/no-redeclare": "off",
139
- "ts/no-require-imports": "off",
140
- "ts/no-throw-literal": "off",
141
- "ts/no-unnecessary-type-assertion": "off",
142
- "ts/no-unsafe-argument": "off",
143
- "ts/no-unsafe-assignment": "off",
144
- "ts/no-unsafe-call": "off",
145
- "ts/no-unsafe-member-access": "off",
146
- "ts/no-unsafe-return": "off",
147
- "ts/no-unused-vars": "off",
148
- "ts/no-use-before-define": "off",
149
- "ts/no-var-requires": "off",
150
- "ts/restrict-plus-operands": "off",
151
- "ts/restrict-template-expressions": "off",
152
- "ts/unbound-method": "off",
153
- "unicode-bom": "off",
154
- "unused-imports/no-unused-imports": "off",
155
- "unused-imports/no-unused-vars": "off",
156
- ...overrides
157
- }
158
- }
159
- ];
160
- }
161
- // Annotate the CommonJS export names for ESM import in node:
162
- 0 && (module.exports = {
163
- markdown
164
- });
@@ -1,35 +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
- interface MarkdownOptions {
14
- /**
15
- * Override rules.
16
- */
17
- overrides?: FlatConfigItem["rules"];
18
- /**
19
- * Additional extensions for components.
20
- *
21
- * @example ["vue"]
22
- * @default []
23
- */
24
- exts?: string[];
25
- /**
26
- * Glob patterns for Markdown files.
27
- *
28
- * @default [GLOB_MARKDOWN]
29
- * @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
30
- */
31
- files?: string[];
32
- }
33
- declare function markdown(options?: MarkdownOptions): Promise<FlatConfigItem[]>;
34
-
35
- export { type MarkdownOptions, markdown };
@@ -1,35 +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
- interface MarkdownOptions {
14
- /**
15
- * Override rules.
16
- */
17
- overrides?: FlatConfigItem["rules"];
18
- /**
19
- * Additional extensions for components.
20
- *
21
- * @example ["vue"]
22
- * @default []
23
- */
24
- exts?: string[];
25
- /**
26
- * Glob patterns for Markdown files.
27
- *
28
- * @default [GLOB_MARKDOWN]
29
- * @see https://github.com/luxass/eslint-config/blob/main/src/globs.ts
30
- */
31
- files?: string[];
32
- }
33
- declare function markdown(options?: MarkdownOptions): Promise<FlatConfigItem[]>;
34
-
35
- export { type MarkdownOptions, markdown };
@@ -1,8 +0,0 @@
1
- import {
2
- markdown
3
- } from "../chunk-FNOIGW47.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-KOXCJL3C.mjs";
6
- export {
7
- markdown
8
- };
@@ -1,180 +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/nextjs.ts
31
- var nextjs_exports = {};
32
- __export(nextjs_exports, {
33
- nextjs: () => nextjs
34
- });
35
- module.exports = __toCommonJS(nextjs_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_OG = [
50
- `**/app/**/opengraph-image.[jt]s?(x)`,
51
- `**/app/**/twitter-image.[jt]s?(x)`,
52
- `**/app/**/route.[jt]s?(x)`
53
- ];
54
- var GLOB_NEXTJS_ROUTES = [
55
- `**/app/**/page.${GLOB_SRC_EXT}`,
56
- `**/app/**/layout.${GLOB_SRC_EXT}`,
57
- `**/app/**/error.${GLOB_SRC_EXT}`,
58
- `**/app/**/template.${GLOB_SRC_EXT}`,
59
- `**/app/**/not-found.${GLOB_SRC_EXT}`,
60
- `**/app/**/loading.${GLOB_SRC_EXT}`,
61
- `**/app/**/robots.${GLOB_SRC_EXT}`,
62
- `**/app/**/sitemap.${GLOB_SRC_EXT}`,
63
- `**/pages/**/*.${GLOB_SRC_EXT}`
64
- ];
65
-
66
- // src/utils.ts
67
- var import_node_process = __toESM(require("process"), 1);
68
- var import_local_pkg = require("local-pkg");
69
- async function interop(m) {
70
- const resolved = await m;
71
- return resolved.default || resolved;
72
- }
73
- async function ensure(packages) {
74
- if (import_node_process.default.env.CI || import_node_process.default.stdout.isTTY === false) {
75
- return;
76
- }
77
- ;
78
- const nonExistingPackages = packages.filter((i) => !(0, import_local_pkg.isPackageExists)(i));
79
- if (nonExistingPackages.length === 0) {
80
- return;
81
- }
82
- ;
83
- const { default: prompts } = await import("prompts");
84
- const { result } = await prompts([
85
- {
86
- name: "result",
87
- message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`,
88
- type: "confirm"
89
- }
90
- ]);
91
- if (result) {
92
- await import("@antfu/install-pkg").then((i) => i.installPackage(nonExistingPackages, {
93
- dev: true
94
- }));
95
- }
96
- ;
97
- }
98
-
99
- // src/configs/nextjs.ts
100
- async function nextjs(options = {}) {
101
- const {
102
- files = [GLOB_SRC],
103
- overrides,
104
- rootDir
105
- } = options;
106
- await ensure([
107
- "@next/eslint-plugin-next"
108
- ]);
109
- const pluginNextjs = await interop(import("@next/eslint-plugin-next"));
110
- return [
111
- {
112
- name: "luxass:nextjs:setup",
113
- plugins: {
114
- "@next/next": pluginNextjs
115
- }
116
- },
117
- {
118
- name: "luxass:nextjs:rules",
119
- files,
120
- rules: {
121
- ...pluginNextjs.configs.recommended.rules,
122
- ...pluginNextjs.configs["core-web-vitals"].rules,
123
- "@next/next/google-font-display": ["error"],
124
- "@next/next/google-font-preconnect": ["error"],
125
- "@next/next/inline-script-id": ["error"],
126
- "@next/next/next-script-for-ga": ["warn"],
127
- "@next/next/no-assign-module-variable": ["error"],
128
- "@next/next/no-css-tags": ["warn"],
129
- "@next/next/no-document-import-in-page": ["error"],
130
- "@next/next/no-duplicate-head": ["error"],
131
- "@next/next/no-head-element": ["warn"],
132
- "@next/next/no-head-import-in-document": ["error"],
133
- "@next/next/no-html-link-for-pages": ["off"],
134
- "@next/next/no-img-element": ["warn"],
135
- "@next/next/no-page-custom-font": ["warn"],
136
- "@next/next/no-script-component-in-head": ["error"],
137
- "@next/next/no-styled-jsx-in-document": ["warn"],
138
- "@next/next/no-sync-scripts": ["warn"],
139
- "@next/next/no-title-in-document-head": ["warn"],
140
- "@next/next/no-typos": ["warn"],
141
- "@next/next/no-unwanted-polyfillio": ["warn"],
142
- // "jsx-a11y/anchor-is-valid": ["off"],
143
- // This rule creates errors with webpack parsing on edge runtime
144
- "unicorn/prefer-node-protocol": ["off"],
145
- ...overrides
146
- },
147
- settings: {
148
- next: {
149
- rootDir: rootDir ?? true
150
- },
151
- react: {
152
- pragma: "React",
153
- version: "detect"
154
- }
155
- }
156
- },
157
- {
158
- name: "luxass:nextjs:default-export-override",
159
- files: GLOB_NEXTJS_ROUTES,
160
- rules: {
161
- "import/prefer-default-export": "error",
162
- "react-refresh/only-export-components": "off"
163
- }
164
- },
165
- {
166
- name: "luxass:nextjs:og-override",
167
- files: GLOB_NEXTJS_OG,
168
- rules: {
169
- "@next/next/no-img-element": "off",
170
- "react/no-unknown-property": ["error", {
171
- ignore: ["tw"]
172
- }]
173
- }
174
- }
175
- ];
176
- }
177
- // Annotate the CommonJS export names for ESM import in node:
178
- 0 && (module.exports = {
179
- nextjs
180
- });
@@ -1,11 +0,0 @@
1
- export { N as NextJSOptions, n as nextjs } 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 { N as NextJSOptions, n as nextjs } 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
- nextjs
3
- } from "../chunk-MMSZW2UW.mjs";
4
- import "../chunk-4YBQZLPS.mjs";
5
- import "../chunk-KOXCJL3C.mjs";
6
- export {
7
- nextjs
8
- };
@@ -1,60 +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/node.ts
31
- var node_exports = {};
32
- __export(node_exports, {
33
- node: () => node
34
- });
35
- module.exports = __toCommonJS(node_exports);
36
- var import_eslint_plugin_n = __toESM(require("eslint-plugin-n"), 1);
37
- function node() {
38
- return [
39
- {
40
- name: "luxass:node",
41
- plugins: {
42
- node: import_eslint_plugin_n.default
43
- },
44
- rules: {
45
- "node/handle-callback-err": ["error", "^(err|error)$"],
46
- "node/no-deprecated-api": "error",
47
- "node/no-exports-assign": "error",
48
- "node/no-new-require": "error",
49
- "node/no-path-concat": "error",
50
- "node/prefer-global/buffer": ["error", "never"],
51
- "node/prefer-global/process": ["error", "never"],
52
- "node/process-exit-as-throw": "error"
53
- }
54
- }
55
- ];
56
- }
57
- // Annotate the CommonJS export names for ESM import in node:
58
- 0 && (module.exports = {
59
- node
60
- });
@@ -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 node(): FlatConfigItem[];
14
-
15
- export { node };
@@ -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 node(): FlatConfigItem[];
14
-
15
- export { node };
@@ -1,6 +0,0 @@
1
- import {
2
- node
3
- } from "../chunk-5NK24IKQ.mjs";
4
- export {
5
- node
6
- };
@@ -1,51 +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/perfectionist.ts
31
- var perfectionist_exports = {};
32
- __export(perfectionist_exports, {
33
- perfectionist: () => perfectionist
34
- });
35
- module.exports = __toCommonJS(perfectionist_exports);
36
- var import_eslint_plugin_perfectionist = __toESM(require("eslint-plugin-perfectionist"), 1);
37
- async function perfectionist() {
38
- return [
39
- {
40
- name: "luxass:perfectionist",
41
- plugins: {
42
- perfectionist: import_eslint_plugin_perfectionist.default
43
- },
44
- rules: {}
45
- }
46
- ];
47
- }
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- perfectionist
51
- });
@@ -1,20 +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
- * Optional perfectionist plugin for props and items sorting.
15
- *
16
- * @see https://github.com/azat-io/eslint-plugin-perfectionist
17
- */
18
- declare function perfectionist(): Promise<FlatConfigItem[]>;
19
-
20
- export { perfectionist };
@@ -1,20 +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
- * Optional perfectionist plugin for props and items sorting.
15
- *
16
- * @see https://github.com/azat-io/eslint-plugin-perfectionist
17
- */
18
- declare function perfectionist(): Promise<FlatConfigItem[]>;
19
-
20
- export { perfectionist };