Skip to content

Add dtslint/dts-critic to the monorepo - #353

Merged
Nathan Shively-Sanders (sandersn) merged 468 commits into
masterfrom
add-dtslint/critic
Dec 1, 2021
Merged

Nathan Shively-Sanders (sandersn) merged 468 commits into
masterfrom
add-dtslint/critic

Conversation

@sandersn

@sandersn Nathan Shively-Sanders (sandersn) commented Nov 29, 2021 •

Copy link
Copy Markdown
Member
  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.

* 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.
Comment thread .eslintrc.json Resolved
Comment thread packages/dtslint/package.json Resolved
Comment thread packages/dtslint/package.json Resolved
Comment thread packages/dtslint/package.json Outdated
"watch": "tsc --watch",
"build": "tsc",
"lint": "eslint --ext ts src",
"test": "npm run build && node test/test.js",

Copy link
Copy Markdown
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
Copy Markdown
Member

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
Copy Markdown
Member Author

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

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.