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

Add dtslint/dts-critic to the monorepo #353

Merged
merged 468 commits into from
Dec 1, 2021
Merged

Add dtslint/dts-critic to the monorepo #353

merged 468 commits into from
Dec 1, 2021

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 <[email protected]>
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
packages/dts-critic/.github/workflows/nodejs.yml Outdated Show resolved Hide resolved
.eslintrc.json Show resolved Hide resolved
packages/dtslint/package.json Outdated Show resolved Hide resolved
packages/dtslint/package.json Outdated Show resolved Hide resolved
@@ -17,14 +17,13 @@
],
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/dtslint.git"
"url": "https://github.com/microsoft/DefinitelyTyped-tools.git"
},
"scripts": {
"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.