-
Notifications
You must be signed in to change notification settings - Fork 84
/
.eslintrc.js
125 lines (123 loc) · 3.3 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
const path = require('path');
const eslintConfig = {
root: true,
parser: '@babel/eslint-parser',
extends: ['plugin:@wordpress/eslint-plugin/recommended'],
settings: {
'import/resolver': {
node: {},
webpack: {
config: path.join(__dirname, '/webpack.config.js'),
},
},
},
globals: {
kt_blocks_params: 'readonly',
kadence_blocks_params: 'writable',
kt_deregister_params: 'readonly',
kadence_blocks_user_params: 'readonly',
kadence_blocks_parallax: 'readonly',
kadence_blocks_form_params: 'readonly',
form_data: 'readonly',
grecaptcha: 'readonly',
kb_adv_form_params: 'readonly',
kadence_video_pop: 'readonly',
kadenceExtensionImagePicker: 'readonly',
kt_blocks_default_size: 'readonly',
kb_glightbox: 'readonly',
AOS: 'readonly',
kadenceHomeParams: 'readonly',
jarallax: 'readonly',
jQuery: 'readonly',
sessionStorage: 'writable',
localStorage: 'writable',
FormData: 'readonly',
location: 'readonly',
FileReader: 'readonly',
Headers: 'readonly',
pagenow: 'readonly',
ENTER: 'readonly',
Splide: 'readonly',
MouseEvent: 'readonly',
countUp: 'readonly',
CustomEvent: 'readonly',
DOMParser: 'readonly',
KadenceAccordion: 'readonly',
Gumshoe: 'readonly',
HTMLElement: 'readonly',
XMLHttpRequest: 'readonly',
Typed: 'readonly',
define: 'readonly',
history: 'writable',
filteredBlockPatterns: 'readable',
onSelectBlockPattern: 'readable',
blockCode: 'readable',
scrollTo: 'readable',
Image: 'readable',
Masonry: 'readable',
IntersectionObserver: 'readable',
getComputedStyle: 'readable',
ScrollMagic: 'readable',
},
rules: {
'@wordpress/i18n-text-domain': [
'error',
{
allowedTextDomain: ['default', 'kadence-blocks', 'kadence-starter-templates'],
},
],
'import/no-unresolved': [
'error',
{
ignore: ['@kadence/icons', '@kadence/components', '@kadence/helpers', '@wordpress/*'],
},
],
'import/no-extraneous-dependencies': 'off',
'no-unused-vars': 'off',
'react-hooks/exhaustive-deps': 'off',
'no-shadow': 'off',
'jsdoc/require-param': 'off',
'no-nested-ternary': 'off',
camelcase: 'off',
'@wordpress/no-unsafe-wp-apis': 'off',
'react-hooks/rules-of-hooks': 'off',
'no-console': 'off',
'react/jsx-no-target-blank': 'off',
'array-callback-return': 'off',
'jsdoc/check-types': 'off',
'jsdoc/check-tag-names': 'off',
'jsdoc/newline-after-description': 'off',
'jsx-a11y/label-has-associated-control': 'off',
eqeqeq: 'off',
'no-unused-expressions': 'off',
'jsx-a11y/no-autofocus': 'off',
'jsdoc/check-line-alignment': 'off',
'react/no-unknown-property': 'off',
'react/jsx-key': 'off',
'jsdoc/check-param-names': 'off',
'jsdoc/no-undefined-types': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsdoc/valid-types': 'off',
'jsx-a11y/interactive-supports-focus': 'off',
'jsdoc/require-returns-description': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/aria-role': 'off',
'jsdoc/require-param-type': 'off',
'no-redeclare': 'off',
'import/default': 'off',
'jsx-a11y/alt-text': 'off',
'no-bitwise': 'off',
'jsdoc/require-returns-check': 'off',
'@wordpress/no-global-active-element': 'off',
},
overrides: [
{
files: ['src/assets/js/**'],
rules: {
'no-var': 'off',
},
},
],
ignorePatterns: [],
};
module.exports = eslintConfig;