@enke.dev/lint 0.11.6 → 0.11.7
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 +10 -9
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
Make sure to install the necessary peer dependencies:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm i -D @enke.dev/lint eslint prettier
|
|
8
|
+
npm i -D @enke.dev/lint eslint prettier @awmottaz/prettier-plugin-void-html
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
For Typescript support, install:
|
|
11
|
+
For Typescript support, additionally install:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm i -D
|
|
14
|
+
npm i -D jiti typescript typescript-eslint
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Prepare Eslint config
|
|
18
18
|
|
|
19
|
-
Create a `eslint.config.js` file in the root of your project and add the following content:
|
|
19
|
+
Create a `eslint.config.js` (or `eslint.config.ts`) file in the root of your project and add the following content:
|
|
20
20
|
|
|
21
21
|
```js
|
|
22
22
|
import config from '@enke.dev/lint';
|
|
@@ -24,11 +24,9 @@ import config from '@enke.dev/lint';
|
|
|
24
24
|
export default config;
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
###
|
|
27
|
+
### Extending a config
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Your config file can then be renamed to `eslint.config.ts` and look like this at minimum:
|
|
29
|
+
For example for setting up the Typescript parser, you can extend the base config like this:
|
|
32
30
|
|
|
33
31
|
```ts
|
|
34
32
|
import config from '@enke.dev/lint';
|
|
@@ -48,6 +46,9 @@ export default defineConfig([
|
|
|
48
46
|
]);
|
|
49
47
|
```
|
|
50
48
|
|
|
49
|
+
> [!TIP]
|
|
50
|
+
> This applies to all configs exported by this package, e.g. for Prettier as well.
|
|
51
|
+
|
|
51
52
|
### Using Monorepos
|
|
52
53
|
|
|
53
54
|
The VSCode Eslint plugin can be configured to pick up packages correctly by updating your `settings.json`, e.g.:
|
|
@@ -60,7 +61,7 @@ The VSCode Eslint plugin can be configured to pick up packages correctly by upda
|
|
|
60
61
|
|
|
61
62
|
## Prepare Prettier config
|
|
62
63
|
|
|
63
|
-
A [shared prettier configuration](https://prettier.io/docs/sharing-configurations) can be used by creating a `prettier.config.js` or `prettier.config.ts` file in the root of your project with the following content:
|
|
64
|
+
A [shared prettier configuration](https://prettier.io/docs/sharing-configurations) can be used by creating a `prettier.config.js` (or `prettier.config.ts`) file in the root of your project with the following content:
|
|
64
65
|
|
|
65
66
|
```js
|
|
66
67
|
import config from '@enke.dev/lint/prettier.config.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enke.dev/lint",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.7",
|
|
4
4
|
"description": "Meta package to provide linting for web projects",
|
|
5
5
|
"homepage": "https://github.com/enke-dev/lint",
|
|
6
6
|
"repository": {
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
+
"@awmottaz/prettier-plugin-void-html": "^1.9.0",
|
|
40
41
|
"eslint": "^9.35.0",
|
|
41
42
|
"prettier": "^3.6.2"
|
|
42
43
|
},
|
|
@@ -50,7 +51,6 @@
|
|
|
50
51
|
"typescript-eslint": "^8.43.0"
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
|
-
"@awmottaz/prettier-plugin-void-html": "1.9.0",
|
|
54
54
|
"@eslint/compat": "2.0.0",
|
|
55
55
|
"@eslint/js": "9.39.1",
|
|
56
56
|
"@eslint/json": "0.14.0",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"eslint-plugin-wc": "3.0.2"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
+
"@awmottaz/prettier-plugin-void-html": "1.9.0",
|
|
73
74
|
"@eslint/config-inspector": "1.4.2",
|
|
74
75
|
"@types/node": "24.10.1",
|
|
75
76
|
"eslint": "9.39.1",
|