@lqbach/eslint-config 0.8.0 → 0.8.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.
- package/CHANGELOG.md +7 -0
- package/dist/index.cjs +2 -0
- package/dist/index.js +38 -36
- package/package.json +2 -1
- package/src/index.ts +2 -0
- package/src/libs.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.1](https://github.com/lqbach/eslint-prettier-config/compare/eslint-config-v0.8.0...eslint-config-v0.8.1) (2025-10-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes 🐛
|
|
7
|
+
|
|
8
|
+
* add astro parser ([e221ce7](https://github.com/lqbach/eslint-prettier-config/commit/e221ce7b458714b543f869697360fe16741010e0))
|
|
9
|
+
|
|
3
10
|
## [0.8.0](https://github.com/lqbach/eslint-prettier-config/compare/eslint-config-v0.7.0...eslint-config-v0.8.0) (2025-10-04)
|
|
4
11
|
|
|
5
12
|
|
package/dist/index.cjs
CHANGED
|
@@ -40,6 +40,7 @@ var import_js = __toESM(require("@eslint/js"), 1);
|
|
|
40
40
|
var import_eslint_plugin_next = __toESM(require("@next/eslint-plugin-next"), 1);
|
|
41
41
|
var import_eslint_plugin = __toESM(require("@typescript-eslint/eslint-plugin"), 1);
|
|
42
42
|
var import_parser = __toESM(require("@typescript-eslint/parser"), 1);
|
|
43
|
+
var import_astro_eslint_parser = __toESM(require("astro-eslint-parser"), 1);
|
|
43
44
|
var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"), 1);
|
|
44
45
|
var import_eslint_plugin_astro = __toESM(require("eslint-plugin-astro"), 1);
|
|
45
46
|
var import_eslint_plugin_jsonc = __toESM(require("eslint-plugin-jsonc"), 1);
|
|
@@ -253,6 +254,7 @@ function config(params = {}) {
|
|
|
253
254
|
const astroConfig = params.astro ?? false ? {
|
|
254
255
|
files: ["**/*.astro"],
|
|
255
256
|
languageOptions: {
|
|
257
|
+
parser: import_astro_eslint_parser.default,
|
|
256
258
|
parserOptions: params.typescript ? {
|
|
257
259
|
extraFileExtensions: [".astro"],
|
|
258
260
|
parser: import_parser.default,
|
package/dist/index.js
CHANGED
|
@@ -6,18 +6,19 @@ import { default as default2 } from "@eslint/js";
|
|
|
6
6
|
import { default as default3 } from "@next/eslint-plugin-next";
|
|
7
7
|
import { default as default4 } from "@typescript-eslint/eslint-plugin";
|
|
8
8
|
import { default as default5 } from "@typescript-eslint/parser";
|
|
9
|
-
import { default as default6 } from "eslint-
|
|
10
|
-
import { default as default7 } from "eslint-
|
|
11
|
-
import { default as default8 } from "eslint-plugin-
|
|
12
|
-
import { default as default9 } from "eslint-plugin-
|
|
13
|
-
import { default as default10 } from "eslint-plugin-
|
|
14
|
-
import { default as default11 } from "eslint-plugin-react
|
|
15
|
-
import { default as default12 } from "eslint-plugin-
|
|
16
|
-
import { default as default13 } from "eslint-plugin-
|
|
17
|
-
import { default as default14 } from "eslint-plugin-
|
|
18
|
-
import { default as default15 } from "
|
|
19
|
-
import { default as default16 } from "
|
|
20
|
-
import { default as default17 } from "
|
|
9
|
+
import { default as default6 } from "astro-eslint-parser";
|
|
10
|
+
import { default as default7 } from "eslint-config-prettier";
|
|
11
|
+
import { default as default8 } from "eslint-plugin-astro";
|
|
12
|
+
import { default as default9 } from "eslint-plugin-jsonc";
|
|
13
|
+
import { default as default10 } from "eslint-plugin-perfectionist";
|
|
14
|
+
import { default as default11 } from "eslint-plugin-react";
|
|
15
|
+
import { default as default12 } from "eslint-plugin-react-hooks";
|
|
16
|
+
import { default as default13 } from "eslint-plugin-unused-imports";
|
|
17
|
+
import { default as default14 } from "eslint-plugin-vue";
|
|
18
|
+
import { default as default15 } from "eslint-plugin-yml";
|
|
19
|
+
import { default as default16 } from "jsonc-eslint-parser";
|
|
20
|
+
import { default as default17 } from "vue-eslint-parser";
|
|
21
|
+
import { default as default18 } from "yaml-eslint-parser";
|
|
21
22
|
|
|
22
23
|
// src/index.ts
|
|
23
24
|
function config(params = {}) {
|
|
@@ -67,7 +68,7 @@ function config(params = {}) {
|
|
|
67
68
|
},
|
|
68
69
|
name: "lqbach/javascript",
|
|
69
70
|
plugins: {
|
|
70
|
-
"unused-imports":
|
|
71
|
+
"unused-imports": default13
|
|
71
72
|
},
|
|
72
73
|
rules: {
|
|
73
74
|
"unused-imports/no-unused-imports": "error",
|
|
@@ -114,10 +115,10 @@ function config(params = {}) {
|
|
|
114
115
|
},
|
|
115
116
|
name: "lqbach/react",
|
|
116
117
|
plugins: {
|
|
117
|
-
react:
|
|
118
|
+
react: default11
|
|
118
119
|
},
|
|
119
120
|
rules: {
|
|
120
|
-
...
|
|
121
|
+
...default11.configs.flat?.recommended.rules,
|
|
121
122
|
// ignore `css` for emotion usage
|
|
122
123
|
"react/no-unknown-property": ["error", { ignore: ["css"] }]
|
|
123
124
|
}
|
|
@@ -126,7 +127,7 @@ function config(params = {}) {
|
|
|
126
127
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
127
128
|
name: "lqbach/react-hooks",
|
|
128
129
|
plugins: {
|
|
129
|
-
"react-hooks":
|
|
130
|
+
"react-hooks": default12
|
|
130
131
|
},
|
|
131
132
|
rules: {
|
|
132
133
|
"react-hooks/exhaustive-deps": "warn",
|
|
@@ -136,7 +137,7 @@ function config(params = {}) {
|
|
|
136
137
|
const vueConfig = params.vue ?? false ? {
|
|
137
138
|
files: ["**/*.vue"],
|
|
138
139
|
languageOptions: {
|
|
139
|
-
parser:
|
|
140
|
+
parser: default17,
|
|
140
141
|
parserOptions: {
|
|
141
142
|
parser: params.typescript ? default5 : null,
|
|
142
143
|
sourceType: "module"
|
|
@@ -144,13 +145,13 @@ function config(params = {}) {
|
|
|
144
145
|
},
|
|
145
146
|
name: "lqbach/vue",
|
|
146
147
|
plugins: {
|
|
147
|
-
vue:
|
|
148
|
+
vue: default14
|
|
148
149
|
},
|
|
149
|
-
processor:
|
|
150
|
+
processor: default14.processors[".vue"],
|
|
150
151
|
rules: {
|
|
151
|
-
...
|
|
152
|
-
...
|
|
153
|
-
...
|
|
152
|
+
...default14.configs["base"].rules,
|
|
153
|
+
...default14.configs["essential"].rules,
|
|
154
|
+
...default14.configs["strongly-recommended"].rules
|
|
154
155
|
}
|
|
155
156
|
} : {};
|
|
156
157
|
const nextConfig = params.next ?? false ? {
|
|
@@ -174,35 +175,35 @@ function config(params = {}) {
|
|
|
174
175
|
const yamlConfig = params.yaml ?? true ? {
|
|
175
176
|
files: ["**/*.{yaml, yml}"],
|
|
176
177
|
languageOptions: {
|
|
177
|
-
parser:
|
|
178
|
+
parser: default18
|
|
178
179
|
},
|
|
179
180
|
name: "lqbach/yaml",
|
|
180
181
|
plugins: {
|
|
181
|
-
yml:
|
|
182
|
+
yml: default15
|
|
182
183
|
},
|
|
183
184
|
rules: {
|
|
184
|
-
...
|
|
185
|
-
...
|
|
185
|
+
...default15.configs["standard"].rules,
|
|
186
|
+
...default15.configs["prettier"].rules
|
|
186
187
|
}
|
|
187
188
|
} : {};
|
|
188
189
|
const jsoncConfig = params.json ?? true ? [
|
|
189
190
|
{
|
|
190
191
|
name: "lqbach/jsonc-plugin",
|
|
191
192
|
plugins: {
|
|
192
|
-
jsonc:
|
|
193
|
+
jsonc: default9
|
|
193
194
|
}
|
|
194
195
|
},
|
|
195
196
|
{
|
|
196
197
|
files: ["**/*.{json, json5, jsonc}"],
|
|
197
198
|
languageOptions: {
|
|
198
|
-
parser:
|
|
199
|
+
parser: default16
|
|
199
200
|
},
|
|
200
201
|
name: "lqbach/json",
|
|
201
202
|
rules: {
|
|
202
|
-
...
|
|
203
|
-
...
|
|
204
|
-
...
|
|
205
|
-
...
|
|
203
|
+
...default9.configs["recommended-with-json"].rules,
|
|
204
|
+
...default9.configs["recommended-with-jsonc"].rules,
|
|
205
|
+
...default9.configs["recommended-with-json5"].rules,
|
|
206
|
+
...default9.configs["prettier"].rules,
|
|
206
207
|
"jsonc/no-comments": "off"
|
|
207
208
|
}
|
|
208
209
|
}
|
|
@@ -210,15 +211,16 @@ function config(params = {}) {
|
|
|
210
211
|
const perfectionistConfig = params.perfectionist ?? true ? {
|
|
211
212
|
name: "lqbach/perfectionist",
|
|
212
213
|
plugins: {
|
|
213
|
-
perfectionist:
|
|
214
|
+
perfectionist: default10
|
|
214
215
|
},
|
|
215
216
|
rules: {
|
|
216
|
-
...
|
|
217
|
+
...default10.configs["recommended-natural"].rules
|
|
217
218
|
}
|
|
218
219
|
} : {};
|
|
219
220
|
const astroConfig = params.astro ?? false ? {
|
|
220
221
|
files: ["**/*.astro"],
|
|
221
222
|
languageOptions: {
|
|
223
|
+
parser: default6,
|
|
222
224
|
parserOptions: params.typescript ? {
|
|
223
225
|
extraFileExtensions: [".astro"],
|
|
224
226
|
parser: default5,
|
|
@@ -227,7 +229,7 @@ function config(params = {}) {
|
|
|
227
229
|
},
|
|
228
230
|
name: "lqbach/astro",
|
|
229
231
|
plugins: {
|
|
230
|
-
astro:
|
|
232
|
+
astro: default8
|
|
231
233
|
},
|
|
232
234
|
rules: {
|
|
233
235
|
"astro/missing-client-only-directive-value": "error",
|
|
@@ -240,7 +242,7 @@ function config(params = {}) {
|
|
|
240
242
|
"astro/valid-compile": "error"
|
|
241
243
|
}
|
|
242
244
|
} : {};
|
|
243
|
-
const prettierConfig =
|
|
245
|
+
const prettierConfig = default7;
|
|
244
246
|
let config2 = [];
|
|
245
247
|
config2.push(ignoresConfig);
|
|
246
248
|
config2.push(...javascriptConfig);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lqbach/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.1",
|
|
5
5
|
"description": "lqbach's Personal Eslint Config",
|
|
6
6
|
"private": false,
|
|
7
7
|
"license": "MIT",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"@next/eslint-plugin-next": "^15.1.2",
|
|
23
23
|
"@typescript-eslint/eslint-plugin": "^8.18.0",
|
|
24
24
|
"@typescript-eslint/parser": "^8.18.0",
|
|
25
|
+
"astro-eslint-parser": "^1.2.2",
|
|
25
26
|
"eslint-config-prettier": "^10.1.8",
|
|
26
27
|
"eslint-plugin-astro": "^1.3.1",
|
|
27
28
|
"eslint-plugin-jsonc": "^2.16.0",
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ import globals from "globals"
|
|
|
3
3
|
import {
|
|
4
4
|
configPrettier,
|
|
5
5
|
jsConfig,
|
|
6
|
+
parserAstro,
|
|
6
7
|
parserJsonc,
|
|
7
8
|
parserTypeScript,
|
|
8
9
|
parserVue,
|
|
@@ -272,6 +273,7 @@ export default function config(params: ConfigParams = {}): Array<ConfigObject> {
|
|
|
272
273
|
? {
|
|
273
274
|
files: ["**/*.astro"],
|
|
274
275
|
languageOptions: {
|
|
276
|
+
parser: parserAstro,
|
|
275
277
|
parserOptions: params.typescript
|
|
276
278
|
? {
|
|
277
279
|
extraFileExtensions: [".astro"],
|
package/src/libs.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { default as jsConfig } from "@eslint/js"
|
|
|
6
6
|
export { default as pluginNext } from "@next/eslint-plugin-next"
|
|
7
7
|
export { default as pluginTypeScript } from "@typescript-eslint/eslint-plugin"
|
|
8
8
|
export { default as parserTypeScript } from "@typescript-eslint/parser"
|
|
9
|
+
export { default as parserAstro } from "astro-eslint-parser"
|
|
9
10
|
export { default as configPrettier } from "eslint-config-prettier"
|
|
10
11
|
export { default as pluginAstro } from "eslint-plugin-astro"
|
|
11
12
|
export { default as pluginJsonc } from "eslint-plugin-jsonc"
|