| 1 |
module.exports = { |
| 2 |
root: true, |
| 3 |
env: { |
| 4 |
browser: true, |
| 5 |
es6: true, |
| 6 |
'jest/globals': true, |
| 7 |
}, |
| 8 |
extends: [ |
| 9 |
'plugin:@wordpress/eslint-plugin/recommended', |
| 10 |
], |
| 11 |
parser: '@babel/eslint-parser', |
| 12 |
parserOptions: { |
| 13 |
sourceType: 'module', |
| 14 |
babelOptions: { |
| 15 |
configFile: './.babelrc', |
| 16 |
}, |
| 17 |
}, |
| 18 |
ignorePatterns: [ '**/build/*', '**/dist/*', '**/lib/*' ], |
| 19 |
rules: { |
| 20 |
'react/jsx-no-undef': 'off', |
| 21 |
'prettier/prettier': 'off', |
| 22 |
'jsdoc/require-param-type': 'off', |
| 23 |
'jsdoc/require-returns-description': 'off', |
| 24 |
'jsdoc/no-undefined-types': 'off', |
| 25 |
'max-lines-per-function': [ |
| 26 |
'error', |
| 27 |
{ |
| 28 |
max: 50, |
| 29 |
skipBlankLines: true, |
| 30 |
skipComments: true, |
| 31 |
}, |
| 32 |
], |
| 33 |
'max-depth': [ |
| 34 |
'error', |
| 35 |
2, |
| 36 |
], |
| 37 |
'no-constructor-return': 'error', |
| 38 |
'no-await-in-loop': 'error', |
| 39 |
eqeqeq: [ 'error', 'always' ], |
| 40 |
camelcase: [ |
| 41 |
'error', |
| 42 |
{ |
| 43 |
properties: 'never', |
| 44 |
ignoreDestructuring: true, |
| 45 |
}, |
| 46 |
], |
| 47 |
'no-var': 'error', |
| 48 |
'import/no-unresolved': 'off', |
| 49 |
'@stylistic/arrow-spacing': 'error', |
| 50 |
'@stylistic/block-spacing': 'error', |
| 51 |
'@stylistic/comma-spacing': [ |
| 52 |
'error', |
| 53 |
{ before: false, after: true }, |
| 54 |
], |
| 55 |
'@stylistic/array-bracket-spacing': [ 'error', 'always' ], |
| 56 |
'@stylistic/computed-property-spacing': [ 'error', 'always' ], |
| 57 |
'@wordpress/i18n-text-domain': [ |
| 58 |
'error', |
| 59 |
{ |
| 60 |
allowedTextDomain: [ 'jet-form-builder' ], |
| 61 |
}, |
| 62 |
], |
| 63 |
}, |
| 64 |
plugins: [ |
| 65 |
'react', |
| 66 |
'@stylistic', |
| 67 |
'jest', |
| 68 |
], |
| 69 |
globals: { |
| 70 |
window: 'readonly', |
| 71 |
jQuery: 'readonly', |
| 72 |
Vue: 'readonly', |
| 73 |
Vuex: 'readonly', |
| 74 |
wp: 'readonly', |
| 75 |
ajaxurl: 'readonly', |
| 76 |
jfbEventBus: 'writable', |
| 77 |
JetFBComponents: 'writable', |
| 78 |
JetFBActions: 'writable', |
| 79 |
JetFBStore: 'writable', |
| 80 |
JetFBHooks: 'writable', |
| 81 |
JetFormEditorData: 'readonly', |
| 82 |
JetFormBuilderSettings: 'readonly', |
| 83 |
JetFormBuilderAbstract: 'writable', |
| 84 |
JetFormBuilderFunctions: 'writable', |
| 85 |
JetPlugins: 'writable', |
| 86 |
}, |
| 87 |
}; |