woocommerce/packages/js/api/.eslintrc.js

33 lines
658 B
JavaScript
Raw Normal View History

module.exports = {
parser: '@typescript-eslint/parser',
env: {
2021-11-05 12:43:46 +00:00
'jest/globals': true,
},
2021-11-05 12:43:46 +00:00
ignorePatterns: [ 'dist/', 'node_modules/' ],
rules: {
'no-unused-vars': 'off',
'no-dupe-class-members': 'off',
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 2,
},
2021-11-05 12:43:46 +00:00
plugins: [ '@typescript-eslint/eslint-plugin' ],
extends: [ 'plugin:@wordpress/eslint-plugin/recommended-with-formatting' ],
overrides: [
{
2021-11-05 12:43:46 +00:00
files: [ '**/*.js', '**/*.ts' ],
settings: {
jsdoc: {
mode: 'typescript',
},
},
},
{
2021-11-05 12:43:46 +00:00
files: [ '**/*.spec.ts', '**/*.test.ts' ],
rules: {
'no-console': 'off',
2021-11-05 12:43:46 +00:00
},
},
],
};