2018-11-13 19:21:04 +00:00
|
|
|
module.exports = {
|
2021-01-05 13:58:18 +00:00
|
|
|
extends: [
|
|
|
|
'plugin:@woocommerce/eslint-plugin/recommended',
|
|
|
|
'plugin:you-dont-need-lodash-underscore/compatible',
|
|
|
|
],
|
2018-11-13 19:21:04 +00:00
|
|
|
globals: {
|
2020-05-08 14:39:03 +00:00
|
|
|
wcStoreApiNonce: 'readonly',
|
2020-06-10 18:21:34 +00:00
|
|
|
fetchMock: true,
|
2020-07-14 19:46:44 +00:00
|
|
|
jQuery: 'readonly',
|
2020-08-20 14:14:12 +00:00
|
|
|
IntersectionObserver: 'readonly',
|
2020-09-07 17:31:10 +00:00
|
|
|
// @todo Move E2E related ESLint configuration into custom config.
|
|
|
|
//
|
|
|
|
// We should have linting properties only included for files that they
|
|
|
|
// are specific to as opposed to globally.
|
|
|
|
page: 'readonly',
|
|
|
|
browser: 'readonly',
|
|
|
|
context: 'readonly',
|
|
|
|
jestPuppeteer: 'readonly',
|
2018-11-13 19:21:04 +00:00
|
|
|
},
|
2020-09-20 23:54:08 +00:00
|
|
|
settings: {
|
|
|
|
jsdoc: { mode: 'typescript' },
|
|
|
|
},
|
2018-11-13 19:21:04 +00:00
|
|
|
rules: {
|
2020-06-05 19:13:51 +00:00
|
|
|
'woocommerce/feature-flag': 'off',
|
2020-10-28 09:14:46 +00:00
|
|
|
'react-hooks/exhaustive-deps': 'error',
|
2020-12-14 11:54:34 +00:00
|
|
|
'react/jsx-fragments': [ 'error', 'syntax' ],
|
2021-01-11 12:12:26 +00:00
|
|
|
'@wordpress/no-global-active-element': 'warn',
|
2019-09-05 15:09:31 +00:00
|
|
|
},
|
2021-01-05 13:58:18 +00:00
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: [ '**/bin/**.js', '**/storybook/**.js', '**/stories/**.js' ],
|
|
|
|
rules: {
|
|
|
|
'you-dont-need-lodash-underscore/omit': 'off',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2018-11-13 19:21:04 +00:00
|
|
|
};
|