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

Replace 3rd-party type definitions #4857

Merged
merged 2 commits into from Jul 12, 2020
Merged

Replace 3rd-party type definitions #4857

merged 2 commits into from Jul 12, 2020

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Jul 8, 2020

Which issue, if any, is this issue related to?

Related to #4399

Is there anything in the PR that needs further explanation?

This change replaces 3rd-party type definitions under the types/ directory with the following @types/* npm packages.

Note that this change does not replace all type definitions under types/.
We should address the remaining types via other pull requests.

This change replaces 3rd-party type definitions under the `types/` directory
with the following `@types/*` npm packages.

- [@types/balanced-match](https://www.npmjs.com/package/@types/balanced-match)
- [@types/imurmurhash](https://www.npmjs.com/package/@types/imurmurhash)
- [@types/postcss-safe-parser](https://www.npmjs.com/package/@types/postcss-safe-parser)
- [@types/style-search](https://www.npmjs.com/package/@types/style-search)
- [@types/svg-tags](https://www.npmjs.com/package/@types/svg-tags)
- [@types/write-file-atomic](https://www.npmjs.com/package/@types/write-file-atomic)

Note that this change does **not** replace all type definitions under `types/`.
We should address the remaining types via other pull requests.

Related to #4399
throw new Error(`No parens match: "${source}"`);
}

const closingParenIndex = parensMatch.end + openingParenIndex;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[note] Unless checking !parensMatch, the following type error occurs:

lib/utils/blurFunctionArguments.js:42:41 - error TS2339: Property 'end' does not exist on type 'void | Output'.
  Property 'end' does not exist on type 'void'.

42  	const closingParenIndex = parensMatch.end + openingParenIndex;
    	                                      ~~~

@ybiquitous ybiquitous marked this pull request as ready for review July 8, 2020 15:19
Copy link
Member

@m-allanson m-allanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff, LGTM 👍

@ybiquitous
Copy link
Member Author

@m-allanson Thank you for the review!

We can replace it with also @types/file-entry-cache via 5311a55, so I would appreciate it if you could review this again. ☺️

Copy link
Member

@mattxwang mattxwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to standardize our types with the official ones! LGTM 👍

@jeddy3 jeddy3 merged commit 909063d into stylelint:master Jul 12, 2020
@ybiquitous ybiquitous deleted the replace-3rd-party-types branch July 12, 2020 14:59
m-allanson added a commit that referenced this pull request Jul 23, 2020
* master:
  Update CHANGELOG.md
  Fix false negatives for where, is, nth-child and nth-last-child in selector-max-* (except selector-max-type) (#4842)
  Bump @types/lodash from 4.14.155 to 4.14.157 (#4869)
  Remove `postcss-reporter` package (#4858)
  Bump lodash from 4.17.15 to 4.17.19 (#4864)
  Replace 3rd-party type definitions (#4857)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants