-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
When following the current stylistic installation guide you'll receive an error with adonis eslint config because "@Stylistic" is already declared as a plugin. But sadly the version that is used is the @stylistic/eslint-plugin-ts
package that is no longer maintained.
See the text here:
Unified Plugin
We used to provide separate plugins for each language like
@stylistic/eslint-plugin-js
, but since v5, we have merged them into a single plugin.Those separated plugins would still work but would not receive new features. Please consider migrating to the unified plugin.
My number one mistake was that I didn't know that adonis already bring Stylistic preinstalled, but to use new rules like array-bracket-newline
I have to do weird renamings in my eslint config:
import { configApp } from '@adonisjs/eslint-config';
import stylistic from '@stylistic/eslint-plugin'
export default configApp({
plugins: {
// "@stylistic" was already declared in the base config of AdonisJS
'@stylisticCustom': stylistic // <--
},
rules: {
'@stylisticCustom/array-bracket-newline': ['error', 'consistent'],
// ....
},
});
So would be nice that the new "unified" version get used.