mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 14:27:10 +01:00
Migrate eslint config to eslint.config.js format
This commit is contained in:
parent
aaa58cbe8b
commit
4277f239de
3 changed files with 33 additions and 5 deletions
|
|
@ -1,4 +0,0 @@
|
||||||
dist/
|
|
||||||
lib/
|
|
||||||
node_modules/
|
|
||||||
jest.config.js
|
|
||||||
32
eslint.config.mjs
Normal file
32
eslint.config.mjs
Normal 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',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"format": "prettier --write **/*.ts",
|
"format": "prettier --write **/*.ts",
|
||||||
"format-check": "prettier --check **/*.ts",
|
"format-check": "prettier --check **/*.ts",
|
||||||
"lint": "eslint src/**/*.ts",
|
"lint": "eslint",
|
||||||
"package": "ncc build --license licenses.txt && eolConverter lf 'dist/*'",
|
"package": "ncc build --license licenses.txt && eolConverter lf 'dist/*'",
|
||||||
"version": "npm run build && npm run package && git add dist/*",
|
"version": "npm run build && npm run package && git add dist/*",
|
||||||
"test": "jest --ci --reporters=default --reporters=jest-junit",
|
"test": "jest --ci --reporters=default --reporters=jest-junit",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue