diff --git a/.eslintrc.json b/.eslintrc.json index f838bed..76c5641 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -3,7 +3,8 @@ "node": true }, "extends": [ - "airbnb-typescript" + "airbnb-base", + "airbnb-typescript/base" ], "globals": { "Atomics": "readonly", @@ -11,7 +12,6 @@ }, "parser": "@typescript-eslint/parser", "parserOptions": { - "ecmaVersion": 2020, "project": "./tsconfig.json" }, "plugins": [ diff --git a/.vscode/settings.json b/.vscode/settings.json index 1d9bb9b..6cae64c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -34,6 +34,10 @@ "editor.defaultFormatter": "vscode.json-language-features", "editor.formatOnSave": true }, + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features", + "editor.formatOnSave": true + }, "cSpell.words": [ "D’Xx", "O’Donnel", diff --git a/index.ts b/index.ts index 159a578..8e95da2 100644 --- a/index.ts +++ b/index.ts @@ -56,7 +56,7 @@ export const coerce: Coerce = (...coercers: any[]) => try { return coercers.reduce(pipe, value); } catch (error) { - return failure(error, otherwise); + return failure(error as Error, otherwise); } }; diff --git a/package.json b/package.json index 1b47c66..1e16f97 100644 --- a/package.json +++ b/package.json @@ -30,14 +30,15 @@ }, "devDependencies": { "@types/node": "^16.4.12", - "@typescript-eslint/eslint-plugin": "^4.29.1", - "@typescript-eslint/parser": "^4.29.1", + "@typescript-eslint/eslint-plugin": "^4.29.3", + "@typescript-eslint/parser": "^4.29.3", "ava": "^3.15.0", "c8": "^7.8.0", "codecov": "^3.8.3", "del-cli": "^4.0.1", "eslint": "^7.32.0", - "eslint-config-airbnb-typescript": "^12.3.1", + "eslint-config-airbnb-base": "^14.2.1", + "eslint-config-airbnb-typescript": "^14.0.0", "eslint-plugin-import": "^2.24.0", "np": "^7.5.0", "prettier": "^2.3.2",