-
Notifications
You must be signed in to change notification settings - Fork 267
Expand file tree
/
Copy patheslint.config.js
More file actions
38 lines (36 loc) · 1020 Bytes
/
eslint.config.js
File metadata and controls
38 lines (36 loc) · 1020 Bytes
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
'use strict';
import { defineConfig } from 'eslint/config';
import eslintJs from '@eslint/js';
import jestPlugin from 'eslint-plugin-jest';
import salesforceLwcConfig from '@salesforce/eslint-config-lwc/recommended.js';
import globals from 'globals';
export default defineConfig([
// Ignore dist and __lwr_cache__
{
ignores: ['dist/', '__lwr_cache__/']
},
// LWC configuration for client files and Jest mocsk
{
files: ['src/modules/**/*.js', 'jest-mocks/**/*.js'],
extends: [salesforceLwcConfig],
rules: {
'@lwc/lwc/no-unknown-wire-adapters': 'off'
}
},
// Jest test files configuration
{
files: ['**/__tests__/**/*.js', '**/*.test.js'],
plugins: {
jest: jestPlugin
},
languageOptions: {
globals: {
...globals.jest,
...globals.node
}
},
rules: {
...jestPlugin.configs.recommended.rules
}
}
]);