Skip to content

Commit c0833e7

Browse files
chore: upgrade to eslint 9 with flat config
1 parent c409681 commit c0833e7

5 files changed

Lines changed: 436 additions & 588 deletions

File tree

eslint.config.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const eslintConfigLwc = require("@salesforce/eslint-config-lwc");
2+
const graphAnalyzer = require("@salesforce/eslint-plugin-lwc-graph-analyzer");
3+
4+
const globals = require("globals");
5+
6+
module.exports = [
7+
{
8+
ignores: ["!force-app/main/default/lwc/**"],
9+
},
10+
...eslintConfigLwc.configs.recommended,
11+
{
12+
...graphAnalyzer.configs.recommended,
13+
plugins: {
14+
"@salesforce/lwc-graph-analyzer": graphAnalyzer,
15+
},
16+
},
17+
{
18+
files: ["**/__tests__/**/*.js"],
19+
languageOptions: {
20+
globals: {
21+
...globals.node,
22+
},
23+
},
24+
},
25+
{
26+
// lightning/uiGraphQLApi is required for offline support
27+
rules: {
28+
"@lwc/lwc/newer-version-available": "off",
29+
},
30+
},
31+
];

force-app/main/default/lwc/.eslintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
{
22
"compilerOptions": {
3-
"experimentalDecorators": true
3+
"experimentalDecorators": true,
4+
"baseUrl": ".",
5+
"paths": {
6+
"c/*": [
7+
"*"
8+
]
9+
}
410
},
511
"include": [
612
"**/*",
713
"../../../../.sfdx/typings/lwc/**/*.d.ts"
814
],
9-
"paths": {
10-
"c/*": [
11-
"*"
12-
]
13-
},
1415
"typeAcquisition": {
1516
"include": [
1617
"jest"
1718
]
1819
}
19-
}
20+
}

0 commit comments

Comments
 (0)