-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
build: overhaul tooling with create-typescript-app@1 #142
build: overhaul tooling with create-typescript-app@1 #142
Conversation
.all-contributorsrc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list was generated by https://github.com/JoshuaKGoldberg/all-contributors-for-repository. I then added a few contributions under omnidan
that weren't detected automatically.
Is this missing anybody and/or any contributions?
@@ -0,0 +1,149 @@ | |||
/** @type {import("@types/eslint").Linter.Config} */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick links & descriptions for the plugins this config loads in:
@typescript-eslint/eslint-plugin
: rules that validate TypeScript syntax and/or are more powerful because of TypeScript - configured with the strictest typescript-eslint configs 🤘eslint-plugin-eslint-comments
: verifies good usage of ESLint directive comments (e.g.// eslint-disable-line
)eslint-plugin-deprecation
: reports on usage of anything marked as@deprecated
in a JSDoc tageslint-plugin-jsonc
: standardizes styling & finds some bad practices in json(c) fileseslint-plugin-jsdoc
: validates properly formatted JSDoc comments (/** ... */
) and their tags (@param
, etc.)eslint-plugin-markdown
: lints embedded```
code blocks in Markdown files 1eslint-plugin-n
: Node-specific rules (a fork ofeslint-plugin-node
as that original package seems to be not maintained anymore)eslint-plugin-no-only-tests
: stops.only
& similar from being checked in accidentallyeslint-plugin-perfectionist
: sorts imports, properties, etc. - with auto-fixers for all rules, thank goodness!eslint-plugin-regexp
: helps find mishaps with regular expressionseslint-plugin-vitest
: Vitest-specific rules, akin toeslint-plugin-jest
Each of these can totally be reconfigured/removed. I just like all of them and would suggest each in general. 😄
Footnotes
-
Not to be confused with Markdownlint, which is a separate linter specifically for Markdown files. I haven't investigated using
eslint-plugin-md(x)
yet (https://github.com/JoshuaKGoldberg/create-typescript-app/issues/567). ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that some of the links in this and other docs files rely on specific issue label names, such as status: accepting prs
.
.github/renovate.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope you enjoy GitHub notifications 😄... note that this uses stabilityDays
so that PRs for new packages will wait a few days. That's a good security practice to let the community vet potentially malicious new releases.
"dependencies": { | ||
"@sindresorhus/is": "^3.1.2", | ||
"@sindresorhus/is": "^6.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old version of /is
was presenting issues with imports...
src/emojify.ts:25:18 - error TS2339: Property 'undefined' does not exist on type 'typeof import("/Users/josh/repos/node-emoji/node_modules/.pnpm/@sindresorhus+is@3.1.2/node_modules/@sindresorhus/is/dist/index")'.
25 assert.any([is.undefined, is.function], fallbackFunction)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks really good - thanks a lot of standardizing the repo! 💖 I do not have any strong opinions on which plugins to use, and the ones you suggested seem fine to me. I also think that adding prettier, eslint, husky/lint-staged are a really good idea to keep the quality and consistency of the project. I also love that we are including all contributors automatically now! 💞 I only have a small comment regarding the emoji to be used in the description. The rest is fine for me. I can set up the required tokens (or give you access so that you can do it too?).
## Emojis & Appreciation | ||
|
||
If you made it all the way to the end, bravo dear user, we love you. | ||
Please include your favorite emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this idea
package.json
Outdated
"type": "git", | ||
"url": "https://github.com/omnidan/node-emoji.git" | ||
}, | ||
"description": "Friendly emoji lookups and parsing utilities for Node.js. 😏", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small thing but maybe we can use the 💖 emoji here, I feel it is more friendly and universal than 😏 which could be misunderstood.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it! 💖 is my favorite one.
Note that until we set up the tokens then 1-2 jobs on |
This overhaul causes the following build error for our nuxt2 app:
|
@Revadike could you please file a new issue? It's hard to help with just a copy & paste of build output. My guess is you're on an old version of Node that doesn't support the nullish coalescing operator. Per MDN support was added in Node 14. |
Brings on a ton of tooling - all the various repository things I've found to be useful. They can all be ripped out if you don't want their overhead in this repo. The major starting areas are:
Most of these changes were generated with create-typescript-app's migration mode:
Note that I ran with
--skip-github-api
. That means repository settings weren't populated with the GitHub API. They'll need to be done manually (or with another call tonpx create-typescript-app
) upon merge.Fixes #73. Fixes #135.