Remove @eslint/compat compatibility layer #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove @eslint/compat dependency ✅
Plan:
Summary of Changes:
This PR successfully removes the
@eslint/compatcompatibility layer as all ESLint plugins now have native flat config support.Files Modified:
configs/javascript.js
import { fixupPluginRules } from '@eslint/compat'fixupPluginRules(stylisticEslint)→stylisticEslintfixupPluginRules(_import)→_importconfigs/typescript.js
import { fixupPluginRules } from '@eslint/compat'fixupPluginRules(typescriptEslint)→typescriptEslintfixupPluginRules(stylisticEslint)→stylisticEslintfixupPluginRules(_import)→_importconfigs/recommended.js
import path from 'node:path'import { fileURLToPath } from 'node:url'import { fixupConfigRules } from '@eslint/compat'import { FlatCompat } from '@eslint/eslintrc'import typescriptEslint from '@typescript-eslint/eslint-plugin'FlatCompatusage with direct plugin imports:js.configs.recommended(direct use)...typescriptEslint.configs['flat/recommended'](spread array)compat.extends()wrapperpackage.json
"@eslint/compat": ">= 1"from peerDependencies"@eslint/compat": "^1.4.1"from devDependenciespnpm-lock.yaml
.gitignore
package-lock.jsonto prevent npm lock file from being committedVerification:
✅ ESLint runs successfully on TypeScript files (test/index.ts)
✅ ESLint runs successfully on JavaScript files (eslint.config.js, index.js, configs/)
✅ Plugin exports correctly with all configs intact
✅ No remaining references to @eslint/compat in codebase
✅ Security scan passed with 0 alerts
✅ Works correctly with pnpm package manager
Technical Details:
All three plugins now have native flat config support:
rulesandconfigsconfigs,meta, andruleswithflat/*config variantsrules,configs, andflatConfigsThe compatibility layer is no longer needed and has been successfully removed.
Original prompt
@eslint/compatから脱却する #10💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.