@oliver139/eslint-config 5.2.0 → 6.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.
- package/README.md +11 -11
- package/dist/cli.mjs +9 -14
- package/dist/index.d.mts +528 -490
- package/dist/index.mjs +31 -126
- package/dist/{lib-D3Kr7UIJ.mjs → lib-zvCEClb6.mjs} +2875 -2324
- package/package.json +49 -53
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://npmjs.com/package/@oliver139/eslint-config)
|
|
4
4
|
|
|
5
5
|
> [!NOTE]
|
|
6
|
-
> Based on [Anthony's code style v7.
|
|
6
|
+
> Based on [Anthony's code style v7.7.3](https://github.com/antfu/eslint-config)
|
|
7
7
|
> Content below keeps nearly unchanged
|
|
8
8
|
|
|
9
9
|
<!-- [](https://github.com/antfu/eslint-config) -->
|
|
@@ -182,11 +182,11 @@ Add the following settings to your `.zed/settings.json`:
|
|
|
182
182
|
|
|
183
183
|
```jsonc
|
|
184
184
|
{
|
|
185
|
-
|
|
186
|
-
"
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
],
|
|
185
|
+
// Use ESLint's --fix:
|
|
186
|
+
"code_actions_on_format": {
|
|
187
|
+
"source.fixAll.eslint": true
|
|
188
|
+
},
|
|
189
|
+
"formatter": [],
|
|
190
190
|
// Enable eslint for all supported languages
|
|
191
191
|
// Defaults only include https://github.com/search?q=repo%3Azed-industries%2Fzed%20eslint_languages&type=code
|
|
192
192
|
"languages": {
|
|
@@ -196,6 +196,9 @@ Add the following settings to your `.zed/settings.json`:
|
|
|
196
196
|
"Markdown": {
|
|
197
197
|
"language_servers": ["...", "eslint"]
|
|
198
198
|
},
|
|
199
|
+
"Markdown-Inline": {
|
|
200
|
+
"language_servers": ["...", "eslint"]
|
|
201
|
+
},
|
|
199
202
|
"JSON": {
|
|
200
203
|
"language_servers": ["...", "eslint"]
|
|
201
204
|
},
|
|
@@ -213,10 +216,7 @@ Add the following settings to your `.zed/settings.json`:
|
|
|
213
216
|
"lsp": {
|
|
214
217
|
"eslint": {
|
|
215
218
|
"settings": {
|
|
216
|
-
|
|
217
|
-
"experimental": {
|
|
218
|
-
"useFlatConfig": false
|
|
219
|
-
},
|
|
219
|
+
"workingDirectories": ["./"],
|
|
220
220
|
|
|
221
221
|
// Silent the stylistic rules in your IDE, but still auto fix them
|
|
222
222
|
"rulesCustomizations": [
|
|
@@ -713,7 +713,7 @@ export default eslintConfig({
|
|
|
713
713
|
Running `npx eslint` should prompt you to install the required dependencies, otherwise, you can install them manually:
|
|
714
714
|
|
|
715
715
|
```bash
|
|
716
|
-
npm i -D @eslint-react/eslint-plugin eslint-plugin-react-
|
|
716
|
+
npm i -D @eslint-react/eslint-plugin eslint-plugin-react-refresh
|
|
717
717
|
```
|
|
718
718
|
|
|
719
719
|
#### Next.js
|
package/dist/cli.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { cac } from "cac";
|
|
|
8
8
|
import parse from "parse-gitignore";
|
|
9
9
|
import { execSync } from "node:child_process";
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "
|
|
11
|
+
var version = "6.0.1";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/cli/constants.ts
|
|
14
14
|
const vscodeSettingsString = `
|
|
@@ -103,11 +103,7 @@ const dependenciesMap = {
|
|
|
103
103
|
formatter: ["eslint-plugin-format"],
|
|
104
104
|
formatterAstro: ["prettier-plugin-astro"],
|
|
105
105
|
nextjs: ["@next/eslint-plugin-next"],
|
|
106
|
-
react: [
|
|
107
|
-
"@eslint-react/eslint-plugin",
|
|
108
|
-
"eslint-plugin-react-hooks",
|
|
109
|
-
"eslint-plugin-react-refresh"
|
|
110
|
-
],
|
|
106
|
+
react: ["@eslint-react/eslint-plugin", "eslint-plugin-react-refresh"],
|
|
111
107
|
slidev: ["prettier-plugin-slidev"],
|
|
112
108
|
solid: ["eslint-plugin-solid"],
|
|
113
109
|
svelte: ["eslint-plugin-svelte", "svelte-eslint-parser"],
|
|
@@ -169,17 +165,16 @@ async function updateEslintFiles(result) {
|
|
|
169
165
|
//#endregion
|
|
170
166
|
//#region src/cli/constants-generated.ts
|
|
171
167
|
const versionsMap = {
|
|
172
|
-
"@eslint-react/eslint-plugin": "^
|
|
173
|
-
"@next/eslint-plugin-next": "^16.
|
|
174
|
-
"@unocss/eslint-plugin": "^66.6.
|
|
175
|
-
"astro-eslint-parser": "^1.
|
|
176
|
-
"eslint": "^10.0
|
|
177
|
-
"eslint-plugin-astro": "^1.
|
|
168
|
+
"@eslint-react/eslint-plugin": "^3.0.0",
|
|
169
|
+
"@next/eslint-plugin-next": "^16.2.3",
|
|
170
|
+
"@unocss/eslint-plugin": "^66.6.8",
|
|
171
|
+
"astro-eslint-parser": "^1.4.0",
|
|
172
|
+
"eslint": "^10.2.0",
|
|
173
|
+
"eslint-plugin-astro": "^1.7.0",
|
|
178
174
|
"eslint-plugin-format": "^2.0.1",
|
|
179
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
180
175
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
181
176
|
"eslint-plugin-solid": "^0.14.5",
|
|
182
|
-
"eslint-plugin-svelte": "^3.
|
|
177
|
+
"eslint-plugin-svelte": "^3.17.0",
|
|
183
178
|
"prettier-plugin-astro": "^0.14.1",
|
|
184
179
|
"prettier-plugin-slidev": "^1.0.5",
|
|
185
180
|
"svelte-eslint-parser": "^1.6.0"
|