Skip to content

Commit

Permalink
eslint for test files
Browse files Browse the repository at this point in the history
  • Loading branch information
PssbleTrngle committed Oct 11, 2023
1 parent 951b76e commit 239c000
Show file tree
Hide file tree
Showing 14 changed files with 420 additions and 263 deletions.
12 changes: 11 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,15 @@
"no-console": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off"
}
},
"overrides": [
{
"files": ["test/**"],
"plugins": ["jest"],
"extends": ["plugin:jest/recommended"],
"rules": {
"jest/prefer-snapshot-hint": ["error", "always"]
}
}
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"packageManager": "[email protected]",
"scripts": {
"build": "tsc",
"lint": "eslint src/**/*.ts",
"lint": "eslint \"{src,test}/**/*.ts\"",
"test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest",
"test:ci": "pnpm run lint && pnpm run test --coverage"
},
Expand All @@ -36,6 +36,7 @@
"@typescript-eslint/parser": "^6.7.4",
"cross-env": "^7.0.3",
"eslint": "^8.23.0",
"eslint-plugin-jest": "^27.4.2",
"jest": "^29.7.0",
"ts-jest": "^29.1.1"
},
Expand Down
114 changes: 114 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/error.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Logger } from './logger'

export class IllegalShapeError extends Error {
constructor(message: string, readonly input?: any) {
constructor(message: string, readonly input?: unknown) {
super(input ? `${message}: ${JSON.stringify(input)}` : message)
}
}
Expand Down
Loading

0 comments on commit 239c000

Please sign in to comment.