From e32182c85b95255f9dc5143fc4b5e3354ae21970 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Tue, 22 Jun 2021 14:50:16 +0100 Subject: [PATCH] chore: add warning when running integrations (#1584) --- internal/core/server/commands/check.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/internal/core/server/commands/check.ts b/internal/core/server/commands/check.ts index 69c8aa5badf..9ae5486ea0a 100644 --- a/internal/core/server/commands/check.ts +++ b/internal/core/server/commands/check.ts @@ -149,6 +149,23 @@ export default createServerCommand({ suppressionExplanation: cachedSuppressionExplanation, args, }; + const project = await req.server.projectManager.findProject( + req.client.flags.cwd, + ); + if (project) { + if (project.config.integrations.eslint.enabled) { + reporter.warn( + markup`ESlint integration is enabled. Beware that not all the settings are supported. To turn it off run`, + ); + reporter.command("rome config disable integrations.eslint"); + } + if (project.config.integrations.prettier.enabled) { + reporter.warn( + markup`Prettier integration is enabled. Beware that not all the settings are supported. To turn it off run`, + ); + reporter.command("rome config disable integrations.prettier"); + } + } const linter = new Checker(req, opts); if (req.query.requestFlags.watch) { await linter.runWatch();