-
-
Notifications
You must be signed in to change notification settings - Fork 197
Expand file tree
/
Copy patheslint.config.mjs
More file actions
97 lines (84 loc) · 2.36 KB
/
eslint.config.mjs
File metadata and controls
97 lines (84 loc) · 2.36 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
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
import js from '@eslint/js';
import globals from 'globals';
import react from 'eslint-plugin-react';
import prettierPlugin from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';
import importPlugin from 'eslint-plugin-import';
const customGlobals = {
dom: 'readonly',
findOne: 'readonly',
findAll: 'readonly',
startsWith: 'readonly',
on: 'readonly',
once: 'readonly',
off: 'readonly',
insertAfter: 'readonly',
remove: 'readonly',
show: 'readonly',
hide: 'readonly',
addClass: 'readonly',
hasClass: 'readonly',
toggleClass: 'readonly',
removeClass: 'readonly',
App: 'readonly',
Kernel: 'readonly',
Cookies: 'readonly',
reqwest: 'readonly',
Main: 'readonly',
Bootstrap: 'readonly',
google: 'readonly',
getUrlParameter: 'readonly',
friendlyChallenge: 'readonly',
};
export default [
js.configs.recommended,
prettierConfig,
{
files: ['**/*.js', '**/*.jsx'],
plugins: {
react,
prettier: prettierPlugin,
import: importPlugin,
},
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
ecmaFeatures: { jsx: true },
},
globals: {
...globals.browser,
...globals.jquery,
...customGlobals,
},
},
settings: {
react: { version: 'detect' },
'import/resolver': {
webpack: {
config: 'webpack.development.js',
},
},
},
rules: {
...react.configs.recommended.rules,
'prettier/prettier': 'error',
'no-var': 'error',
'no-underscore-dangle': 'off',
'no-param-reassign': 'off',
'class-methods-use-this': 'off',
'default-case': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
'import/no-extraneous-dependencies': 'off',
yoda: ['error', 'always'],
'no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
},
},
];