-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Move shared types into their own package #425
Conversation
Codecov Report
@@ Coverage Diff @@
## master #425 +/- ##
=========================================
- Coverage 96.23% 95.5% -0.74%
=========================================
Files 83 88 +5
Lines 4067 4093 +26
Branches 1149 1150 +1
=========================================
- Hits 3914 3909 -5
- Misses 52 82 +30
- Partials 101 102 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good! I will start using it right away on the stuff I mentioned on slack.
However, please could we call it:
@typescript-eslint/experimental-utils
I think it would be really useful for it to initially not fall under proper semver
to give us chance to "move fast and break things" for a bit. As we use it outside the monorepo we might well find things we need to tweak.
So we could have experimental
in the name and then a corresponding disclaimer in the README of the package that that is what our plan is. "Feel free to use it, but no guarantees between minor version s"
We can then promote it to be just:
@typescript-eslint/utils
In v2.0.0.
WDYT?
Sounds like a good idea! |
# Conflicts: # packages/eslint-plugin/src/rules/no-extra-parens.ts # packages/eslint-plugin/tests/RuleTester.ts # packages/eslint-plugin/typings/ts-eslint.d.ts
# Conflicts: # packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts
# Conflicts: # packages/eslint-plugin/tests/RuleTester.ts # packages/eslint-plugin/tests/rules/indent/indent.test.ts # packages/eslint-plugin/typings/ts-eslint.d.ts
Hello! 👋
I tried to do this, and it broke horribly since the utils depend on Sorta related, I got a type error in the test unless I specified the TS parser - are the plugins compatible with the standard parser, or will the type safety be wrong if another parser is used? |
@SimenB - there's no direct dependency on typescript, but there is a peer dependency: The package re-exports some things from Which causes the package to init, and it has a dependency of typescript (it's marked as a peer dep to help out the I'll put up a fix so that this doesn't happen. |
Ah, that's awesome! Thanks. Thoughts on not specifying
I'd like to run tests with the default eslint parser |
feel free to open a PR if you want! |
Hehe, fair enough! I'll see what I can do
How so? I thought to just make it |
Fixes #330, #335, #413
Happy to change the name of the package, wasn't sure what to call it.
This PR moves the ESLint override types (and the
createRule
function) out of theeslint-plugin
package and into a new package.This should make it easier for people to consume our libraries when writing rules they don't want to submit here (because they're internal rules, etc), or when they're writing an eslint plugin in typescript.