mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
[#66563] Use Vitest ESLint rules
Swap the Jasmine ESLint plugin for Vitest rules so migrated specs are linted against the APIs used by the new runner. https://community.openproject.org/wp/66563
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import eslint from '@eslint/js';
|
||||
import globals from 'globals';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import jasmine from 'eslint-plugin-jasmine';
|
||||
import vitest from '@vitest/eslint-plugin';
|
||||
import angular from 'angular-eslint';
|
||||
import stylistic from '@stylistic/eslint-plugin';
|
||||
|
||||
@@ -159,17 +159,11 @@ export default defineConfig([
|
||||
},
|
||||
{
|
||||
files: ['**/*.spec.ts'],
|
||||
plugins: { jasmine },
|
||||
extends: [
|
||||
jasmine.configs.recommended,
|
||||
],
|
||||
...vitest.configs.recommended,
|
||||
rules: {
|
||||
/**
|
||||
* Any template/HTML related rules you wish to use/reconfigure over and above the
|
||||
* recommended set provided by the @angular-eslint project would go here.
|
||||
*/
|
||||
...vitest.configs.recommended.rules,
|
||||
|
||||
// jasmine is unusable with unsafe member access, as expect(...) is always any
|
||||
// vitest expect(...) is always any
|
||||
'@typescript-eslint/no-unsafe-member-access': 'off',
|
||||
'@typescript-eslint/no-unsafe-call': 'off',
|
||||
|
||||
|
||||
Generated
-17
@@ -167,7 +167,6 @@
|
||||
"browserslist": "^4.28.1",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jasmine": "^4.2.2",
|
||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^7.0.1",
|
||||
@@ -15084,16 +15083,6 @@
|
||||
"strip-bom": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-jasmine": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jasmine/-/eslint-plugin-jasmine-4.2.2.tgz",
|
||||
"integrity": "sha512-nALbewRk63uz28UGNhUTJyd6GofXxVNFpWFNAwr9ySc6kpSRIoO4suwZqIYz3cfJmCacilmjp7+1Ocjr7zRagA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8",
|
||||
"npm": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-jsx-a11y": {
|
||||
"version": "6.10.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz",
|
||||
@@ -36849,12 +36838,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-plugin-jasmine": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jasmine/-/eslint-plugin-jasmine-4.2.2.tgz",
|
||||
"integrity": "sha512-nALbewRk63uz28UGNhUTJyd6GofXxVNFpWFNAwr9ySc6kpSRIoO4suwZqIYz3cfJmCacilmjp7+1Ocjr7zRagA==",
|
||||
"dev": true
|
||||
},
|
||||
"eslint-plugin-jsx-a11y": {
|
||||
"version": "6.10.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.10.2.tgz",
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
"browserslist": "^4.28.1",
|
||||
"eslint": "^9.39.2",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-jasmine": "^4.2.2",
|
||||
"eslint-plugin-jsx-a11y": "^6.10.2",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^7.0.1",
|
||||
|
||||
Reference in New Issue
Block a user