Skip to content

Add dtslint/dts-critic to the monorepo#353

Merged
sandersn merged 468 commits intomasterfrom
add-dtslint/critic
Dec 1, 2021
Merged

Add dtslint/dts-critic to the monorepo#353
sandersn merged 468 commits intomasterfrom
add-dtslint/critic

Conversation

@sandersn
Copy link
Member

@sandersn sandersn commented Nov 29, 2021

  1. For both dtslint and dts-critic, lerna import --flatten
  2. Update package.json names to add @definitelytyped/
  3. Switch from depending on tsutils to TS internals for detecting JSDoc -- removes a conflicting dependency on two versions of typescript.
  4. Remove redundant lint dependencies and update code to match new lint rules. Also make the naming-convention rule smarter.
  5. Update README with links to original repos.

The last four commits are the only new ones.

sandersn and others added 30 commits November 29, 2021 12:08
* Fix banned words check and update dts-critic

1. Update to dts-critic 1.2, which no longer requires project urls to
include the homepage url specified on npm.
2. Check for banned words for all packages, not just those complex
enough to have a package.json. The location of the check was wrong.

* Remove handling for project url mismatch from npm-naming

* 0.7.7: Fix banned-words check and update dts-critic
previously it was any substring.
I didn't add a test because tslint doesn't support baselines with
newlines in them. It works locally, though.
Not all type definitions use `React.createElement` as the jsx pragma. I bumped into this issue when updating `storybook__preact` types as per DefinitelyTyped/DefinitelyTyped#37275

By adding the compiler option `jsxFactory` other pragmas can be used in type definitions
* Add documentation about localTs and expectOnly option

* Update `--expectOnly` description

According to microsoft/dtslint#244 (comment)

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Thanks to @IvonGoncharov and @lukyth, respectively.
This is important for users that always use --localTs, which means that
they never run the code that creates the cache directory as part of
installing old versions of typescript.
@sandersn sandersn marked this pull request as ready for review November 30, 2021 18:50
"watch": "tsc --watch",
"build": "tsc",
"lint": "eslint --ext ts src",
"test": "npm run build && node test/test.js",
Copy link
Member

Choose a reason for hiding this comment

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

Trailing comma killed it

Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

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

I'm excited this is done 🌟 Thanks!

@sandersn
Copy link
Member Author

sandersn commented Dec 1, 2021

I'll ship this tomorrow morning when I can watch for problems.

@sandersn sandersn merged commit dae5c76 into master Dec 1, 2021
@sandersn sandersn deleted the add-dtslint/critic branch December 1, 2021 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.