test: utilize new flat ESLint configuration

This commit is contained in:
Alfi Maulana 2024-04-12 18:32:16 +07:00
parent 624017b76a
commit ded322f130
No known key found for this signature in database
GPG Key ID: 2242A64C2A8DF5A4
5 changed files with 18 additions and 12 deletions

View File

@ -1,10 +0,0 @@
{
"root": true,
"extends": ["eslint:recommended"],
"overrides": [
{
"files": ["**/*.ts"],
"extends": ["plugin:@typescript-eslint/recommended"]
}
]
}

1
.gitignore vendored
View File

@ -1,6 +1,5 @@
.* .*
!.env.yarn !.env.yarn
!.eslint*
!.git* !.git*
node_modules/ node_modules/

8
eslint.config.js Normal file
View File

@ -0,0 +1,8 @@
import eslint from "@eslint/js";
export default [
eslint.configs.recommended,
{
ignores: [".*", "dist"],
},
];

View File

@ -5,7 +5,7 @@
"scripts": { "scripts": {
"build": "ncc build src/index.ts", "build": "ncc build src/index.ts",
"format": "prettier --write --cache . !dist !README.md", "format": "prettier --write --cache . !dist !README.md",
"lint": "eslint src", "lint": "eslint .",
"test": "jest" "test": "jest"
}, },
"dependencies": { "dependencies": {
@ -13,6 +13,7 @@
"@actions/exec": "^1.1.1" "@actions/exec": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.0.0",
"@jest/globals": "^29.7.0", "@jest/globals": "^29.7.0",
"@types/jest": "^29.5.12", "@types/jest": "^29.5.12",
"@types/node": "^20.11.30", "@types/node": "^20.11.30",

8
yarn.lock generated
View File

@ -493,6 +493,13 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@eslint/js@npm:^9.0.0":
version: 9.0.0
resolution: "@eslint/js@npm:9.0.0"
checksum: 10c0/ec3242a60a2525d2785d96d1e95b8060235f47f3b953aa81626968591ef8c1eb4f7f8b3647db2c97fdfa524eace949a5695be50521f64b8dcc4ed3b493ee409e
languageName: node
linkType: hard
"@fastify/busboy@npm:^2.0.0": "@fastify/busboy@npm:^2.0.0":
version: 2.1.0 version: 2.1.0
resolution: "@fastify/busboy@npm:2.1.0" resolution: "@fastify/busboy@npm:2.1.0"
@ -3866,6 +3873,7 @@ __metadata:
dependencies: dependencies:
"@actions/core": "npm:^1.10.1" "@actions/core": "npm:^1.10.1"
"@actions/exec": "npm:^1.1.1" "@actions/exec": "npm:^1.1.1"
"@eslint/js": "npm:^9.0.0"
"@jest/globals": "npm:^29.7.0" "@jest/globals": "npm:^29.7.0"
"@types/jest": "npm:^29.5.12" "@types/jest": "npm:^29.5.12"
"@types/node": "npm:^20.11.30" "@types/node": "npm:^20.11.30"