-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(esm): migrate to native esm (#53)
BREAKING CHANGE: typed-inject is now a pure ESM. Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)
- Loading branch information
Showing
30 changed files
with
349 additions
and
1,498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"parserOptions": { | ||
"project": ["./src/tsconfig.json", "./test/tsconfig.json"] | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"prettier" | ||
], | ||
"overrides": [ | ||
{ | ||
"files": ["test/**/*.ts"], | ||
"env": { | ||
"node": true | ||
} | ||
} | ||
], | ||
"rules": { | ||
"prettier/prettier": ["error"], | ||
"@typescript-eslint/explicit-function-return-type": ["off"], | ||
"@typescript-eslint/no-explicit-any": ["off"], | ||
"@typescript-eslint/no-use-before-define": ["off"], | ||
"@typescript-eslint/restrict-template-expressions": ["off"], | ||
"@typescript-eslint/ban-types": [ | ||
"error", | ||
{ | ||
"extendDefaults": false, | ||
"types": { | ||
"String": { | ||
"message": "Use string instead", | ||
"fixWith": "string" | ||
}, | ||
"Boolean": { | ||
"message": "Use boolean instead", | ||
"fixWith": "boolean" | ||
}, | ||
"Number": { | ||
"message": "Use number instead", | ||
"fixWith": "number" | ||
}, | ||
"Symbol": { | ||
"message": "Use symbol instead", | ||
"fixWith": "symbol" | ||
}, | ||
|
||
// object typing | ||
"Object": { | ||
"message": "The `Object` type actually means \"any non-nullish value\", so it is marginally better than `unknown`.\n- If you want a type meaning \"any object\", you probably want `Record<string, unknown>` instead.\n- If you want a type meaning \"any value\", you probably want `unknown` instead." | ||
}, | ||
"object": { | ||
"message": "The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).\nConsider using `Record<string, unknown>` instead, as it allows you to more easily inspect and use the keys." | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.