diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..674065e --- /dev/null +++ b/.eslintrc @@ -0,0 +1,6 @@ +{ + "extends": "standard-with-typescript", + "parserOptions": { + "project": "./tsconfig.eslint.json" + } +} diff --git a/package.json b/package.json index 6c94de7..796b76f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "types": "types/index.d.ts", "scripts": { - "lint": "ts-standard", + "lint": "eslint --ext js,ts .", "test": "npm run test:unit && npm run test:typescript", "test:unit": "tap", "test:typescript": "tsd" @@ -27,10 +27,17 @@ }, "homepage": "https://github.com/fastify/fastify-error#readme", "devDependencies": { + "@typescript-eslint/eslint-plugin": "^5.59.2", + "@typescript-eslint/parser": "^5.0.0", "benchmark": "^2.1.4", + "eslint": "^8.40.0", + "eslint-config-standard-with-typescript": "^34.0.1", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-n": "^15.0.0", + "eslint-plugin-promise": "^6.0.0", "tap": "^16.0.0", - "ts-standard": "^12.0.2", - "tsd": "^0.28.0" + "tsd": "^0.28.0", + "typescript": "^5.0.4" }, "tsd": { "compilerOptions": { diff --git a/types/index.test-d.ts b/types/index.test-d.ts index f31aa35..f1375e0 100644 --- a/types/index.test-d.ts +++ b/types/index.test-d.ts @@ -1,4 +1,4 @@ -import createError, { FastifyError, FastifyErrorConstructor } from '..' +import createError, { type FastifyError, type FastifyErrorConstructor } from '..' import { expectType } from 'tsd' const CustomError = createError('ERROR_CODE', 'message')