Open ThomasTrepanier opened 4 months ago
For anyone stumbling upon this problem, until flat-file config support is added, you can use the ReDos plugin in your flat-file config like this:
import { FlatCompat } from "@eslint/eslintrc";
const compat = new FlatCompat({
baseDirectory: import.meta.dirname,
});
const esConfigs = [
// Rest of your config
...compat.extends("plugin:eslint-plugin-redos/recommended"),
// Rest of your config
]
Source: https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config
What is the problem?
Since
eslint@8.21.0
,eslint
now support a new type of configuration file: the flat-file format.When migrating our config files to this new format, we realized that the ReDos eslint plugin does not yet support this new file format. More specifically, the
rules
attribute now has to be a JS object instead of an array of strings (see error below).Would you be able to add support for this file format?
How to fix the problem?
eslint
released a migration guide for eslint plugins to add support for flat-file configs