diff --git a/README.md b/README.md index 38ccde5c28..ee405c2f9e 100644 --- a/README.md +++ b/README.md @@ -504,6 +504,21 @@ export default antfu({ }) ``` +### Editor Specific Disables + +Some rules are disabled when inside ESLint IDE integrations, namely [`unused-imports/no-unused-imports`](https://www.npmjs.com/package/eslint-plugin-unused-imports) [`test/no-only-tests`](https://github.com/levibuzolic/eslint-plugin-no-only-tests) + +This is to prevent unused imports from getting removed by the IDE during refactoring to get a better developer experience. Those rules will be applied when you run ESLint in the terminal or [Lint Staged](#lint-staged). If you don't want this behavior, you can disable them: + +```js +// eslint.config.js +import antfu from '@antfu/eslint-config' + +export default antfu({ + isInEditor: false +}) +``` + ### Lint Staged If you want to apply lint and auto-fix before every commit, you can add the following to your `package.json`: