From d3b061815fa6dd53f6f81a4d4ceb8fa55bc567ce Mon Sep 17 00:00:00 2001 From: AdriAt360 Date: Wed, 1 Jun 2022 17:47:39 +0200 Subject: [PATCH] [Fix] `no-restricted-paths`: fix an error message --- CHANGELOG.md | 3 +++ src/rules/no-restricted-paths.js | 2 +- tests/src/rules/no-restricted-paths.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63b33fe917..fcb9f37cce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange ### Fixed - [`order`]: move nested imports closer to main import entry ([#2396], thanks [@pri1311]) +- [`no-restricted-paths`]: fix an error message ([#2466], thanks [@AdriAt360]) ### Changed - [Tests] `named`: Run all TypeScript test ([#2427], thanks [@ProdigySim]) @@ -990,6 +991,7 @@ for info on changes for earlier releases. [`memo-parser`]: ./memo-parser/README.md +[#2466]: https://github.com/import-js/eslint-plugin-import/pull/2466 [#2440]: https://github.com/import-js/eslint-plugin-import/pull/2440 [#2427]: https://github.com/import-js/eslint-plugin-import/pull/2427 [#2417]: https://github.com/import-js/eslint-plugin-import/pull/2417 @@ -1493,6 +1495,7 @@ for info on changes for earlier releases. [@aberezkin]: https://github.com/aberezkin [@adamborowski]: https://github.com/adamborowski [@adjerbetian]: https://github.com/adjerbetian +[@AdriAt360]: https://github.com/AdriAt360 [@ai]: https://github.com/ai [@aladdin-add]: https://github.com/aladdin-add [@alex-page]: https://github.com/alex-page diff --git a/src/rules/no-restricted-paths.js b/src/rules/no-restricted-paths.js index e5bc6bc850..e869564f1f 100644 --- a/src/rules/no-restricted-paths.js +++ b/src/rules/no-restricted-paths.js @@ -81,7 +81,7 @@ module.exports = { function reportInvalidExceptionGlob(node) { context.report({ node, - message: 'Restricted path exceptions must be glob patterns when`from` is a glob pattern', + message: 'Restricted path exceptions must be glob patterns when `from` is a glob pattern', }); } diff --git a/tests/src/rules/no-restricted-paths.js b/tests/src/rules/no-restricted-paths.js index 11934599ee..e38a79300b 100644 --- a/tests/src/rules/no-restricted-paths.js +++ b/tests/src/rules/no-restricted-paths.js @@ -255,7 +255,7 @@ ruleTester.run('no-restricted-paths', rule, { } ], } ], errors: [ { - message: 'Restricted path exceptions must be glob patterns when`from` is a glob pattern', + message: 'Restricted path exceptions must be glob patterns when `from` is a glob pattern', line: 1, column: 15, } ],