-
-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Because of these inconsistencies it took me a long time to sort out and I didn't immediately realize what the errors were, as this is my first experience of flat configuration and plugin connection in antfu-eslint-config
For example, 'eslint-plugin-playwright' and 'eslint-plugin-testing-library' connect equally easily:
{ files: ['**/*.spec.ts', '**/*.e2e.ts'], ...pluginPlaywright.configs['flat/recommended'], }, { files: ['**/*.spec.js'], ...pluginTesting.configs['flat/vue'], },
But in order to connect 'eslint-plugin-pinia' you have to write all the rules:
{ files: ['**/model/*.js'], plugins: { pinia: pluginPinia }, rules: { 'pinia/no-store-to-refs-in-store': 'error', 'pinia/prefer-single-store-per-file': 'error', 'pinia/no-duplicate-store-ids': 'error', 'pinia/no-return-global-properties': 'error', 'pinia/never-export-initialized-store': 'error', 'pinia/prefer-use-store-naming-convention': 'error', 'pinia/require-setup-store-properties-export': 'error', }, },
and the title should be like the others, not "recommended-flat":
import pinia from 'eslint-plugin-pinia'
export default [
pinia.configs["flat/recommended"],
]