forked from salesforce/eslint-plugin-lwc-graph-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
54 lines (52 loc) · 1.53 KB
/
eslint.config.js
File metadata and controls
54 lines (52 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* Copyright (c) 2025, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
const js = require('@eslint/js');
const nodePlugin = require('eslint-plugin-n');
const eslintPlugin = require('eslint-plugin-eslint-plugin');
const tseslint = require('typescript-eslint');
module.exports = [
{
ignores: ['test/**/test.js', 'reports/**']
},
{
...js.configs.recommended,
...nodePlugin.configs['flat/recommended-script'],
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
// jest globals
jest: 'readonly',
describe: 'readonly',
it: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly'
}
},
rules: {
strict: ['error', 'global']
}
},
...tseslint.configs.recommended.map((config) => ({
...config,
files: ['**/*.d.ts']
})),
{
files: ['lib/rules/*.js'],
plugins: {
'eslint-plugin': eslintPlugin
},
...eslintPlugin.configs['flat/recommended'],
rules: {
'eslint-plugin/prefer-message-ids': 'off' // Messages come straight from Komaci.
}
}
];