-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
97 lines (97 loc) · 3.39 KB
/
.eslintrc.js
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// eslint-disable-next-line no-undef
module.exports = {
env: {
es2021: true,
},
extends: 'eslint:recommended',
plugins: ['jsdoc'],
rules: {
'array-bracket-newline': ['error', 'consistent'],
'array-bracket-spacing': ['error', 'never'],
'array-callback-return': 'error',
'arrow-parens': ['error', 'as-needed'],
'arrow-spacing': 'error',
'block-scoped-var': 'error',
'block-spacing': 'error',
'brace-style': 'error',
'comma-dangle': ['error', { arrays: 'always-multiline', objects: 'always-multiline', imports: 'always-multiline', functions: 'never' }],
'comma-spacing': ['error', { before: false, after: true }],
'comma-style': ['error', 'last'],
'computed-property-spacing': 'error',
'curly': ['error', 'multi-or-nest', 'consistent'],
'dot-location': ['error', 'property'],
'eol-last': 'error',
'eqeqeq': 'error',
'func-call-spacing': 'error',
'func-name-matching': 'error',
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'indent': ['error', 2, { ignoredNodes: ["CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child"], MemberExpression: 'off' }],
'jsdoc/check-alignment': 'error',
'jsdoc/check-param-names': 'error',
'jsdoc/check-tag-names': 'error',
'jsdoc/check-types': 'error',
'jsdoc/implements-on-classes': 'error',
'jsdoc/require-jsdoc': 'error',
'jsdoc/require-param': 'error',
'jsdoc/require-param-description': 'error',
'jsdoc/require-param-name': 'error',
'jsdoc/require-param-type': 'error',
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
'keyword-spacing': ['error', { before: true, after: true }],
'linebreak-style': ['error', 'unix'],
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'max-nested-callbacks': 'error',
'max-statements-per-line': 'error',
'new-parens': 'error',
'no-array-constructor': 'error',
'no-await-in-loop': 'error',
'no-caller': 'error',
'no-constant-condition': ['error', { checkLoops: false }],
'no-div-regex': 'error',
'no-empty': ['error', { allowEmptyCatch: true }],
'no-extra-bind': 'error',
'no-extra-parens': ['error', 'all', { conditionalAssign: false, nestedBinaryExpressions: false, returnAssign: false }],
'no-implicit-coercion': ['error', { allow: ['!!'] }],
'no-invalid-this': 'error',
'no-iterator': 'error',
'no-label-var': 'error',
'no-lonely-if': 'error',
'no-loop-func': 'error',
'no-nested-ternary': 'error',
'no-new-object': 'error',
'no-new-wrappers': 'error',
'no-octal-escape': 'error',
'no-proto': 'error',
'no-prototype-builtins': 'off',
'no-restricted-globals': ['error', 'window'],
},
settings: {
jsdoc: {
mode: 'typescript',
},
},
globals: {
ARGV: 'readonly',
Debugger: 'readonly',
GIRepositoryGType: 'readonly',
globalThis: 'readonly',
imports: 'readonly',
Intl: 'readonly',
log: 'readonly',
logError: 'readonly',
print: 'readonly',
printerr: 'readonly',
window: 'readonly',
TextEncoder: 'readonly',
TextDecoder: 'readonly',
console: 'readonly',
setTimeout: 'readonly',
setInterval: 'readonly',
clearTimeout: 'readonly',
clearInterval: 'readonly',
},
parserOptions: {
ecmaVersion: 2022,
sourceType: "module",
},
};