Skip to content
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

Merged
merged 17 commits into from May 10, 2019

Conversation

Projects
None yet
4 participants
@bradzacher
Copy link
Member

commented Apr 11, 2019

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 the eslint-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.

bradzacher added some commits Mar 27, 2019

@bradzacher bradzacher requested a review from typescript-eslint/core-team Apr 11, 2019

@codecov

This comment has been minimized.

Copy link

commented Apr 12, 2019

Codecov Report

Merging #425 into master will decrease coverage by 0.73%.
The diff coverage is 68.88%.

@@            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
Impacted Files Coverage Δ
...ackages/eslint-plugin/src/rules/prefer-includes.ts 100% <ø> (ø) ⬆️
...slint-plugin/src/rules/no-unnecessary-qualifier.ts 96.07% <ø> (ø) ⬆️
packages/eslint-plugin/src/rules/array-type.ts 91.35% <ø> (ø) ⬆️
packages/eslint-plugin/src/rules/member-naming.ts 100% <ø> (ø) ⬆️
...plugin/src/rules/prefer-string-starts-ends-with.ts 100% <ø> (ø) ⬆️
...s/experimental-utils/src/eslint-utils/deepMerge.ts 88.23% <ø> (ø)
packages/typescript-estree/src/ast-converter.ts 100% <ø> (ø) ⬆️
packages/parser/src/scope/scopes.ts 100% <ø> (ø) ⬆️
...xperimental-utils/src/eslint-utils/applyDefault.ts 83.33% <ø> (ø)
...slint-plugin/src/rules/prefer-namespace-keyword.ts 100% <ø> (ø) ⬆️
... and 68 more

@j-f1 j-f1 requested a review from typescript-eslint/core-team Apr 12, 2019

@bradzacher bradzacher marked this pull request as ready for review Apr 27, 2019

bradzacher added some commits May 7, 2019

@bradzacher bradzacher requested review from JamesHenry and removed request for typescript-eslint/core-team May 7, 2019

bradzacher added some commits May 8, 2019

@JamesHenry
Copy link
Member

left a comment

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?

@bradzacher

This comment has been minimized.

Copy link
Member Author

commented May 9, 2019

@typescript-eslint/experimental-utils

Sounds like a good idea!
I'll make the change now :)

@bradzacher bradzacher referenced this pull request May 9, 2019

Open

2.0.0 Breaking Changes #501

0 of 6 tasks complete

bradzacher added some commits May 9, 2019

Merge branch 'master' into utils-pkg
# Conflicts:
#	packages/eslint-plugin/src/rules/no-extra-parens.ts
#	packages/eslint-plugin/tests/RuleTester.ts
#	packages/eslint-plugin/typings/ts-eslint.d.ts
Merge branch 'master' into utils-pkg
# Conflicts:
#	packages/eslint-plugin/src/rules/no-unnecessary-type-assertion.ts
Merge branch 'master' into utils-pkg
# Conflicts:
#	packages/eslint-plugin/tests/RuleTester.ts
#	packages/eslint-plugin/tests/rules/indent/indent.test.ts
#	packages/eslint-plugin/typings/ts-eslint.d.ts

@bradzacher bradzacher merged commit a7a03ce into master May 10, 2019

7 of 8 checks passed

codecov/patch 68.88% of diff hit (target 90%)
Details
Semantic Pull Request ready to be squashed
Details
codecov/project 95.5% (-0.74%) compared to 6eb97d4
Details
typescript-eslint.typescript-eslint Build #20190509.18 succeeded
Details
typescript-eslint.typescript-eslint (Primary code validation and tests) Primary code validation and tests succeeded
Details
typescript-eslint.typescript-eslint (Run unit tests on other Node.js versions node_10_x) Run unit tests on other Node.js versions node_10_x succeeded
Details
typescript-eslint.typescript-eslint (Run unit tests on other Node.js versions node_6_x) Run unit tests on other Node.js versions node_6_x succeeded
Details
typescript-eslint.typescript-eslint (Run unit tests on other Node.js versions node_8_x) Run unit tests on other Node.js versions node_8_x succeeded
Details

@bradzacher bradzacher deleted the utils-pkg branch May 10, 2019

@SimenB SimenB referenced this pull request May 10, 2019

Open

Rewrite in TypeScript #256

2 of 31 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.