From 259e510cb35608f3a5dd4093a81946a851782cb8 Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Thu, 3 Oct 2019 12:00:08 +0200 Subject: [PATCH] Scripts: Added temporary workaround for the default config used with `lint-js` command --- packages/scripts/CHANGELOG.md | 6 ++++++ packages/scripts/config/.eslintrc.js | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index f8e8f1438ffd4..8bd51c17509b8 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -1,3 +1,9 @@ +## Master + +### Bug Fixes + +- Added a temporary workaround for the default config used with `lint-js` command. It uses linting rules for both e2e and unit tests with all files until override files globbing logic is fixed when using `eslint` with `--config` (related [issue](https://github.com/eslint/eslint/issues/11558)). + ## 5.0.0 (2019-09-16) ### Breaking Changes diff --git a/packages/scripts/config/.eslintrc.js b/packages/scripts/config/.eslintrc.js index 4fa347677ff52..98c2e716c390c 100644 --- a/packages/scripts/config/.eslintrc.js +++ b/packages/scripts/config/.eslintrc.js @@ -1,4 +1,12 @@ module.exports = { root: true, - extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ], + extends: [ + 'plugin:@wordpress/eslint-plugin/recommended', + + // Temporary workaround to use linting rules for both e2e and unit tests with all files + // until override files globbing logic is fixed when using with --config. + // @see https://github.com/eslint/eslint/issues/11558 + 'plugin:@wordpress/eslint-plugin/test-e2e', + 'plugin:@wordpress/eslint-plugin/test-unit', + ], };