Skip to content

Commit

Permalink
feat: print hint message when running in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Aug 21, 2024
1 parent a50f787 commit c62102b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export function antfu(
autoRenamePlugins = true,
componentExts = [],
gitignore: enableGitignore = true,
isInEditor = isInEditorEnv(),
jsx: enableJsx = true,
react: enableReact = false,
regexp: enableRegexp = true,
Expand All @@ -97,6 +96,14 @@ export function antfu(
vue: enableVue = VuePackages.some(i => isPackageExists(i)),
} = options

let isInEditor = options.isInEditor
if (isInEditor == null) {
isInEditor = isInEditorEnv()
if (isInEditor)
// eslint-disable-next-line no-console
console.log('[@antfu/eslint-config] Detected running in editor, some rules are disabled.')
}

const stylisticOptions = options.stylistic === false
? false
: typeof options.stylistic === 'object'
Expand Down

0 comments on commit c62102b

Please sign in to comment.