Skip to content

Commit 2fae9f6

Browse files
committed
chore: update dev dependencies
1 parent 7ce1845 commit 2fae9f6

File tree

8 files changed

+933
-617
lines changed

8 files changed

+933
-617
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/dist/**
2+
/coverage/**
3+
/node_modules/**

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"env": {
33
"node": true,
4-
"es2021": true,
5-
"jest/globals": true
4+
"es6": true,
5+
"jest": true
66
},
77
"extends": [
88
"eslint:recommended",
9+
"plugin:@typescript-eslint/eslint-recommended",
910
"plugin:@typescript-eslint/recommended",
1011
"plugin:jest/recommended",
1112
"plugin:prettier/recommended"

__tests__/labeler.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {Inputs} from '../src/context';
33
import {Label, Labeler, LabelStatus} from '../src/labeler';
44

55
import repoLabels from './fixtures/repoLabels.json';
6+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
67
jest.spyOn(Labeler.prototype as any, 'getRepoLabels').mockImplementation((): Promise<Label[]> => {
78
return <Promise<Label[]>>(repoLabels as unknown);
89
});

dev.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ARG GITHUB_REPOSITORY
7272
RUN --mount=type=bind,target=.,rw \
7373
--mount=type=cache,target=/src/.yarn/cache \
7474
--mount=type=cache,target=/src/node_modules \
75-
yarn run test --coverageDirectory=/tmp/coverage
75+
yarn run test --coverage --coverageDirectory=/tmp/coverage
7676

7777
FROM scratch AS test-coverage
7878
COPY --from=test /tmp/coverage /

jest.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
module.exports = {
22
clearMocks: true,
3+
testEnvironment: 'node',
34
moduleFileExtensions: ['js', 'ts'],
45
setupFiles: ['dotenv/config'],
56
testMatch: ['**/*.test.ts'],
67
transform: {
78
'^.+\\.ts$': 'ts-jest'
89
},
10+
collectCoverageFrom: ['src/**/{!(main.ts),}.ts'],
11+
coveragePathIgnorePatterns: ['dist/', 'node_modules/', '__tests__/'],
912
verbose: true
1013
};

package.json

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@
33
"description": "GitHub Action to manage labels on GitHub",
44
"main": "src/main.ts",
55
"scripts": {
6-
"build": "ncc build --source-map --minify --license licenses.txt",
7-
"lint": "eslint src/**/*.ts __tests__/**/*.ts",
8-
"format": "eslint --fix src/**/*.ts __tests__/**/*.ts",
9-
"test": "jest --coverage"
6+
"build": "ncc build src/main.ts --source-map --minify --license licenses.txt",
7+
"lint": "yarn run prettier && yarn run eslint",
8+
"format": "yarn run prettier:fix && yarn run eslint:fix",
9+
"eslint": "eslint --max-warnings=0 .",
10+
"eslint:fix": "eslint --fix .",
11+
"prettier": "prettier --check \"./**/*.ts\"",
12+
"prettier:fix": "prettier --write \"./**/*.ts\"",
13+
"test": "jest",
14+
"all": "yarn run build && yarn run format && yarn test"
1015
},
1116
"repository": {
1217
"type": "git",
@@ -28,18 +33,18 @@
2833
},
2934
"devDependencies": {
3035
"@types/node": "^20.6.0",
31-
"@typescript-eslint/eslint-plugin": "^5.59.2",
32-
"@typescript-eslint/parser": "^5.59.2",
33-
"@vercel/ncc": "^0.36.1",
34-
"dotenv": "^16.0.3",
35-
"eslint": "^8.40.0",
36-
"eslint-config-prettier": "^8.8.0",
37-
"eslint-plugin-jest": "^27.2.1",
38-
"eslint-plugin-prettier": "^4.2.1",
39-
"jest": "^29.5.0",
40-
"prettier": "^2.8.8",
41-
"ts-jest": "^29.1.0",
36+
"@typescript-eslint/eslint-plugin": "^6.6.0",
37+
"@typescript-eslint/parser": "^6.6.0",
38+
"@vercel/ncc": "^0.38.0",
39+
"dotenv": "^16.3.1",
40+
"eslint": "^8.49.0",
41+
"eslint-config-prettier": "^9.0.0",
42+
"eslint-plugin-jest": "^27.2.3",
43+
"eslint-plugin-prettier": "^5.0.0",
44+
"jest": "^29.6.4",
45+
"prettier": "^3.0.3",
46+
"ts-jest": "^29.1.1",
4247
"ts-node": "^10.9.1",
43-
"typescript": "^4.9.5"
48+
"typescript": "^5.2.2"
4449
}
4550
}

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
22
"compilerOptions": {
3+
"esModuleInterop": true,
34
"target": "es6",
45
"module": "commonjs",
56
"newLine": "lf",
67
"outDir": "./lib",
78
"rootDir": "./src",
8-
"esModuleInterop": true,
99
"forceConsistentCasingInFileNames": true,
10-
"strict": true,
1110
"noImplicitAny": false,
1211
"resolveJsonModule": true,
1312
"useUnknownInCatchVariables": false,

0 commit comments

Comments
 (0)