-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
40 lines (39 loc) · 1.02 KB
/
Copy patheslint.config.js
File metadata and controls
40 lines (39 loc) · 1.02 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
const js = require('@eslint/js');
const globals = require('globals');
module.exports = [
js.configs.recommended,
{
files: ['src/**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'script',
globals: {
...globals.browser,
// Loaded from CDN <script> tags in index.html, not bundled.
cytoscape: 'readonly',
dagre: 'readonly',
cytoscapeDagre: 'readonly',
cytoscapeSvg: 'readonly',
cytoscapeGridGuide: 'readonly',
},
},
rules: {
// Allow intentional throwaway bindings named _ (e.g. catch (_) {}).
'no-unused-vars': ['error', {
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
}],
},
},
{
// Node-based test suite (node:test + vm), run outside the browser.
files: ['test/**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'commonjs',
globals: { ...globals.node },
},
},
];