@ntnyq/eslint-config 4.0.2 → 4.0.4
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 +13 -7
- package/dist/index.d.mts +372 -193
- package/dist/index.mjs +57 -6
- package/package.json +24 -24
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# eslint-config
|
|
1
|
+
# @ntnyq/eslint-config
|
|
2
2
|
|
|
3
3
|
> ESLint config for JavaScript, TypeScript, Vue, JSON, Markdown, YAML, TOML, SVG and etc.
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
## Features
|
|
11
11
|
|
|
12
|
-
- Designed to work alongside with [Prettier](https://prettier.io)
|
|
12
|
+
- Designed to work alongside with [Prettier](https://prettier.io) and [TypeScript](https://www.typescriptlang.org/)
|
|
13
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
|
|
@@ -44,7 +44,9 @@ Highly recommended using **`eslint.config.mjs`** as the config file :
|
|
|
44
44
|
|
|
45
45
|
import { defineESLintConfig } from '@ntnyq/eslint-config'
|
|
46
46
|
|
|
47
|
-
export default defineESLintConfig(
|
|
47
|
+
export default defineESLintConfig({
|
|
48
|
+
// Options here
|
|
49
|
+
})
|
|
48
50
|
```
|
|
49
51
|
|
|
50
52
|
Add scripts `lint` in `package.json`:
|
|
@@ -144,11 +146,11 @@ export default defineConfig({
|
|
|
144
146
|
|
|
145
147
|
### 1. Add dependencies
|
|
146
148
|
|
|
147
|
-
```
|
|
149
|
+
```shell
|
|
148
150
|
pnpm add husky nano-staged -D
|
|
149
151
|
```
|
|
150
152
|
|
|
151
|
-
### 2. Config `package.json`
|
|
153
|
+
### 2. Config in `package.json`
|
|
152
154
|
|
|
153
155
|
```json
|
|
154
156
|
{
|
|
@@ -164,12 +166,16 @@ pnpm add husky nano-staged -D
|
|
|
164
166
|
|
|
165
167
|
### 3. Add a Git hook
|
|
166
168
|
|
|
167
|
-
```
|
|
169
|
+
```shell
|
|
168
170
|
echo "nano-staged" > .husky/pre-commit
|
|
169
171
|
```
|
|
170
172
|
|
|
171
173
|
</details>
|
|
172
174
|
|
|
175
|
+
## View what rules are enabled
|
|
176
|
+
|
|
177
|
+
Please check [eslint-config-inspector](https://eslint-config-inspector.ntnyq.com/) powered by [@eslint/config-inspector](https://github.com/eslint/config-inspector).
|
|
178
|
+
|
|
173
179
|
## Advanced config
|
|
174
180
|
|
|
175
181
|
Check for detail in:
|
|
@@ -234,7 +240,7 @@ export interface ConfigOptions {
|
|
|
234
240
|
|
|
235
241
|
## Versioning policy
|
|
236
242
|
|
|
237
|
-
This project follows [Semantic Versioning](https://semver.org/) for releases.
|
|
243
|
+
This project aims to follows [Semantic Versioning](https://semver.org/) for releases.
|
|
238
244
|
|
|
239
245
|
### Changes considered as Breaking Changes
|
|
240
246
|
|