Skip to content

Commit

Permalink
feat(esm): migrate to native esm (#53)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: typed-inject is now a pure ESM. Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c)
  • Loading branch information
nicojs authored May 3, 2022
1 parent aba0239 commit b8efb26
Show file tree
Hide file tree
Showing 30 changed files with 349 additions and 1,498 deletions.
62 changes: 62 additions & 0 deletions .eslintrc
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."
}
}
}
]
}
}
70 changes: 0 additions & 70 deletions .eslintrc.js

This file was deleted.

Loading

0 comments on commit b8efb26

Please sign in to comment.