@luxass/eslint-config 4.0.0-beta.9 → 4.0.1

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 (149) hide show
  1. package/README.md +351 -48
  2. package/dist/{chunk-TQ476NL2.mjs → chunk-4YBQZLPS.mjs} +13 -2
  3. package/dist/{chunk-NDNDG7BH.mjs → chunk-5NK24IKQ.mjs} +2 -5
  4. package/dist/{chunk-2SW2E3TH.mjs → chunk-5SDSWPKR.mjs} +14 -4
  5. package/dist/chunk-6T7MXPCT.mjs +17 -0
  6. package/dist/{chunk-SPQZTV4E.mjs → chunk-7R4FYLS2.mjs} +19 -14
  7. package/dist/{chunk-ADP4MYOS.mjs → chunk-ANUYBAYV.mjs} +1 -1
  8. package/dist/{chunk-R4NSLRAE.mjs → chunk-ATRL3UZP.mjs} +14 -8
  9. package/dist/{chunk-P3N5WLFL.mjs → chunk-BXBN56WI.mjs} +11 -7
  10. package/dist/chunk-CJ3ZUYUJ.mjs +183 -0
  11. package/dist/chunk-DAJA5AV3.mjs +29 -0
  12. package/dist/{chunk-FK567E7G.mjs → chunk-DVQQVCGF.mjs} +7 -3
  13. package/dist/chunk-FU5SRKZU.mjs +104 -0
  14. package/dist/{chunk-LQLF2CMA.mjs → chunk-GBLPCM3X.mjs} +14 -17
  15. package/dist/chunk-KJ7ZCBK4.mjs +48 -0
  16. package/dist/{chunk-QZTI72NS.mjs → chunk-PYS26PF3.mjs} +13 -9
  17. package/dist/chunk-Q57BF3CR.mjs +63 -0
  18. package/dist/{chunk-3QHLEAXK.mjs → chunk-RDZJT36Z.mjs} +22 -8
  19. package/dist/chunk-RNFKNSHW.mjs +293 -0
  20. package/dist/{chunk-HE56XDG6.mjs → chunk-RVSUTDCE.mjs} +15 -5
  21. package/dist/chunk-UMUUVFB7.mjs +69 -0
  22. package/dist/{chunk-NUG6FLHN.mjs → chunk-VZ2YFMWH.mjs} +54 -11
  23. package/dist/chunk-WDSV2EFG.mjs +7 -0
  24. package/dist/{chunk-M5WNLLBT.mjs → chunk-WOYZWHPM.mjs} +20 -7
  25. package/dist/chunk-WRURTO5T.mjs +144 -0
  26. package/dist/{chunk-BAKUP7QM.mjs → chunk-Z7F6QSYQ.mjs} +44 -34
  27. package/dist/configs/astro.cjs +11 -21
  28. package/dist/configs/astro.d.cts +3 -6
  29. package/dist/configs/astro.d.ts +3 -6
  30. package/dist/configs/astro.mjs +3 -3
  31. package/dist/configs/comments.cjs +9 -12
  32. package/dist/configs/comments.d.cts +3 -2
  33. package/dist/configs/comments.d.ts +3 -2
  34. package/dist/configs/comments.mjs +1 -2
  35. package/dist/configs/formatters.cjs +274 -0
  36. package/dist/configs/formatters.d.cts +11 -0
  37. package/dist/configs/formatters.d.ts +11 -0
  38. package/dist/configs/formatters.mjs +9 -0
  39. package/dist/configs/ignores.cjs +1 -8
  40. package/dist/configs/ignores.d.cts +3 -2
  41. package/dist/configs/ignores.d.ts +3 -2
  42. package/dist/configs/ignores.mjs +2 -2
  43. package/dist/configs/imports.cjs +35 -9
  44. package/dist/configs/imports.d.cts +13 -4
  45. package/dist/configs/imports.d.ts +13 -4
  46. package/dist/configs/imports.mjs +2 -2
  47. package/dist/configs/index.cjs +1487 -1074
  48. package/dist/configs/index.d.cts +7 -18
  49. package/dist/configs/index.d.ts +7 -18
  50. package/dist/configs/index.mjs +40 -36
  51. package/dist/configs/javascript.cjs +16 -23
  52. package/dist/configs/javascript.d.cts +3 -6
  53. package/dist/configs/javascript.d.ts +3 -6
  54. package/dist/configs/javascript.mjs +2 -3
  55. package/dist/configs/jsdoc.cjs +6 -2
  56. package/dist/configs/jsdoc.d.cts +17 -4
  57. package/dist/configs/jsdoc.d.ts +17 -4
  58. package/dist/configs/jsdoc.mjs +2 -2
  59. package/dist/configs/jsonc.cjs +8 -11
  60. package/dist/configs/jsonc.d.cts +3 -6
  61. package/dist/configs/jsonc.d.ts +3 -6
  62. package/dist/configs/jsonc.mjs +3 -3
  63. package/dist/configs/markdown.cjs +46 -35
  64. package/dist/configs/markdown.d.cts +25 -4
  65. package/dist/configs/markdown.d.ts +25 -4
  66. package/dist/configs/markdown.mjs +3 -3
  67. package/dist/configs/nextjs.cjs +13 -11
  68. package/dist/configs/nextjs.d.cts +3 -6
  69. package/dist/configs/nextjs.d.ts +3 -6
  70. package/dist/configs/nextjs.mjs +3 -3
  71. package/dist/configs/node.cjs +0 -10
  72. package/dist/configs/node.d.cts +3 -2
  73. package/dist/configs/node.d.ts +3 -2
  74. package/dist/configs/node.mjs +1 -2
  75. package/dist/configs/perfectionist.cjs +2 -20
  76. package/dist/configs/perfectionist.d.cts +4 -3
  77. package/dist/configs/perfectionist.d.ts +4 -3
  78. package/dist/configs/perfectionist.mjs +1 -2
  79. package/dist/configs/react.cjs +206 -203
  80. package/dist/configs/react.d.cts +3 -6
  81. package/dist/configs/react.d.ts +3 -6
  82. package/dist/configs/react.mjs +3 -3
  83. package/dist/configs/sort.cjs +6 -6
  84. package/dist/configs/sort.d.cts +3 -2
  85. package/dist/configs/sort.d.ts +3 -2
  86. package/dist/configs/sort.mjs +1 -1
  87. package/dist/configs/stylistic.cjs +20 -11
  88. package/dist/configs/stylistic.d.cts +4 -7
  89. package/dist/configs/stylistic.d.ts +4 -7
  90. package/dist/configs/stylistic.mjs +4 -3
  91. package/dist/configs/tailwindcss.cjs +33 -47
  92. package/dist/configs/tailwindcss.d.cts +3 -6
  93. package/dist/configs/tailwindcss.d.ts +3 -6
  94. package/dist/configs/tailwindcss.mjs +3 -3
  95. package/dist/configs/test.cjs +103 -16
  96. package/dist/configs/test.d.cts +3 -6
  97. package/dist/configs/test.d.ts +3 -6
  98. package/dist/configs/test.mjs +4 -3
  99. package/dist/configs/toml.cjs +131 -0
  100. package/dist/configs/toml.d.cts +11 -0
  101. package/dist/configs/toml.d.ts +11 -0
  102. package/dist/configs/toml.mjs +8 -0
  103. package/dist/configs/typescript.cjs +39 -43
  104. package/dist/configs/typescript.d.cts +3 -6
  105. package/dist/configs/typescript.d.ts +3 -6
  106. package/dist/configs/typescript.mjs +3 -4
  107. package/dist/configs/unicorn.cjs +13 -10
  108. package/dist/configs/unicorn.d.cts +3 -2
  109. package/dist/configs/unicorn.d.ts +3 -2
  110. package/dist/configs/unicorn.mjs +1 -2
  111. package/dist/configs/unocss.cjs +48 -20
  112. package/dist/configs/unocss.d.cts +3 -6
  113. package/dist/configs/unocss.d.ts +3 -6
  114. package/dist/configs/unocss.mjs +3 -3
  115. package/dist/configs/vue.cjs +51 -15
  116. package/dist/configs/vue.d.cts +3 -6
  117. package/dist/configs/vue.d.ts +3 -6
  118. package/dist/configs/vue.mjs +3 -3
  119. package/dist/configs/yaml.cjs +17 -11
  120. package/dist/configs/yaml.d.cts +3 -6
  121. package/dist/configs/yaml.d.ts +3 -6
  122. package/dist/configs/yaml.mjs +3 -3
  123. package/dist/custom-rules/utils.cjs +31 -0
  124. package/dist/custom-rules/utils.d.cts +6 -0
  125. package/dist/custom-rules/utils.d.ts +6 -0
  126. package/dist/custom-rules/utils.mjs +6 -0
  127. package/dist/globs.cjs +157 -0
  128. package/dist/globs.d.cts +28 -0
  129. package/dist/globs.d.ts +28 -0
  130. package/dist/globs.mjs +56 -0
  131. package/dist/index.cjs +1267 -839
  132. package/dist/index.d.cts +10 -44
  133. package/dist/index.d.ts +10 -44
  134. package/dist/index.mjs +106 -146
  135. package/dist/types-spTEGSaV.d.cts +632 -0
  136. package/dist/types-spTEGSaV.d.ts +632 -0
  137. package/package.json +69 -37
  138. package/dist/chunk-24KJPXII.mjs +0 -51
  139. package/dist/chunk-4HH6LYJ6.mjs +0 -25
  140. package/dist/chunk-AL47KNVD.mjs +0 -37
  141. package/dist/chunk-C5VMTRKT.mjs +0 -18
  142. package/dist/chunk-ERFDRAGW.mjs +0 -86
  143. package/dist/chunk-HLDEUDLN.mjs +0 -28
  144. package/dist/chunk-O4O6V7LI.mjs +0 -70
  145. package/dist/chunk-UBPIYSHC.mjs +0 -284
  146. package/dist/types-h9izbkUX.d.cts +0 -241
  147. package/dist/types-h9izbkUX.d.ts +0 -241
  148. package/dist/{chunk-FKAOMYGL.mjs → chunk-ME2OAMS3.mjs} +0 -0
  149. package/dist/{chunk-FOIFEV73.mjs → chunk-XBASVDU6.mjs} +6 -6
@@ -1,20 +1,23 @@
1
1
  // src/globs.ts
2
2
  var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
3
- var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
3
+ var GLOB_SRC = `**/*.${GLOB_SRC_EXT}`;
4
4
  var GLOB_JS = "**/*.?([cm])js";
5
+ var GLOB_JSX = "**/*.?([cm])jsx";
5
6
  var GLOB_TS = "**/*.?([cm])ts";
6
- var GLOB_JSX_EXT = "[jt]sx";
7
- var GLOB_JSX = `**/*.${GLOB_JSX_EXT}`;
7
+ var GLOB_TSX = "**/*.?([cm])tsx";
8
8
  var GLOB_STYLE = "**/*.{c,le,sc}ss";
9
9
  var GLOB_CSS = "**/*.css";
10
+ var GLOB_POSTCSS = "**/*.{p,post}css";
10
11
  var GLOB_LESS = "**/*.less";
11
12
  var GLOB_SCSS = "**/*.scss";
12
13
  var GLOB_JSON = "**/*.json";
13
14
  var GLOB_JSON5 = "**/*.json5";
14
15
  var GLOB_JSONC = "**/*.jsonc";
15
16
  var GLOB_MARKDOWN = "**/*.md";
17
+ var GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
16
18
  var GLOB_VUE = "**/*.vue";
17
19
  var GLOB_YAML = "**/*.y?(a)ml";
20
+ var GLOB_TOML = "**/*.toml";
18
21
  var GLOB_HTML = "**/*.htm?(l)";
19
22
  var GLOB_ASTRO = "**/*.astro";
20
23
  var GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
@@ -26,9 +29,9 @@ var GLOB_TESTS = [
26
29
  `**/*.benchmark.${GLOB_SRC_EXT}`
27
30
  ];
28
31
  var GLOB_NEXTJS_OG = [
29
- `**/app/**/opengraph-image.${GLOB_JSX_EXT}`,
30
- `**/app/**/twitter-image.${GLOB_JSX_EXT}`,
31
- `**/app/**/route.${GLOB_JSX_EXT}`
32
+ `**/app/**/opengraph-image.[jt]s?(x)`,
33
+ `**/app/**/twitter-image.[jt]s?(x)`,
34
+ `**/app/**/route.[jt]s?(x)`
32
35
  ];
33
36
  var GLOB_NEXTJS_ROUTES = [
34
37
  `**/app/**/page.${GLOB_SRC_EXT}`,
@@ -79,19 +82,22 @@ export {
79
82
  GLOB_SRC_EXT,
80
83
  GLOB_SRC,
81
84
  GLOB_JS,
82
- GLOB_TS,
83
- GLOB_JSX_EXT,
84
85
  GLOB_JSX,
86
+ GLOB_TS,
87
+ GLOB_TSX,
85
88
  GLOB_STYLE,
86
89
  GLOB_CSS,
90
+ GLOB_POSTCSS,
87
91
  GLOB_LESS,
88
92
  GLOB_SCSS,
89
93
  GLOB_JSON,
90
94
  GLOB_JSON5,
91
95
  GLOB_JSONC,
92
96
  GLOB_MARKDOWN,
97
+ GLOB_MARKDOWN_IN_MARKDOWN,
93
98
  GLOB_VUE,
94
99
  GLOB_YAML,
100
+ GLOB_TOML,
95
101
  GLOB_HTML,
96
102
  GLOB_ASTRO,
97
103
  GLOB_MARKDOWN_CODE,
@@ -1,15 +1,19 @@
1
+ import {
2
+ interop
3
+ } from "./chunk-4YBQZLPS.mjs";
1
4
  import {
2
5
  GLOB_JSON,
3
6
  GLOB_JSON5,
4
7
  GLOB_JSONC
5
- } from "./chunk-R4NSLRAE.mjs";
6
- import {
7
- interop
8
- } from "./chunk-TQ476NL2.mjs";
8
+ } from "./chunk-ATRL3UZP.mjs";
9
9
 
10
10
  // src/configs/jsonc.ts
11
11
  async function jsonc(options = {}) {
12
- const { overrides = {}, stylistic = true } = options;
12
+ const {
13
+ files = [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
14
+ overrides = {},
15
+ stylistic = true
16
+ } = options;
13
17
  const [
14
18
  pluginJsonc,
15
19
  parserJsonc
@@ -25,11 +29,11 @@ async function jsonc(options = {}) {
25
29
  }
26
30
  },
27
31
  {
28
- files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
32
+ name: "luxass:jsonc:rules",
33
+ files,
29
34
  languageOptions: {
30
35
  parser: parserJsonc
31
36
  },
32
- name: "luxass:jsonc:rules",
33
37
  rules: {
34
38
  "jsonc/no-bigint-literals": "error",
35
39
  "jsonc/no-binary-expression": "error",
@@ -0,0 +1,183 @@
1
+ import {
2
+ StylisticConfigDefaults
3
+ } from "./chunk-RDZJT36Z.mjs";
4
+ import {
5
+ ensure,
6
+ interop
7
+ } from "./chunk-4YBQZLPS.mjs";
8
+ import {
9
+ GLOB_CSS,
10
+ GLOB_LESS,
11
+ GLOB_MARKDOWN,
12
+ GLOB_POSTCSS,
13
+ GLOB_SCSS
14
+ } from "./chunk-ATRL3UZP.mjs";
15
+
16
+ // src/configs/formatters.ts
17
+ import * as parserPlain from "eslint-parser-plain";
18
+ async function formatters(options = {}, stylistic = {}) {
19
+ await ensure([
20
+ "eslint-plugin-format"
21
+ ]);
22
+ if (options === true) {
23
+ options = {
24
+ css: true,
25
+ graphql: true,
26
+ html: true,
27
+ markdown: true
28
+ };
29
+ }
30
+ const {
31
+ indent,
32
+ quotes,
33
+ semi
34
+ } = {
35
+ ...StylisticConfigDefaults,
36
+ ...stylistic
37
+ };
38
+ const prettierOptions = Object.assign(
39
+ {
40
+ endOfLine: "auto",
41
+ semi,
42
+ singleQuote: quotes === "single",
43
+ tabWidth: typeof indent === "number" ? indent : 2,
44
+ trailingComma: "all",
45
+ useTabs: indent === "tab"
46
+ },
47
+ options.prettierOptions || {}
48
+ );
49
+ const dprintOptions = Object.assign(
50
+ {
51
+ indentWidth: typeof indent === "number" ? indent : 2,
52
+ quoteStyle: quotes === "single" ? "preferSingle" : "preferDouble",
53
+ useTabs: indent === "tab"
54
+ },
55
+ options.dprintOptions || {}
56
+ );
57
+ const pluginFormat = await interop(import("eslint-plugin-format"));
58
+ const configs = [
59
+ {
60
+ name: "luxass:formatters:setup",
61
+ plugins: {
62
+ format: pluginFormat
63
+ }
64
+ }
65
+ ];
66
+ if (options.css) {
67
+ configs.push(
68
+ {
69
+ name: "luxass:formatter:css",
70
+ files: [GLOB_CSS, GLOB_POSTCSS],
71
+ languageOptions: {
72
+ parser: parserPlain
73
+ },
74
+ rules: {
75
+ "format/prettier": [
76
+ "error",
77
+ {
78
+ ...prettierOptions,
79
+ parser: "css"
80
+ }
81
+ ]
82
+ }
83
+ },
84
+ {
85
+ name: "luxass:formatter:scss",
86
+ files: [GLOB_SCSS],
87
+ languageOptions: {
88
+ parser: parserPlain
89
+ },
90
+ rules: {
91
+ "format/prettier": [
92
+ "error",
93
+ {
94
+ ...prettierOptions,
95
+ parser: "scss"
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ name: "luxass:formatter:less",
102
+ files: [GLOB_LESS],
103
+ languageOptions: {
104
+ parser: parserPlain
105
+ },
106
+ rules: {
107
+ "format/prettier": [
108
+ "error",
109
+ {
110
+ ...prettierOptions,
111
+ parser: "less"
112
+ }
113
+ ]
114
+ }
115
+ }
116
+ );
117
+ }
118
+ if (options.html) {
119
+ configs.push({
120
+ name: "luxass:formatter:html",
121
+ files: ["**/*.html"],
122
+ languageOptions: {
123
+ parser: parserPlain
124
+ },
125
+ rules: {
126
+ "format/prettier": [
127
+ "error",
128
+ {
129
+ ...prettierOptions,
130
+ parser: "html"
131
+ }
132
+ ]
133
+ }
134
+ });
135
+ }
136
+ if (options.markdown) {
137
+ const formater = options.markdown === true ? "prettier" : options.markdown;
138
+ configs.push({
139
+ name: "luxass:formatter:markdown",
140
+ files: [GLOB_MARKDOWN],
141
+ languageOptions: {
142
+ parser: parserPlain
143
+ },
144
+ rules: {
145
+ [`format/${formater}`]: [
146
+ "error",
147
+ formater === "prettier" ? {
148
+ printWidth: 120,
149
+ ...prettierOptions,
150
+ embeddedLanguageFormatting: "off",
151
+ parser: "markdown"
152
+ } : {
153
+ ...dprintOptions,
154
+ language: "markdown"
155
+ }
156
+ ]
157
+ }
158
+ });
159
+ }
160
+ if (options.graphql) {
161
+ configs.push({
162
+ name: "luxass:formatter:graphql",
163
+ files: ["**/*.graphql"],
164
+ languageOptions: {
165
+ parser: parserPlain
166
+ },
167
+ rules: {
168
+ "format/prettier": [
169
+ "error",
170
+ {
171
+ ...prettierOptions,
172
+ parser: "graphql"
173
+ }
174
+ ]
175
+ }
176
+ });
177
+ }
178
+ return configs;
179
+ }
180
+
181
+ export {
182
+ formatters
183
+ };
@@ -0,0 +1,29 @@
1
+ // src/configs/comments.ts
2
+ import eslintCommentsPlugin from "@eslint-community/eslint-plugin-eslint-comments";
3
+ async function comments() {
4
+ return [
5
+ {
6
+ name: "luxass:eslint-comments",
7
+ plugins: {
8
+ "eslint-comments": eslintCommentsPlugin
9
+ },
10
+ rules: {
11
+ // https://github.com/eslint-community/eslint-plugin-eslint-comments/blob/main/docs/rules/disable-enable-pair.md
12
+ "eslint-comments/disable-enable-pair": "error",
13
+ // https://github.com/eslint-community/eslint-plugin-eslint-comments/blob/main/docs/rules/no-aggregating-enable.md
14
+ "eslint-comments/no-aggregating-enable": "error",
15
+ // https://github.com/eslint-community/eslint-plugin-eslint-comments/blob/main/docs/rules/no-duplicate-disable.md
16
+ "eslint-comments/no-duplicate-disable": "error",
17
+ // https://github.com/eslint-community/eslint-plugin-eslint-comments/blob/main/docs/rules/no-unlimited-disable.md
18
+ "eslint-comments/no-unlimited-disable": "error",
19
+ // Deprecated in favor of official reportUnusedDisableDirectives
20
+ // https://github.com/eslint-community/eslint-plugin-eslint-comments/issues/133
21
+ "eslint-comments/no-unused-enable": "off"
22
+ }
23
+ }
24
+ ];
25
+ }
26
+
27
+ export {
28
+ comments
29
+ };
@@ -1,10 +1,13 @@
1
1
  import {
2
2
  interop
3
- } from "./chunk-TQ476NL2.mjs";
3
+ } from "./chunk-4YBQZLPS.mjs";
4
4
 
5
5
  // src/configs/jsdoc.ts
6
6
  async function jsdoc(options = {}) {
7
- const { stylistic = true } = options;
7
+ const {
8
+ overrides,
9
+ stylistic = true
10
+ } = options;
8
11
  return [
9
12
  {
10
13
  name: "luxass:jsdoc",
@@ -30,7 +33,8 @@ async function jsdoc(options = {}) {
30
33
  ...stylistic ? {
31
34
  "jsdoc/check-alignment": "warn",
32
35
  "jsdoc/multiline-blocks": "warn"
33
- } : {}
36
+ } : {},
37
+ ...overrides
34
38
  }
35
39
  }
36
40
  ];
@@ -0,0 +1,104 @@
1
+ import {
2
+ interop
3
+ } from "./chunk-4YBQZLPS.mjs";
4
+ import {
5
+ GLOB_MARKDOWN,
6
+ GLOB_MARKDOWN_CODE,
7
+ GLOB_MARKDOWN_IN_MARKDOWN
8
+ } from "./chunk-ATRL3UZP.mjs";
9
+
10
+ // src/configs/markdown.ts
11
+ import * as parserPlain from "eslint-parser-plain";
12
+ import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
13
+ async function markdown(options = {}) {
14
+ const {
15
+ exts = [],
16
+ files = [GLOB_MARKDOWN],
17
+ overrides = {}
18
+ } = options;
19
+ const markdown2 = await interop(import("eslint-plugin-markdown"));
20
+ return [
21
+ {
22
+ name: "luxass:markdown:setup",
23
+ plugins: {
24
+ markdown: markdown2
25
+ }
26
+ },
27
+ {
28
+ name: "luxass:markdown:processor",
29
+ files,
30
+ ignores: [GLOB_MARKDOWN_IN_MARKDOWN],
31
+ // `eslint-plugin-markdown` only creates virtual files for code blocks,
32
+ // but not the markdown file itself. We use `eslint-merge-processors` to
33
+ // add a pass-through processor for the markdown file itself.
34
+ processor: mergeProcessors([
35
+ markdown2.processors.markdown,
36
+ processorPassThrough
37
+ ])
38
+ },
39
+ {
40
+ name: "luxass:markdown:parser",
41
+ files,
42
+ languageOptions: {
43
+ parser: parserPlain
44
+ }
45
+ },
46
+ {
47
+ name: "luxass:markdown:disables",
48
+ files: [
49
+ GLOB_MARKDOWN_CODE,
50
+ ...exts.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
51
+ ],
52
+ languageOptions: {
53
+ parserOptions: {
54
+ ecmaFeatures: {
55
+ impliedStrict: true
56
+ }
57
+ }
58
+ },
59
+ rules: {
60
+ "import/newline-after-import": "off",
61
+ "no-alert": "off",
62
+ "no-console": "off",
63
+ "no-undef": "off",
64
+ "no-unused-expressions": "off",
65
+ "no-unused-vars": "off",
66
+ "node/prefer-global/process": "off",
67
+ "style/comma-dangle": "off",
68
+ "style/eol-last": "off",
69
+ // Type aware rules
70
+ "ts/await-thenable": "off",
71
+ "ts/consistent-type-imports": "off",
72
+ "ts/dot-notation": "off",
73
+ "ts/no-floating-promises": "off",
74
+ "ts/no-for-in-array": "off",
75
+ "ts/no-implied-eval": "off",
76
+ "ts/no-misused-promises": "off",
77
+ "ts/no-namespace": "off",
78
+ "ts/no-redeclare": "off",
79
+ "ts/no-require-imports": "off",
80
+ "ts/no-throw-literal": "off",
81
+ "ts/no-unnecessary-type-assertion": "off",
82
+ "ts/no-unsafe-argument": "off",
83
+ "ts/no-unsafe-assignment": "off",
84
+ "ts/no-unsafe-call": "off",
85
+ "ts/no-unsafe-member-access": "off",
86
+ "ts/no-unsafe-return": "off",
87
+ "ts/no-unused-vars": "off",
88
+ "ts/no-use-before-define": "off",
89
+ "ts/no-var-requires": "off",
90
+ "ts/restrict-plus-operands": "off",
91
+ "ts/restrict-template-expressions": "off",
92
+ "ts/unbound-method": "off",
93
+ "unicode-bom": "off",
94
+ "unused-imports/no-unused-imports": "off",
95
+ "unused-imports/no-unused-vars": "off",
96
+ ...overrides
97
+ }
98
+ }
99
+ ];
100
+ }
101
+
102
+ export {
103
+ markdown
104
+ };
@@ -1,22 +1,18 @@
1
- import {
2
- GLOB_ASTRO
3
- } from "./chunk-R4NSLRAE.mjs";
4
1
  import {
5
2
  interop
6
- } from "./chunk-TQ476NL2.mjs";
3
+ } from "./chunk-4YBQZLPS.mjs";
4
+ import {
5
+ GLOB_ASTRO
6
+ } from "./chunk-ATRL3UZP.mjs";
7
7
 
8
8
  // src/configs/astro.ts
9
9
  async function astro(options) {
10
10
  const {
11
11
  a11y = false,
12
- overrides = {}
13
- // typescript = true,
12
+ files = [GLOB_ASTRO],
13
+ overrides = {},
14
+ typescript = true
14
15
  } = options;
15
- await interop([
16
- "eslint-plugin-astro",
17
- "astro-eslint-parser",
18
- ...options.a11y ? ["eslint-plugin-jsx-a11y"] : []
19
- ]);
20
16
  const [
21
17
  pluginAstro,
22
18
  parserAstro,
@@ -24,7 +20,7 @@ async function astro(options) {
24
20
  ] = await Promise.all([
25
21
  interop(import("eslint-plugin-astro")),
26
22
  interop(import("astro-eslint-parser")),
27
- ...options.a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
23
+ ...a11y ? [interop(import("eslint-plugin-jsx-a11y"))] : []
28
24
  ]);
29
25
  return [
30
26
  {
@@ -35,7 +31,8 @@ async function astro(options) {
35
31
  }
36
32
  },
37
33
  {
38
- files: [GLOB_ASTRO],
34
+ name: "luxass:astro:rules",
35
+ files,
39
36
  languageOptions: {
40
37
  // @ts-expect-error hmmm
41
38
  globals: {
@@ -44,21 +41,22 @@ async function astro(options) {
44
41
  parser: parserAstro,
45
42
  parserOptions: {
46
43
  extraFileExtensions: [".astro"],
47
- parser: options.typescript ? await interop(import("@typescript-eslint/parser")) : null,
44
+ parser: typescript ? await interop(import("@typescript-eslint/parser")) : null,
48
45
  sourceType: "module"
49
46
  }
50
47
  },
51
- name: "luxass:astro:rules",
52
48
  // @ts-expect-error hmmm
53
49
  rules: {
54
50
  "style/jsx-closing-tag-location": "off",
55
51
  "style/jsx-indent": "off",
56
52
  "style/jsx-one-expression-per-line": "off",
57
53
  ...pluginAstro.configs.all.rules,
54
+ "style/multiline-ternary": ["error", "never"],
58
55
  ...overrides
59
56
  }
60
57
  },
61
58
  {
59
+ name: "luxass:astro:rules:scripts",
62
60
  files: [
63
61
  "**/*.astro/*.js",
64
62
  "*.astro/*.js"
@@ -71,8 +69,7 @@ async function astro(options) {
71
69
  parserOptions: {
72
70
  sourceType: "module"
73
71
  }
74
- },
75
- name: "luxass:astro:rules:scripts"
72
+ }
76
73
  }
77
74
  ];
78
75
  }
@@ -0,0 +1,48 @@
1
+ import {
2
+ ensure,
3
+ interop
4
+ } from "./chunk-4YBQZLPS.mjs";
5
+ import {
6
+ GLOB_SRC
7
+ } from "./chunk-ATRL3UZP.mjs";
8
+
9
+ // src/configs/unocss.ts
10
+ async function unocss(options = {}) {
11
+ const {
12
+ attributify = true,
13
+ files = [GLOB_SRC],
14
+ overrides,
15
+ strict = false
16
+ } = options;
17
+ await ensure([
18
+ "@unocss/eslint-plugin"
19
+ ]);
20
+ const [
21
+ pluginUnoCSS
22
+ ] = await Promise.all([
23
+ interop(import("@unocss/eslint-plugin"))
24
+ ]);
25
+ return [
26
+ {
27
+ name: "luxass:unocss",
28
+ files,
29
+ plugins: {
30
+ unocss: pluginUnoCSS
31
+ },
32
+ rules: {
33
+ "unocss/order": "warn",
34
+ ...attributify ? {
35
+ "unocss/order-attributify": "warn"
36
+ } : {},
37
+ ...strict ? {
38
+ "unocss/blocklist": "error"
39
+ } : {},
40
+ ...overrides
41
+ }
42
+ }
43
+ ];
44
+ }
45
+
46
+ export {
47
+ unocss
48
+ };
@@ -1,16 +1,20 @@
1
+ import {
2
+ ensure,
3
+ interop
4
+ } from "./chunk-4YBQZLPS.mjs";
1
5
  import {
2
6
  GLOB_NEXTJS_OG,
3
7
  GLOB_NEXTJS_ROUTES,
4
8
  GLOB_SRC
5
- } from "./chunk-R4NSLRAE.mjs";
6
- import {
7
- ensure,
8
- interop
9
- } from "./chunk-TQ476NL2.mjs";
9
+ } from "./chunk-ATRL3UZP.mjs";
10
10
 
11
11
  // src/configs/nextjs.ts
12
12
  async function nextjs(options = {}) {
13
- const { overrides, rootDir } = options;
13
+ const {
14
+ files = [GLOB_SRC],
15
+ overrides,
16
+ rootDir
17
+ } = options;
14
18
  await ensure([
15
19
  "@next/eslint-plugin-next"
16
20
  ]);
@@ -23,8 +27,8 @@ async function nextjs(options = {}) {
23
27
  }
24
28
  },
25
29
  {
26
- files: [GLOB_SRC],
27
30
  name: "luxass:nextjs:rules",
31
+ files,
28
32
  rules: {
29
33
  ...pluginNextjs.configs.recommended.rules,
30
34
  ...pluginNextjs.configs["core-web-vitals"].rules,
@@ -63,16 +67,16 @@ async function nextjs(options = {}) {
63
67
  }
64
68
  },
65
69
  {
66
- files: GLOB_NEXTJS_ROUTES,
67
70
  name: "luxass:nextjs:default-export-override",
71
+ files: GLOB_NEXTJS_ROUTES,
68
72
  rules: {
69
73
  "import/prefer-default-export": "error",
70
74
  "react-refresh/only-export-components": "off"
71
75
  }
72
76
  },
73
77
  {
74
- files: GLOB_NEXTJS_OG,
75
78
  name: "luxass:nextjs:og-override",
79
+ files: GLOB_NEXTJS_OG,
76
80
  rules: {
77
81
  "@next/next/no-img-element": "off",
78
82
  "react/no-unknown-property": ["error", {
@@ -0,0 +1,63 @@
1
+ import {
2
+ ensure,
3
+ interop
4
+ } from "./chunk-4YBQZLPS.mjs";
5
+ import {
6
+ GLOB_SRC
7
+ } from "./chunk-ATRL3UZP.mjs";
8
+
9
+ // src/configs/tailwindcss.ts
10
+ async function tailwindcss(options = {}) {
11
+ const {
12
+ files = [GLOB_SRC],
13
+ overrides
14
+ } = options;
15
+ await ensure([
16
+ "eslint-plugin-tailwindcss"
17
+ ]);
18
+ const [
19
+ pluginTailwindCSS
20
+ ] = await Promise.all([
21
+ interop(import("eslint-plugin-tailwindcss"))
22
+ ]);
23
+ return [
24
+ {
25
+ name: "luxass:tailwindcss:setup",
26
+ languageOptions: {
27
+ parserOptions: {
28
+ ecmaFeatures: {
29
+ jsx: true
30
+ }
31
+ }
32
+ },
33
+ plugins: {
34
+ tailwind: pluginTailwindCSS
35
+ }
36
+ },
37
+ {
38
+ name: "luxass:tailwindcss:rules",
39
+ files,
40
+ rules: {
41
+ // https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/classnames-order.md
42
+ "tailwind/classnames-order": "warn",
43
+ // https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/enforces-negative-arbitrary-values.md
44
+ "tailwind/enforces-negative-arbitrary-values": "warn",
45
+ // https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/enforces-shorthand.md
46
+ "tailwind/enforces-shorthand": "warn",
47
+ // https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/migration-from-tailwind-2.md
48
+ "tailwind/migration-from-tailwind-2": "warn",
49
+ // https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/no-arbitrary-value.md
50
+ "tailwind/no-arbitrary-value": "off",
51
+ // https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/no-contradicting-classname.md
52
+ "tailwind/no-contradicting-classname": "error",
53
+ // https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/docs/rules/no-custom-classname.md
54
+ "tailwind/no-custom-classname": "warn",
55
+ ...overrides
56
+ }
57
+ }
58
+ ];
59
+ }
60
+
61
+ export {
62
+ tailwindcss
63
+ };