@oliver139/eslint-config 4.2.0 → 5.0.0
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 +25 -4
- package/dist/cli.mjs +7 -7
- package/dist/index.d.mts +2030 -589
- package/dist/index.mjs +127 -34
- package/dist/{lib-BQWEO27z.mjs → lib-DRA-mDV0.mjs} +292 -264
- package/package.json +63 -44
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# @oliver139/eslint-config
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.com/package/@oliver139/eslint-config)
|
|
4
4
|
|
|
5
|
-
[!
|
|
5
|
+
> [!NOTE]
|
|
6
|
+
> Based on [Anthony's code style v7.4.3](https://github.com/antfu/eslint-config)
|
|
7
|
+
> Content below keeps nearly unchanged
|
|
6
8
|
|
|
7
9
|
<!-- [](https://github.com/antfu/eslint-config) -->
|
|
8
10
|
|
|
@@ -289,7 +291,7 @@ export default eslintConfig({
|
|
|
289
291
|
gitignore: true,
|
|
290
292
|
|
|
291
293
|
// Enable stylistic formatting rules
|
|
292
|
-
stylistic: true,
|
|
294
|
+
// stylistic: true,
|
|
293
295
|
|
|
294
296
|
// Or customize the stylistic rules
|
|
295
297
|
stylistic: {
|
|
@@ -743,6 +745,25 @@ Running `npx eslint` should prompt you to install the required dependencies, oth
|
|
|
743
745
|
npm i -D @unocss/eslint-plugin
|
|
744
746
|
```
|
|
745
747
|
|
|
748
|
+
#### Angular
|
|
749
|
+
|
|
750
|
+
To enable Angular support, you need to explicitly turn it on:
|
|
751
|
+
|
|
752
|
+
```js
|
|
753
|
+
// eslint.config.js
|
|
754
|
+
import antfu from '@antfu/eslint-config'
|
|
755
|
+
|
|
756
|
+
export default antfu({
|
|
757
|
+
angular: true,
|
|
758
|
+
})
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
Running `npx eslint` should prompt you to install the required dependencies, otherwise, you can install them manually:
|
|
762
|
+
|
|
763
|
+
```bash
|
|
764
|
+
npm i -D @angular-eslint/eslint-plugin @angular-eslint/eslint-plugin-template @angular-eslint/template-parser
|
|
765
|
+
```
|
|
766
|
+
|
|
746
767
|
### Optional Rules
|
|
747
768
|
|
|
748
769
|
This config also provides some optional plugins/rules for extended usage.
|
|
@@ -930,4 +951,4 @@ Sure, you can configure and override rules locally in your project to fit your n
|
|
|
930
951
|
|
|
931
952
|
## License
|
|
932
953
|
|
|
933
|
-
[MIT](./LICENSE) License
|
|
954
|
+
[MIT](./LICENSE) License © 2019-PRESENT [Anthony Fu](https://github.com/antfu). Fork maintained by [Oliver Mak](https://github.com/oliver139).
|
package/dist/cli.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import parse from "parse-gitignore";
|
|
|
9
9
|
import { execSync } from "node:child_process";
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "
|
|
12
|
+
var version = "5.0.0";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/cli/constants.ts
|
|
@@ -172,17 +172,17 @@ async function updateEslintFiles(result) {
|
|
|
172
172
|
//#endregion
|
|
173
173
|
//#region src/cli/constants-generated.ts
|
|
174
174
|
const versionsMap = {
|
|
175
|
-
"@eslint-react/eslint-plugin": "^2.
|
|
176
|
-
"@next/eslint-plugin-next": "^16.1.
|
|
177
|
-
"@unocss/eslint-plugin": "^66.
|
|
175
|
+
"@eslint-react/eslint-plugin": "^2.12.4",
|
|
176
|
+
"@next/eslint-plugin-next": "^16.1.6",
|
|
177
|
+
"@unocss/eslint-plugin": "^66.6.0",
|
|
178
178
|
"astro-eslint-parser": "^1.2.2",
|
|
179
179
|
"eslint": "^9.39.2",
|
|
180
180
|
"eslint-plugin-astro": "^1.5.0",
|
|
181
|
-
"eslint-plugin-format": "^1.
|
|
181
|
+
"eslint-plugin-format": "^1.4.0",
|
|
182
182
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
183
|
-
"eslint-plugin-react-refresh": "^0.
|
|
183
|
+
"eslint-plugin-react-refresh": "^0.5.0",
|
|
184
184
|
"eslint-plugin-solid": "^0.14.5",
|
|
185
|
-
"eslint-plugin-svelte": "^3.
|
|
185
|
+
"eslint-plugin-svelte": "^3.15.0",
|
|
186
186
|
"prettier-plugin-astro": "^0.14.1",
|
|
187
187
|
"prettier-plugin-slidev": "^1.0.5",
|
|
188
188
|
"svelte-eslint-parser": "^1.4.1"
|