Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
64 lines (63 loc) · 1.57 KB
/
Copy patheslint.config.js
File metadata and controls
64 lines (63 loc) · 1.57 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
55
56
57
58
59
60
61
62
63
64
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: [
'build/',
'releases/',
// the staged site the pages workflow uploads, which is a copy of files
// that are linted where they live
'_site/',
'gallery/',
'node_modules/',
'test/data/',
// vendored vega builds the demo page loads for A/B comparison
'test/vendor/',
'test-results/',
'playwright-report/',
],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'no-var': 'error',
'prefer-const': 'error',
},
},
{
// Node maintenance scripts.
files: ['scripts/**/*.mjs'],
languageOptions: {
globals: {
process: 'readonly',
console: 'readonly',
fetch: 'readonly',
},
},
},
{
// Browser demo scripts loaded via <script> tags.
files: ['test/**/*.js'],
languageOptions: {
globals: {
window: 'readonly',
document: 'readonly',
console: 'readonly',
fetch: 'readonly',
location: 'readonly',
requestAnimationFrame: 'readonly',
performance: 'readonly',
URLSearchParams: 'readonly',
vega: 'readonly',
},
},
rules: {
'@typescript-eslint/no-unused-vars': 'off',
'no-undef': 'off',
},
},
);