mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 02:45:22 -08:00
Migrate eslint config to eslint.config.js format
This commit is contained in:
@@ -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",
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user