-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy patheslint.config.mjs
More file actions
50 lines (46 loc) · 1.01 KB
/
eslint.config.mjs
File metadata and controls
50 lines (46 loc) · 1.01 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
import path from 'node:path';
import globals from 'globals';
import { includeIgnoreFile } from '@eslint/compat';
import js from '@eslint/js';
// eslint-disable-next-line import/no-unresolved
import { configs } from 'eslint-config-airbnb-extended/legacy';
const gitignorePath = path.resolve('.', '.gitignore');
const jsConfig = [
{
name: 'js/config',
...js.configs.recommended,
languageOptions: {
globals: {
...globals.browser,
...globals.jquery,
enhydris: 'writeable',
google: 'readonly',
moment: 'readonly',
L: 'readonly',
ApexCharts: 'readonly',
Chart: 'readonly',
Arg: 'readonly',
axios: 'readonly',
},
},
},
...configs.base.recommended,
{
files: ['**/*.test.js'],
languageOptions: {
sourceType: 'commonjs',
globals: {
...globals.jest,
},
},
},
];
export default [
{
ignores: [
'**/js/vendor/**',
],
},
includeIgnoreFile(gitignorePath),
...jsConfig,
];