Skip to content

Commit 6548ea4

Browse files
committed
JS: Upated npm deps, upgraded eslint, new eslint config
Upgraded eslint to 11, removed incompatible airbnb config as part of process. ESlint config now in its own file.
1 parent c3a1fab commit 6548ea4

File tree

4 files changed

+2146
-1314
lines changed

4 files changed

+2146
-1314
lines changed

eslint.config.mjs

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import globals from 'globals';
2+
import js from '@eslint/js';
3+
4+
export default [
5+
js.configs.recommended,
6+
{
7+
ignores: ['resources/**/*-stub.js', 'resources/**/*.ts'],
8+
}, {
9+
languageOptions: {
10+
globals: {
11+
...globals.browser,
12+
},
13+
14+
ecmaVersion: 'latest',
15+
sourceType: 'module',
16+
},
17+
18+
rules: {
19+
indent: ['error', 4],
20+
'arrow-parens': ['error', 'as-needed'],
21+
22+
'padded-blocks': ['error', {
23+
blocks: 'never',
24+
classes: 'always',
25+
}],
26+
27+
'object-curly-spacing': ['error', 'never'],
28+
29+
'space-before-function-paren': ['error', {
30+
anonymous: 'never',
31+
named: 'never',
32+
asyncArrow: 'always',
33+
}],
34+
35+
'import/prefer-default-export': 'off',
36+
37+
'no-plusplus': ['error', {
38+
allowForLoopAfterthoughts: true,
39+
}],
40+
41+
'arrow-body-style': 'off',
42+
'no-restricted-syntax': 'off',
43+
'no-continue': 'off',
44+
'prefer-destructuring': 'off',
45+
'class-methods-use-this': 'off',
46+
'no-param-reassign': 'off',
47+
48+
'no-console': ['warn', {
49+
allow: ['error', 'warn'],
50+
}],
51+
52+
'no-new': 'off',
53+
54+
'max-len': ['error', {
55+
code: 110,
56+
tabWidth: 4,
57+
ignoreUrls: true,
58+
ignoreComments: false,
59+
ignoreRegExpLiterals: true,
60+
ignoreStrings: true,
61+
ignoreTemplateLiterals: true,
62+
}],
63+
},
64+
}];

0 commit comments

Comments
 (0)