@enke.dev/lint 0.11.5 → 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 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 @enke.dev/lint eslint prettier jiti typescript typescript-eslint
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
- ### Using Typescript
27
+ ### Extending a config
28
28
 
29
- If you intend to use Typescript for your config file, you just have to install `typescript`, `typescript-eslint` and `jiti`.
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.5",
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
  },
@@ -69,6 +70,7 @@
69
70
  "eslint-plugin-wc": "3.0.2"
70
71
  },
71
72
  "devDependencies": {
73
+ "@awmottaz/prettier-plugin-void-html": "1.9.0",
72
74
  "@eslint/config-inspector": "1.4.2",
73
75
  "@types/node": "24.10.1",
74
76
  "eslint": "9.39.1",
@@ -7,5 +7,6 @@ const config = {
7
7
  tabWidth: 2,
8
8
  trailingComma: 'es5',
9
9
  useTabs: false,
10
+ plugins: ['@awmottaz/prettier-plugin-void-html'],
10
11
  };
11
12
  export default config;