forked from uPortal-Project/uPortal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
50 lines (49 loc) · 1.54 KB
/
eslint.config.mjs
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
import js from '@eslint/js';
import sonarjs from 'eslint-plugin-sonarjs';
import * as unicorn from 'eslint-plugin-unicorn';
import prettier from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
export default [
{
ignores: ['**/*.min.js', '**/build/**'],
},
js.configs.recommended,
sonarjs.configs.recommended,
unicorn.configs['flat/recommended'],
prettier,
{
languageOptions: {
globals: {
...globals.browser,
...globals.es2021,
jQuery: false,
$: false,
_: false,
up: false,
fluid: false,
},
},
rules: {
'no-redeclare': [
'error',
{
builtinGlobals: false,
},
],
'sonarjs/cognitive-complexity': 'off',
'sonarjs/no-duplicate-string': 'off',
'unicorn/filename-case': 'off',
'unicorn/no-this-assignment': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-for-loop': 'off',
'unicorn/no-null': 'off',
// disabled for js compressor compatibility
// it does not support new JS features
// TODO: find a replacement for compressor
'unicorn/numeric-separators-style': 'off',
'unicorn/prefer-module': 'off',
'unicorn/prefer-spread': 'off',
'unicorn/prefer-string-raw': 'off',
},
},
];