From 8dd471ac024c6d390ae0e862dce06e1d68b37a25 Mon Sep 17 00:00:00 2001 From: Konstantinos Paparas Date: Wed, 18 Sep 2024 17:03:42 +0200 Subject: [PATCH] feat: print hint message when running in editor --- src/factory.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/factory.ts b/src/factory.ts index 028d80b..f0366f5 100644 --- a/src/factory.ts +++ b/src/factory.ts @@ -67,7 +67,6 @@ export function rotki( componentExts = [], cypress: enableCypress, gitignore: enableGitignore = true, - isInEditor = isInEditorEnv(), regexp: enableRegexp = true, rotki: enableRotki, storybook: enableStorybook, @@ -76,6 +75,15 @@ export function rotki( vueI18n: enableVueI18n, } = options; + let isInEditor = options.isInEditor; + if (isInEditor === null) { + isInEditor = isInEditorEnv(); + if (isInEditor) { + // eslint-disable-next-line no-console + console.log('[@rotki/eslint-config] Detected running in editor, some rules are disabled.'); + } + } + const stylisticOptions = options.stylistic === false ? false : typeof options.stylistic === 'object'