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

Create eslint-plugin-nodejs-internal repo #649

Closed
3 tasks
nschonni opened this issue Dec 23, 2021 · 21 comments
Closed
3 tasks

Create eslint-plugin-nodejs-internal repo #649

nschonni opened this issue Dec 23, 2021 · 21 comments

Comments

@nschonni
Copy link
Member

nschonni commented Dec 23, 2021

Splitting off from previous discussion in #55

This would be a repo to be published as a NPM package that could be used for node core and repos want to follow those rules already set there. Suggesting eslint-plugin-nodejs-internal since there is already a eslint-plugin-node used, so it would be less likely to be confused

@nschonni
Copy link
Member Author

//cc @nodejs/linting

@mhdawson
Copy link
Member

+1 from me

@ljharb
Copy link
Member

ljharb commented Dec 23, 2021

Could it be named with "internal" or something, so people don't get confused and think it's for all node-based projects?

@nschonni
Copy link
Member Author

@ljharb like eslint-config-nodejs-internal? I don't know what the restrictions are on word-breaks for config names

@ljharb
Copy link
Member

ljharb commented Dec 23, 2021

There are no restrictions, and yes, that sounds great to me.

It could also go under a scope, if one is available, which would make it even less attractive for external consumption.

@nschonni nschonni changed the title Create eslint-config-nodejs repo Create eslint-config-nodejs-internal repo Dec 23, 2021
@nschonni
Copy link
Member Author

OK, no issue for me, so I renamed the issue

@Trott
Copy link
Member

Trott commented Dec 23, 2021

My understanding of shareable configs vs. plugins is not great, so apologies for this, but since I'm guessing I'm not the only one who will be wondering:

Is the idea here that most repos that used this would install both the shareable config and the plugin? The plugin would be a peer dependency of the shareable config? Or would one make the other not necessary as it would be a superset?

@nschonni
Copy link
Member Author

Sorry, the plugin https://www.npmjs.com/package/eslint-plugin-node isn't related to the rules in the core repo, but is used by a bunch of other common shareable configs. No relation to setting up a shareable config https://eslint.org/docs/developer-guide/shareable-configs

@ljharb
Copy link
Member

ljharb commented Dec 24, 2021

A plugin can be a shareable config, but can also provide its own rules, like eslint-plugin-import.

A shareable config can only provide a config, like eslint-config-airbnb.

@nschonni
Copy link
Member Author

OK, since there are some custom rules in core, should it be a plugin then?

@ljharb
Copy link
Member

ljharb commented Dec 24, 2021

Yep, given that, it seems like a plugin is the right approach.

@Trott
Copy link
Member

Trott commented Dec 24, 2021

Oh, whoops, eslint-plugin-node isn't ours. I somehow got confused and was thinking about remark-preset-lint-node, which isn't ESLint or a plugin, but there you go. Never mind my question, although I guess I'm glad it surfaced the plugin vs. shared config question.

@ljharb
Copy link
Member

ljharb commented Dec 24, 2021

eslint-plugin-node-internal seems like a reasonable choice - altho if node owns any usernames, a scoped package would be better.

@nschonni nschonni changed the title Create eslint-config-nodejs-internal repo Create eslint-plugin-nodejs-internal repo Dec 24, 2021
@nschonni
Copy link
Member Author

OK, updated title again 😄

@bnb
Copy link
Contributor

bnb commented Dec 29, 2021

+1, happy to help with setup if that's something that would be helpful.

@nschonni
Copy link
Member Author

@bnb sure, if we have enough +1s now and you have the access that would be great!
If you want to seed it with the license and other files, we can start copying over content through PRs afterwards.
I think @nodejs/linting should probably be either admin or maintainer access on the repo

@targos
Copy link
Member

targos commented Jan 3, 2022

Is there any repository that would like to follow the same rules as nodejs/node? I find most them very specific to core development and also related to the history of the project. I would personally never want to use the same rule set anywhere else ^^

@ljharb
Copy link
Member

ljharb commented Jan 3, 2022

@targos the intention as i understood it was that it would only be used by projects seeking to be upstreamed into node core itself.

I very much agree that no other project would want to use node core's idiosyncratic eslint config :-)

@Trott
Copy link
Member

Trott commented Jan 4, 2022

I've created the repository at https://github.com/nodejs/eslint-plugin-nodejs-internal/ and given write access to @nodejs/linters, which includes @nschonni.

@Trott Trott closed this as completed Jan 4, 2022
@Trott
Copy link
Member

Trott commented Jan 4, 2022

Re-opening because there's a checklist in this issue, and I guess we should get all those done before closing.

@Trott Trott reopened this Jan 4, 2022
@nschonni
Copy link
Member Author

nschonni commented Jan 4, 2022

I just copied those issues over to the repo to track there, so I'll close this one.
Repo still needs license and other boilerplate files too

@nschonni nschonni closed this as completed Jan 4, 2022
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

No branches or pull requests

6 participants