-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Change tools, refactor package.json
#101
Conversation
@@ -1 +0,0 @@ | |||
module.exports = require('@1stg/simple-git-hooks') |
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.
No hooks anymore?
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.
Correct. I don’t believe they are needed. Other projects maintained by unified don’t use them either.
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 don't think so, it prevents unexpected codes formatting and incorrect commit message for example.
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.
npm test
does that too- hooks can be overwritten
- hooks don’t work on PRs?
- people will make mistakes, whether hooks are enabled or not
I can imagine they are useful when building applications or large projects.
This is a tiny package that should not require a lot of maintainance.
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.
npm test does that too
It still needs to be called manually?
hooks can be overwritten
hooks don’t work on PRs?
We install hooks on prepare
hook, so if the user install dependencies, it will never be overwritten and will work on PRs.
people will make mistakes, whether hooks are enabled or not
That's why we have CI workflow.
This is a tiny package that should not require a lot of maintainance.
I'd like to be consistent for any scale of projects.
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.
All unified projects are already consistent. I don’t believe hooks will make them more consistent.
If you feel strongly about this, I am open to having it in this project.
I’d be against adding it to every unified project. I don’t see the value in it.
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’d be against adding it to every unified project. I don’t see the value in it.
Thanks, I'm not asking to use them in all unified projects.
@@ -1 +0,0 @@ | |||
module.exports = require('@1stg/lint-staged/tsc') |
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.
No lint-staged anymore?
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.
Correct. I don’t believe it is needed. Other projects maintained by unified don’t use them either.
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.
As above.
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.
As above.
"type-coverage": "^2.0.0", | ||
"typescript": "^4.0.0", | ||
"unified": "^10.0.0", | ||
"xo": "^0.52.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.
I don't like xo, really, and it does not check .json
, .md
and yml
, etc. files at all.
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.
It enforces a strict, useful, code-style. It prevents:
a) bugs,
b) having to discuss code style
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.
My current @1stg/eslint-config
already does this, and check .json
, .md
, .yml
, etc. at the same time.
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.
Your personal code style is not consistent with the rest of the projects maintained by us.
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.
Your personal code style is not consistent with the rest of the projects maintained by us.
xo
is chosen by you personally as I mentioned at #99
And also
But I'm also totally fine with a new
eslint-config-unifiedjs
.
ESLint/stylelint/prettier are the standard way and very flexible while xo is definitely not.
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.
ESLint/stylelint/prettier are the standard way and very flexible while xo is definitely not.
ESLint is used in xo
. xo
provides more things than ESLint does.
Most notably, it provides not having to discuss this and getting on with fixing bugs.
The goal of xo
is not to be as flexible as eslint
.
xo
is more standard than your personal code style.
Murderlon addressed this in #99 (comment).
But I'm also totally fine with a new eslint-config-unifiedjs.
Feel free to discuss this somewhere where everyone can participate about how we should lint 300 projects.
I am personally probably against it. xo
already has good rules. xo
takes away having to discuss these things.
xo is chosen by you personally as I mentioned at #99
Which sentence are you talking about?
It isn’t about personal preference of code style. That’s the whole point. It is about consistency and not having to discuss it
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 problem is xo
doesn't handle a lot of other files like .json
, .yml
, etc. by https://github.com/ota-meshi/eslint-plugin-json-schema-validator for example. I'd like to have eslint-config-unifiedjs
including eslint-config-xo
inside with addition overrides
for other files.
xo
is doing well for .js
/.ts
, but we have other source files. So it does not provide more things than ESLint + prettier. All its values to me maybe eslint-config-xo
.
Again, xo
is not the standard.
@@ -0,0 +1,2 @@ | |||
*.json |
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 don't get it.
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.
What do you not get?
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.
Why they're ignored by prettier.
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 am open to changing it.
According to #99 (comment), this PR is unnecessary except changing package manager, but npm is just junk in my case. I refuse if you want to change all tools. Because in the meantime, I could be the only maintainer of this repository. |
Besides, I don't know how do you write the changelog file. (A CHANGELOG.md file is much easier to read than GitHub releases IMO.) |
That list is:
I don’t believe
I strongly hope that you reconsider, and that you embrace the consistency of other unified projects. Putting this project inside one of our orgs means other people will maintain it too.
I do not understand what you mean.
With Git. And I write changelog entries.
GitHub releases has many benefits: |
I agreed to align with #99 (comment)
I tried npm at #100, but I couldn't understand and make it work: https://github.com/remarkjs/remark-preset-prettier/runs/8034206256?check_suite_focus=true#step:5:32, the error message is meaningless to me. 🤣
Like My point is, when no other contributors are interested, then I'd like to keep it as-is. If more contributors are coming, I'll adapt unified's common style.
But a single CHANGELOG.md has other benefits at the same time, so in my projects, I always have them both. |
My personal preference tends to be somewhere between what @wooorm’s and @JounQin’s preferences. I agree with @wooorm though that consistency across unified projects is a good idea. I can also see why @JounQin doesn’t really like all his preferred setup being removed. I’m thinking perhaps this project is best maintained outside of the remarkjs organization. It’s ok for people to maintain unifiedjs related projects outside of the official organizations. On the other hand I also don’t mind of a project inside a unifiedjs organization follows the rules of their sole maintainer. |
I saw that!
That is why I prefer cutting down on tools. Not using a lot of (dev)dependencies.
I hope to change that. I want to help maintain this project.
It is also the other way around: make this project consistent with the rest and maintain everything together.
I believe this to be the reason to move projects into the organization: to maintain things together.
That project is a different because:
|
I disagree on this point as there should not be sole maintainers. |
But
Not sure why
I also tried
I have these tools for the same purpose. And they work very well in my other projects with
Sorry, but I disagree with this.
That's great, then I'm open to migrate to npm, but for hooks, I still want to keep it as-is because I often forget to run
Sure, I'm trying. ❤️
I'm trying to maintain things together, for sure. Otherwise, I won't move this project to this org. And that's what I mean if I refuse to change all tools then I'd like to move this project to @un-ts again. I of course want to find a balance to maintain everything together, but not in a way I change everything.
It's always great to have collaborators together! The following has not been resolved:
But a single CHANGELOG.md has other benefits at the same time, so in my projects, I always have them both. |
I do not believe npm to be junk.
This number is with xo. 300 folders in Having dependencies is fine. And having a lot of small dependencies is okay. But this was a lot. And slow.
You can also use pnpm and yarn to install dependencies in this project after this PR.
See #101 (comment).
I don’t understand.
I personally don’t see the value of maintaining both. And I prefer releases over a file. |
The problem is that I don't want to install all peer dependencies manually so I have all peer dependencies as dpendencies in my
ESLint/prettier themselves are well-tested, https://github.com/xojs/eslint-config-xo/blob/main/test/test.js
And I didn't see it's slower than
How are you marking sure? I don't see any test cases for other package managers.
I'm getting older and older, can't remember such tiny things. And we have tools to prevent, why not?
I am, but don't see the point to change all tools that affect me personally a lot like @remcohaszing's comments above. 😅
Thanks, I'd like to have CHANGELOG.md at the same time. Releases can have paginations, while a CHANGELOG.md can be viewed easier. |
Peer dependencies have been causing problems for years now.
I believe this to be a problem with using unmaintained or out of date dependencies, instead of a problem with npm.
I see
This is a false comparison. Your style presets are used by just you: https://github.com/1stG/configs/network/dependents.
Ignoring package locks, install time of this repo was very slow. It is now fast.
Please try it out! It works because:
There are tools for everything. This repo does not use every tool.
And I agree with Remco:
|
I don't want to argument these meaningless things anymore. 😅
OK, let's move this repository back to @un-ts, I'm sorry. |
I am not a maintainer of |
Thanks! @wooorm That's my bad for not raising an issue for discussion first. |
no problem! :) |
Initial checklist
Description of changes
This commit changes most tools to use the ones used in other unified packages.
Particularly, it uses prettier with xo and slightly different styles. It also uses
npm
.This commit focusses on
package.json
. Future commits/PRs will introduce changes to other files.