Skip to content

Commit

Permalink
feat: do not auto fix unused-imports/no-unused-imports in editors
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Aug 23, 2023
1 parent 6427846 commit ed2b006
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/eslint-config-basic/index.js
@@ -1,3 +1,7 @@
// eslint-disable-next-line n/prefer-global/process
const isInEditor = (process.env.VSCODE_PID || process.env.JETBRAINS_IDE) && !process.env.CI
const offInEditor = isInEditor ? 'off' : 'error'

module.exports = {
env: {
es6: true,
Expand Down Expand Up @@ -233,7 +237,7 @@ module.exports = {
'quotes': ['error', 'single'],
'quote-props': ['error', 'consistent-as-needed'],

'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-imports': offInEditor,
'unused-imports/no-unused-vars': [
'warn',
{ vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_' },
Expand Down

0 comments on commit ed2b006

Please sign in to comment.