Skip to content

Commit 50d4734

Browse files
chore: update node to 22 and update readme for eslint.config.js (#122)
1 parent 7254a39 commit 50d4734

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ $ npm install --save-dev @salesforce/eslint-plugin-lwc-mobile
2222

2323
The default configurations are now in the flat config format supported by ESLint 9 and beyond. To include `recommendedConfigs ` in your flat config, spread it into your configuration array. Note that `recommendedConfigs` is a collection of preset configs and must be expanded accordingly.:
2424

25+
```javascript
26+
// eslint.config.js
27+
const { defineConfig } = require("eslint/config");
28+
const lwcMobilePlugin = require("@salesforce/eslint-plugin-lwc-mobile");
29+
30+
module.exports = defineConfig([
31+
{
32+
plugins: {
33+
"@salesforce/lwc-mobile": lwcMobilePlugin,
34+
},
35+
extends: [...lwcMobilePlugin.recommendedConfigs],
36+
},
37+
]);
38+
```
39+
2540
```javascript
2641
// eslint.config.mjs
2742
import js from '@eslint/js';

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@
5151
"trailingComma": "none"
5252
},
5353
"engines": {
54-
"node": ">=20"
54+
"node": ">=22"
55+
},
56+
"volta": {
57+
"node": "22.21.1"
5558
},
5659
"type": "commonjs",
5760
"main": "dist/index.js",
@@ -96,9 +99,6 @@
9699
"peerDependencies": {
97100
"eslint": ">=7"
98101
},
99-
"volta": {
100-
"node": "20.18.0"
101-
},
102102
"publishConfig": {
103103
"registry": "https://registry.npmjs.org/"
104104
}

0 commit comments

Comments
 (0)