@kouts/eslint-config 3.1.6 → 3.1.8
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 +26 -23
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
> Custom ESLint and Prettier config with Vue.js support and sensible defaults
|
|
4
4
|
|
|
5
|
-
> [!NOTE]
|
|
6
|
-
>
|
|
7
|
-
> If you're looking for the previous version,
|
|
5
|
+
> [!NOTE]
|
|
6
|
+
> This config uses the [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new), requires Node.js `^22.13.0 || >=24`, and supports ESLint 10.
|
|
7
|
+
> If you're looking for the previous version, see [README_V0.md](./README_V0.md).
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -22,9 +22,7 @@ Add an `eslint.config.js` (or `eslint.config.cjs` if your project is CommonJS) t
|
|
|
22
22
|
import { config } from '@kouts/eslint-config'
|
|
23
23
|
|
|
24
24
|
export default [
|
|
25
|
-
...config(
|
|
26
|
-
env: ['browser'], // Add your environment globals here
|
|
27
|
-
}),
|
|
25
|
+
...config(),
|
|
28
26
|
{
|
|
29
27
|
// Add custom rules here
|
|
30
28
|
},
|
|
@@ -33,26 +31,31 @@ export default [
|
|
|
33
31
|
|
|
34
32
|
#### Customizing the config
|
|
35
33
|
|
|
36
|
-
The configuration
|
|
37
|
-
|
|
38
|
-
**Config
|
|
39
|
-
|
|
40
|
-
| Option | Type | Description
|
|
41
|
-
| ---------- | ---------- |
|
|
42
|
-
| ts | `boolean` | Enable TypeScript support
|
|
43
|
-
| noJsx | `boolean` |
|
|
44
|
-
| noStyle | `boolean` |
|
|
45
|
-
| semi | `boolean` | Use semicolons
|
|
46
|
-
| vue | `boolean` | Enable Vue.js support
|
|
47
|
-
| vueVersion | `2` or `3` | Specify the
|
|
48
|
-
| vitest | `boolean` | Enable Vitest support
|
|
34
|
+
The configuration composes [neostandard](https://github.com/neostandard/neostandard#configuration-options) with Vue, Vitest, Prettier, import checking, and project-specific rules. You can customize it by passing an object to `config`.
|
|
35
|
+
|
|
36
|
+
**Config defaults:**
|
|
37
|
+
|
|
38
|
+
| Option | Type | Description | Default |
|
|
39
|
+
| ---------- | ---------- | --------------------------------------------- | -------------------- |
|
|
40
|
+
| ts | `boolean` | Enable TypeScript support | `true` |
|
|
41
|
+
| noJsx | `boolean` | Disable JSX rules | `true` |
|
|
42
|
+
| noStyle | `boolean` | Disable style rules | `true` |
|
|
43
|
+
| semi | `boolean` | Use semicolons | `false` |
|
|
44
|
+
| vue | `boolean` | Enable Vue.js support | `true` |
|
|
45
|
+
| vueVersion | `2` or `3` | Specify the Vue.js version | `3` |
|
|
46
|
+
| vitest | `boolean` | Enable Vitest support | `true` |
|
|
47
|
+
| env | `string[]` | Additional global environments | Node.js and browser |
|
|
48
|
+
| files | `string[]` | Additional patterns for neostandard to lint | `**/*.vue` included |
|
|
49
|
+
| filesTs | `string[]` | Additional patterns for TypeScript linting | `[]` |
|
|
50
|
+
| globals | `string[]` or object | Additional global variables | None |
|
|
51
|
+
| ignores | `string[]` | Additional patterns to ignore | `[]` |
|
|
49
52
|
|
|
50
53
|
**Example:**
|
|
51
54
|
|
|
52
55
|
```javascript
|
|
53
56
|
config({
|
|
54
57
|
ts: false,
|
|
55
|
-
vue: true
|
|
58
|
+
vue: true,
|
|
56
59
|
vueVersion: 3,
|
|
57
60
|
vitest: false,
|
|
58
61
|
})
|
|
@@ -70,7 +73,7 @@ export default prettierConfig
|
|
|
70
73
|
|
|
71
74
|
### package.json scripts
|
|
72
75
|
|
|
73
|
-
Add the following ESLint commands to your
|
|
76
|
+
Add the following ESLint commands to your `package.json` for linting and autofixing:
|
|
74
77
|
|
|
75
78
|
```json
|
|
76
79
|
{
|
|
@@ -81,7 +84,7 @@ Add the following ESLint commands to your `.package-json` for linting and autofi
|
|
|
81
84
|
|
|
82
85
|
### VS Code settings
|
|
83
86
|
|
|
84
|
-
|
|
87
|
+
Add the following settings to your VS Code project settings for autofix on save:
|
|
85
88
|
|
|
86
89
|
`.vscode/settings.json`
|
|
87
90
|
|
|
@@ -102,7 +105,7 @@ Ad the following settings to your VS Code project settings for autofix on save:
|
|
|
102
105
|
|
|
103
106
|
## Features
|
|
104
107
|
|
|
105
|
-
-
|
|
108
|
+
- Built on [neostandard](https://github.com/neostandard/neostandard)
|
|
106
109
|
- [Prettier](https://prettier.io) for code formatting
|
|
107
110
|
- Plugins
|
|
108
111
|
- [eslint-plugin-html](https://github.com/BenoitZugmeyer/eslint-plugin-html) for linting inline scripts contained in HTML files
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kouts/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.8",
|
|
5
5
|
"packageManager": "pnpm@11.27.0",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": "^22.13.0 || >=24"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"test:unit-nowatch": "vitest run",
|
|
53
53
|
"lint": "pnpm run build && eslint .",
|
|
54
54
|
"lint-fix": "pnpm run build && eslint --fix .",
|
|
55
|
-
"lint-fixtures": "pnpm --
|
|
55
|
+
"lint-fixtures": "pnpm --dir fixtures/vue3-ts-vite-starter-template lint",
|
|
56
56
|
"typecheck": "tsc --noEmit",
|
|
57
57
|
"prepare": "husky",
|
|
58
58
|
"quality": "pnpm run lint && pnpm run typecheck && pnpm run test:unit-nowatch"
|
|
@@ -79,28 +79,28 @@
|
|
|
79
79
|
"@eslint/js": "10.0.1",
|
|
80
80
|
"@vitest/eslint-plugin": "1.6.27",
|
|
81
81
|
"eslint-config-prettier": "10.1.8",
|
|
82
|
-
"eslint-plugin-html": "8.2.
|
|
82
|
+
"eslint-plugin-html": "8.2.1",
|
|
83
83
|
"eslint-plugin-import-x": "4.17.1",
|
|
84
84
|
"eslint-plugin-prettier": "5.5.6",
|
|
85
85
|
"eslint-plugin-simple-import-sort": "14.0.0",
|
|
86
|
-
"eslint-plugin-vue": "10.11.
|
|
86
|
+
"eslint-plugin-vue": "10.11.1",
|
|
87
87
|
"neostandard": "0.14.0-next.1",
|
|
88
|
-
"prettier": "3.9.
|
|
88
|
+
"prettier": "3.9.9"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@commitlint/cli": "21.2.
|
|
92
|
-
"@commitlint/config-conventional": "21.2.
|
|
91
|
+
"@commitlint/cli": "21.2.3",
|
|
92
|
+
"@commitlint/config-conventional": "21.2.3",
|
|
93
93
|
"@semantic-release/changelog": "^7.0.0",
|
|
94
94
|
"@semantic-release/git": "^11.0.1",
|
|
95
95
|
"@types/estree": "1.0.9",
|
|
96
|
-
"@types/node": "26.6.
|
|
97
|
-
"eslint": "10.
|
|
96
|
+
"@types/node": "26.6.3",
|
|
97
|
+
"eslint": "10.11.0",
|
|
98
98
|
"husky": "9.1.7",
|
|
99
|
-
"lint-staged": "17.
|
|
99
|
+
"lint-staged": "17.6.0",
|
|
100
100
|
"pkgroll": "2.28.1",
|
|
101
101
|
"semantic-release": "^25.0.9",
|
|
102
102
|
"typescript": "6.0.3",
|
|
103
|
-
"vitest": "5.0.
|
|
103
|
+
"vitest": "5.0.2",
|
|
104
104
|
"vue-eslint-parser": "10.4.1"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|