@o3r/eslint-config
provides two different ESLint configurations:
Example of configuration:
Example :import o3rConfig from '@o3r/eslint-config';
export default [
...o3rConfig,
{
name: 'my-project-rules',
rules: {
// ...
}
}
];
[!WARNING] These configurations are deprecated. Please use FlatConfiguration instead.
@o3r/eslint-config-otter
provides three different ESLint configurations:
default
where the most time-consuming rules had been disabled to accelerate the execution.It's possible to switch a configuration to another by passing a global
argument to the ESLint CLI.
Example of configuration:
Example :// .eslintrc.js
module.exports = {
...,
'extends': [
// look for 'fast' in global arguments to use Fast config instead of Default
process.argv.includes('fast') ? '@o3r/eslint-config-otter/fast' : '@o3r/eslint-config-otter'
].map(require.resolve)
};
Then the CLI can be called as following:
Example :yarn eslint --global fast
When a rule is set to warn
in our config, it will be set to error
on the next major.