-
Notifications
You must be signed in to change notification settings - Fork 12
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
Convert to ESLint 8 New Flat Config #160
Comments
Seems like
May be useful for implementing in |
Flat config will be default in ESLint 9: |
In this comment, @JamesHenry mentioned an Nx automated migration to flat config: Would be amazing if we didn't need to do anything manually here... |
|
So I just saw this migration guide and it's possible to use the existing
// @ts-check
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { FlatCompat } from '@eslint/eslintrc';
const compat = new FlatCompat({
baseDirectory: dirname(fileURLToPath(import.meta.url)),
resolvePluginsRelativeTo: dirname(fileURLToPath(import.meta.url)),
});
/** @type {import('eslint').Linter.FlatConfig[]} */
const config = [
...compat.extends('upleveled'),
{
rules: {
// Comment this out and in to see that it's reading the config file correctly
// '@typescript-eslint/no-unused-vars': 'off',
},
},
];
export default config; Prerequisites
{
"type": "module"
} VS Code Settings still needs the |
Looks like |
ESLint 8 has a new "flat" configuration format:
https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new
It seems like we need a lot of changes to our configuration:
In addition to that, it's possible that we'll also need support from each of these plugins, as mentioned in the tracking issue here:
And we will also need to upgrade our own
@upleveled/eslint-plugin-upleveled
: upleveled/eslint-plugin-upleveled#117So maybe this means years of waiting still....
The text was updated successfully, but these errors were encountered: