Skip to main content

0.16

Version 0.16​

Sheriff's ESLint plugin supports the flat config which will be the default in ESLint 9.

Flat config means that the file switches from .eslintrc.json to eslint.config.js and has a new format.

To use Sheriff with the new flat config:

eslint.config.js

// ...
const sheriff = require('@softarc/eslint-plugin-sheriff');

module.exports = tseslint.config(
// ...
{
files: ['**/*.ts'],
extends: [sheriff.configs.all],
},
);

You can still use the legacy mode, i.e. .eslintrc.json:

.eslintrc.json

{
// ...
"overrides": [
{
"files": ["*.ts"],
"extends": ["plugin:@softarc/sheriff/legacy"] // <-- new name (was default in < v0.16)
}
]
}
note

Please note, that the legacy mode's name has to be changed from default to legacy.