From c2b92cc37d7670cadcd321d39f7ce2b8971017ca Mon Sep 17 00:00:00 2001 From: James Henry Date: Sun, 20 Jan 2019 17:32:24 -0500 Subject: [PATCH] fix(eslint-plugin): update remaining parser refs --- packages/eslint-plugin/lib/configs/recommended.json | 2 +- packages/eslint-plugin/lib/util.js | 5 +---- packages/eslint-plugin/tools/update-recommended.js | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/eslint-plugin/lib/configs/recommended.json b/packages/eslint-plugin/lib/configs/recommended.json index 77b6e55d31c9..cd21778bfff1 100644 --- a/packages/eslint-plugin/lib/configs/recommended.json +++ b/packages/eslint-plugin/lib/configs/recommended.json @@ -1,5 +1,5 @@ { - "parser": "@typescript-eslint/eslint-plugin/parser", + "parser": "@typescript-eslint/parser", "parserOptions": { "sourceType": "module" }, diff --git a/packages/eslint-plugin/lib/util.js b/packages/eslint-plugin/lib/util.js index 66c6312ea14d..1df02bfb9e8e 100644 --- a/packages/eslint-plugin/lib/util.js +++ b/packages/eslint-plugin/lib/util.js @@ -117,11 +117,8 @@ exports.getParserServices = context => { !context.parserServices.program || !context.parserServices.esTreeNodeToTSNodeMap ) { - // TODO - the message will require revisiting once the @typescript-eslint/parser work finalises - // their work around exposing the parser. They may require that there be a project config field in - // the eslint config, in which case we should check and/or report that here appropriately. throw new Error( - 'This rule requires you to use `@typescript-eslint/eslint-plugin/parser`.' + 'This rule requires you to use `@typescript-eslint/parser`.' ); } return context.parserServices; diff --git a/packages/eslint-plugin/tools/update-recommended.js b/packages/eslint-plugin/tools/update-recommended.js index 73b9571eddbe..ce402c3933be 100644 --- a/packages/eslint-plugin/tools/update-recommended.js +++ b/packages/eslint-plugin/tools/update-recommended.js @@ -49,7 +49,7 @@ function generate() { const filePath = path.resolve(__dirname, '../lib/configs/recommended.json'); const recommendedConfig = { - parser: '@typescript-eslint/eslint-plugin/parser', + parser: '@typescript-eslint/parser', parserOptions: { sourceType: 'module' },