2018-11-13 19:21:04 +00:00
|
|
|
module.exports = {
|
2020-09-07 17:31:10 +00:00
|
|
|
extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ],
|
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-09-07 17:31:10 +00:00
|
|
|
// @todo Remove temporary disabling of various eslint rules.
|
|
|
|
// To keep pull request reviews smaller and changes more precise, new rules
|
|
|
|
// added via the adoption of `@woocommerce/eslint-plugin` that are failing
|
|
|
|
// will be handled in individual pulls. The following rules need to be turned
|
|
|
|
// back on (via individual pulls):
|
|
|
|
// - jsdoc/require-param
|
|
|
|
// - jsdoc/check-tag-names
|
|
|
|
// - jsdoc/check-param-names
|
|
|
|
// - jsdoc/require-property-description
|
|
|
|
// - jsdoc/valid-types
|
|
|
|
// - jsdoc/require-property
|
|
|
|
// - jsdoc/no-undefined-types
|
|
|
|
// - jsdoc/check-types
|
|
|
|
// - jsdoc/require-returns-description
|
|
|
|
// - jsdoc/require-param-type
|
|
|
|
// - jsdoc/require-returns-type
|
|
|
|
// - jsdoc/newline-after-description
|
|
|
|
// - @wordpress/i18n-translator-comments
|
|
|
|
// - @wordpress/valid-sprintf
|
|
|
|
// - @worpdress/no-unused-vars-before-return
|
|
|
|
// - testing-library/no-await-sync-query
|
|
|
|
// - @woocommerce/dependency-group
|
|
|
|
'@wordpress/i18n-translator-comments': 'off',
|
|
|
|
'@wordpress/valid-sprintf': 'off',
|
|
|
|
'@wordpress/no-unused-vars-before-return': 'off',
|
|
|
|
'testing-library/no-await-sync-query': 'off',
|
2019-09-05 15:09:31 +00:00
|
|
|
},
|
2018-11-13 19:21:04 +00:00
|
|
|
};
|