-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usage in eslint flat config #13
Comments
It appears to not even be importable because it is built in CommonJS. I get |
+1 |
Specifically, do this: import {fileURLToPath} from 'node:url';
import {FlatCompat} from '@eslint/eslintrc';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
});
// ESM config export
export default [
...compat.plugins('require-extensions'),
...compat.extends('plugin:require-extensions/recommended'),
// rest of your config
] |
The new You can still use |
how to use it in the new eslint flat config
The text was updated successfully, but these errors were encountered: