Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
47 lines (46 loc) · 1.57 KB
/
Copy patheslint.config.js
File metadata and controls
47 lines (46 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
import js from '@eslint/js';
import globals from 'globals';
// Style rules follow GNOME Shell conventions:
// https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/lint/
export default [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.es2021,
// GJS globals
ARGV: 'readonly',
imports: 'readonly',
console: 'readonly',
log: 'readonly',
logError: 'readonly',
print: 'readonly',
printerr: 'readonly',
TextDecoder: 'readonly',
TextEncoder: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
// GNOME Shell global context object
global: 'readonly',
},
},
rules: {
'camelcase': ['error', {properties: 'never', allow: ['^vfunc_', '^on_']}],
'comma-dangle': ['error', 'always-multiline'],
'eqeqeq': 'error',
'indent': ['error', 4, {SwitchCase: 1}],
'no-unused-vars': ['error', {varsIgnorePattern: '^_', argsIgnorePattern: '^_'}],
'no-var': 'error',
'prefer-const': 'error',
'quotes': ['error', 'single', {avoidEscape: true}],
'semi': ['error', 'always'],
},
},
{
ignores: ['dist/', 'node_modules/'],
},
];