Update ESLint rule tests for flat config format
- Update RuleTester to use flat config languageOptions instead of eslintrc parser format - Remove duplicate test case that ESLint v9 now detects - Add Jest globals for test files
This commit is contained in:
@@ -210,4 +210,14 @@ export default tseslint.config(
|
||||
'no-control-regex': 'off',
|
||||
},
|
||||
},
|
||||
|
||||
// Test files configuration
|
||||
{
|
||||
files: ['**/__tests__/**/*.{js,jsx,ts,tsx}', '**/*.test.{js,jsx,ts,tsx}'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.jest,
|
||||
},
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user