Closed jeremymeng closed 1 month ago
+1
Love this eslint plugin! ❤️ It has saved me many times 😅
Until the flat configuration is supported, something like this worked for me, thanks to fixupPluginRules
from ESLint:
// ...imports
import { fixupPluginRules } from '@eslint/compat';
import noOnlyTests from 'eslint-plugin-no-only-tests';
// ...more imports
export default [
// ...bunch of configs, rules, etc.
{
files: ['**/*.test.ts'],
plugins: {
'no-only-tests': fixupPluginRules(noOnlyTests),
},
rules: {
// ...other rules for test files
'no-only-tests/no-only-tests': 'error',
}
}
];
Hope this helps! I'm sure there is a better way, or other ways, to do this for now, but the above kept me moving as we migrate from ESLint v8 to v9.
Thanks for rasing this @jeremymeng, v3.3.0
has been released which I beleive should fix the issue, but please let me know if you have any problems.
eslint v9 will only support flat config format.