Compare commits

...

5 Commits

Author SHA1 Message Date
Jozef Izso
4344e43b30 Use jest with eslint 2025-09-12 14:03:36 +02:00
Jozef Izso
8a2a2093e5 Use prettier with eslint 2025-09-12 14:03:30 +02:00
Jozef Izso
4277f239de Migrate eslint config to eslint.config.js format 2025-09-12 14:02:05 +02:00
Jozef Izso
aaa58cbe8b Upgrade to eslint v9 2025-09-12 14:00:40 +02:00
Jozef Izso
34d8269ede Merge pull request #658 from dorny/feature/github_actions 2025-09-12 13:33:58 +02:00
4 changed files with 1413 additions and 1029 deletions

View File

@@ -1,4 +0,0 @@
dist/
lib/
node_modules/
jest.config.js

52
eslint.config.mjs Normal file
View File

@@ -0,0 +1,52 @@
import github from 'eslint-plugin-github'
import prettier from 'eslint-plugin-prettier'
import jest from 'eslint-plugin-jest'
export default [
github.getFlatConfigs().recommended,
...github.getFlatConfigs().typescript,
{
files: ['src/**/*.ts'],
plugins: {
prettier,
},
rules: {
'no-shadow': 'off',
'import/no-namespace': 'off',
'i18n-text/no-en': 'off',
'prefer-template': 'off',
'prettier/prettier': 'error',
"@typescript-eslint/array-type": ['error', {default: 'array'}],
'@typescript-eslint/no-unused-vars': ['error', {varsIgnorePattern: '^_'}],
'@typescript-eslint/no-shadow': ['error'],
},
},
{
files: ['__tests__/**/*.test.ts'],
...jest.configs['flat/recommended'],
plugins: {
jest,
},
languageOptions: {
globals: jest.environments.globals.globals,
},
rules: {
'i18n-text/no-en': 'off',
'import/no-namespace': 'off',
"@typescript-eslint/array-type": ['error', {default: 'array'}],
},
},
{
ignores: [
'dist/**',
'lib/**',
'node_modules/**',
'__tests__/__snapshots__/**',
'__tests__/__results__/**',
'assets/**',
'reports/**',
'eslint.config.mjs',
'jest.config.js',
],
},
]

2372
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@
"build": "tsc",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
"lint": "eslint src/**/*.ts",
"lint": "eslint",
"package": "ncc build --license licenses.txt && eolConverter lf 'dist/*'",
"version": "npm run build && npm run package && git add dist/*",
"test": "jest --ci --reporters=default --reporters=jest-junit",
@@ -52,15 +52,15 @@
"@types/node": "^20.19.13",
"@types/picomatch": "^4.0.2",
"@types/xml2js": "^0.4.14",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.43.0",
"@typescript-eslint/parser": "^8.43.0",
"@vercel/ncc": "^0.38.3",
"eol-converter-cli": "^1.1.0",
"eslint": "^8.57.1",
"eslint-import-resolver-typescript": "^3.10.1",
"eslint-plugin-github": "^4.10.2",
"eslint": "^9.35.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-github": "^6.0.0",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jest": "^28.14.0",
"eslint-plugin-jest": "^29.0.1",
"eslint-plugin-prettier": "^5.5.4",
"jest": "^30.1.3",
"jest-junit": "^16.0.0",