diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 9a9e7d1..0000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -lib/ -renovate.json -tsconfig.json diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 472eed7..0000000 --- a/.eslintrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "root": true, - "extends": [ - "@shelf/eslint-config/typescript" - ] -} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..069a711 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,9 @@ +import rules from '@shelf/eslint-config/typescript.js'; + +export default [ + ...rules, + {files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '**/*.json']}, + { + ignores: ['**/node_modules/', '**/coverage/', '**/lib/', 'renovate.json', 'tsconfig.json'], + }, +]; diff --git a/package.json b/package.json index d2a577b..48e0494 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,8 @@ "scripts": { "build": "tsc", "coverage": "yarn test --coverage", - "lint": "eslint . --ext .js,.ts,.json --fix --quiet", - "lint:ci": "eslint . --ext .js,.ts,.json --quiet", + "lint": "yarn lint:ci --fix", + "lint:ci": "eslint . --quiet", "test": "TZ=UTC jest src -c jest.config.unit.js", "test:es": "DEBUG=elasticsearch-local TZ=UTC jest src -c jest.config.es.js --forceExit", "type-check": "tsc --noEmit", @@ -50,14 +50,14 @@ "devDependencies": { "@elastic/elasticsearch": "8.17.0", "@shelf/babel-config": "3.0.0", - "@shelf/eslint-config": "3.15.1", + "@shelf/eslint-config": "4.2.1", "@shelf/jest-elasticsearch": "5.2.0", "@shelf/prettier-config": "1.0.0", "@types/flat": "5.0.5", "@types/jest": "29.5.14", "@types/node": "18", "babel-jest": "29.7.0", - "eslint": "8.57.1", + "eslint": "9.17.0", "husky": "9.1.7", "jest": "29.7.0", "lint-staged": "15.2.11",