Migrate eslint config to eslint.config.js format

This commit is contained in:
Jozef Izso 2025-09-12 14:02:05 +02:00
parent aaa58cbe8b
commit 4277f239de
Failed to extract signature
3 changed files with 33 additions and 5 deletions

View file

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

32
eslint.config.mjs Normal file
View file

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

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",