2020-02-14 02:23:21 +00:00
|
|
|
module.exports = {
|
2020-07-28 02:32:58 +00:00
|
|
|
extends: [ 'plugin:@woocommerce/eslint-plugin/recommended' ],
|
2021-03-10 15:11:37 +00:00
|
|
|
settings: {
|
2021-03-18 03:38:38 +00:00
|
|
|
'import/resolver': 'typescript',
|
2021-03-10 15:11:37 +00:00
|
|
|
},
|
2020-02-14 02:23:21 +00:00
|
|
|
rules: {
|
2020-07-28 02:32:58 +00:00
|
|
|
// temporary conversion to warnings until the below are all handled.
|
|
|
|
'@wordpress/i18n-translator-comments': 'warn',
|
|
|
|
'@wordpress/valid-sprintf': 'warn',
|
2020-08-20 02:15:08 +00:00
|
|
|
'jsdoc/check-tag-names': [
|
|
|
|
'error',
|
2021-07-08 23:01:43 +00:00
|
|
|
{
|
|
|
|
definedTags: [
|
|
|
|
'jest-environment',
|
|
|
|
'filter',
|
|
|
|
'action',
|
|
|
|
'slotFill',
|
|
|
|
],
|
|
|
|
},
|
2020-08-20 02:15:08 +00:00
|
|
|
],
|
2021-01-26 00:24:28 +00:00
|
|
|
'import/no-extraneous-dependencies': 'warn',
|
|
|
|
'import/no-unresolved': 'warn',
|
|
|
|
'jest/no-deprecated-functions': 'warn',
|
|
|
|
'@wordpress/no-unsafe-wp-apis': 'warn',
|
|
|
|
'jest/valid-title': 'warn',
|
|
|
|
'@wordpress/no-global-active-element': 'warn',
|
2020-02-14 02:23:21 +00:00
|
|
|
},
|
2021-03-01 03:01:22 +00:00
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: [ '*.ts', '*.tsx' ],
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
extends: [
|
|
|
|
'plugin:@woocommerce/eslint-plugin/recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended',
|
|
|
|
],
|
|
|
|
rules: {
|
2021-03-18 03:38:38 +00:00
|
|
|
camelcase: 'off',
|
|
|
|
'import/no-unresolved': 'warn',
|
|
|
|
'import/no-extraneous-dependencies': 'warn',
|
2021-03-01 03:01:22 +00:00
|
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
|
|
'no-use-before-define': 'off',
|
|
|
|
'@typescript-eslint/no-use-before-define': [ 'error' ],
|
|
|
|
'jsdoc/require-param': 'off',
|
2021-04-20 17:17:19 +00:00
|
|
|
// Making use of typescript no-shadow instead, fixes issues with enum.
|
|
|
|
'no-shadow': 'off',
|
|
|
|
'@typescript-eslint/no-shadow': [ 'error' ],
|
2021-05-18 19:46:21 +00:00
|
|
|
'@typescript-eslint/no-empty-function': 'off',
|
2021-03-01 03:01:22 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2020-02-14 02:23:21 +00:00
|
|
|
};
|