@ntnyq/eslint-config 3.12.2 → 4.0.0-beta.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 +7 -13
- package/dist/index.d.ts +5272 -9187
- package/dist/index.js +267 -504
- package/package.json +30 -39
- package/dist/index.cjs +0 -3561
- package/dist/index.d.cts +0 -18565
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# eslint-config
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> ESLint config for JavaScript, TypeScript, Vue, JSON, Markdown, YAML, TOML, SVG and etc.
|
|
4
4
|
|
|
5
5
|
[](https://github.com/ntnyq/eslint-config/actions)
|
|
6
6
|
[](https://www.npmjs.com/package/@ntnyq/eslint-config/v/latest)
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
## Features
|
|
11
11
|
|
|
12
|
-
- Opinionable: single quotes, no semi, trailing comma, etc
|
|
13
12
|
- Designed to work alongside with [Prettier](https://prettier.io)
|
|
13
|
+
- Opinionable: single quote, no semi, trailing comma, etc
|
|
14
14
|
- Respect `.gitignore` via [eslint-config-flat-gitignore](https://github.com/antfu/eslint-config-flat-gitignore)
|
|
15
15
|
- Out-of-box support for TypeScript, Vue, JSON, Markdown, YAML, TOML, SVG and etc
|
|
16
16
|
- Strict but provides useful rules to guard your codebase
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
22
|
-
```
|
|
22
|
+
```shell
|
|
23
23
|
pnpm add eslint prettier typescript @ntnyq/eslint-config @ntnyq/prettier-config -D
|
|
24
24
|
```
|
|
25
25
|
|
|
@@ -88,12 +88,12 @@ export default defineConfig({
|
|
|
88
88
|
"editor.formatOnSave": true,
|
|
89
89
|
"editor.codeActionsOnSave": {
|
|
90
90
|
"source.fixAll.eslint": "explicit",
|
|
91
|
-
"source.organizeImports": "never"
|
|
91
|
+
"source.organizeImports": "never",
|
|
92
|
+
"source.sortImports": "never"
|
|
92
93
|
},
|
|
93
94
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
94
95
|
"eslint.validate": [
|
|
95
96
|
"vue",
|
|
96
|
-
"html",
|
|
97
97
|
"yaml",
|
|
98
98
|
"toml",
|
|
99
99
|
"json",
|
|
@@ -124,7 +124,8 @@ pnpm add husky nano-staged -D
|
|
|
124
124
|
"prepare": "husky"
|
|
125
125
|
},
|
|
126
126
|
"nano-staged": {
|
|
127
|
-
"*.{js,ts,cjs,mjs,jsx,tsx,vue,md,
|
|
127
|
+
"*.{js,ts,cjs,mjs,jsx,tsx,vue,md,svg,json,toml,yml,yaml}": "eslint --fix",
|
|
128
|
+
"*.{css,scss,html}": "prettier -uw"
|
|
128
129
|
}
|
|
129
130
|
}
|
|
130
131
|
```
|
|
@@ -191,13 +192,6 @@ export interface ConfigOptions extends ConfigOptionsInternal, OptionsExtensions
|
|
|
191
192
|
* require `eslint-plugin-eslint-plugin` installed mannally
|
|
192
193
|
*/
|
|
193
194
|
eslintPlugin?: boolean | ConfigESLintPluginOptions
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* disabled by default
|
|
197
|
-
*
|
|
198
|
-
* require `@stylistic/eslint-plugin` installed mannally
|
|
199
|
-
*/
|
|
200
|
-
stylistic?: boolean | ConfigStylisticOptions
|
|
201
195
|
}
|
|
202
196
|
```
|
|
203
197
|
|