lint without any immediate changes #4942
Conversation
|
The CI failed? @antony |
The CI can't possibly pass until https://github.com/sveltejs/eslint-config exists (i.e. is published to NPM) |
|
@antony what do you think about going ahead and publishing |
|
I'm happy to, but I don't have credentials. @Conduitry are you OK with this? Build config is in place, just needs NPM_TOKEN secret added to repo secrets, then it will publish on tag. |
|
npm auth is something I'm a bit vague on. If I have 2FA enabled on my npm account, is there a way to generate a token that doesn't need a 2FA challenge to publish? And is there a way to generate a token that only permits publishing that one package? |
|
I'm not sure, but you can't transfer the token out of github, and you can't
echo the token anywhere, even forks of the repo won't have it.
As for 2FA I don't know if api tokens use it, I can have a look.
On Thu, 4 Jun 2020 at 19:15, Conduitry ***@***.***> wrote:
npm auth is something I'm a bit vague on. If I have 2FA enabled on my npm
account, is there a way to generate a token that doesn't need a 2FA
challenge to publish? And is there a way to generate a token that only
permits publishing that one package?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4942 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABVORIBZPFAYGSEOXORCSDRU7QDZANCNFSM4NPFIUTA>
.
--
…________________________________
ꜽ . antony jones . http://www.enzy.org
|
|
They've got some instructions that mention 2FA: https://docs.npmjs.com/creating-and-viewing-authentication-tokens |
|
Is there at least a way to create a token scoped to a particular org? Is my best bet to create a dummy user whose one ability is to be able to publish this package, and to create a token for it? |
|
Alternatively, do we want to just not publish to npm at all, and install from Git tags wherever we use this? We don't expect other people to be using this - there's not really a convenience reason for it to even be on npm. |
|
I'm not aware of anyway to scope tokens beyond their read/write permissions. I think the other project I work on went the dummy user route. I've been installing Sapper via git url in my project and it's annoying because it has to run |
|
Yeah I don't see install time being a problem. The reason installing Sapper from Git takes so long is that its package.json has a |
|
Yeah, I just tested locally and it's pretty painless. One thing I still wonder though is if it will be harder to keep it up-to-date. Will |
|
@Conduitry it's certainly an option yes - the only issue is that every time we added a rule we'd have to go and validate that the rule passed on every project, and update the ones which used it (which should eventually be all of them), otherwise the next person who makes a change is going to also have to lint the project according to the new rules. The rules will be in flux to begin with, so this will become a very arduous process. I can imagine that opening a PR on ten projects for every new rule is going to hinder us considerably, to the point where we'd probably avoid doing it. Having a versioned package which can be updated (turning rules to errors / adding new errors would be breaking) means that we can do this process as-and-when. So I guess I have to vote no on this one. |
|
We can still use git tags for versions, and npm has a feature that lets semver ranges work against git tags. https://docs.npmjs.com/cli/install ( |
|
Ok. I'm willing to give this a go. I will update the PR shortly. |
|
Ok - updated and installed as v0.0.1 from github, pending build passing, this should be ready to go with no further changes. |


Second attempt at a lint config, this time with zero code changes (aside from removing a dead rule).
This should give us a good baseline to build a tighter, democratic lint config from. Currently there are 723 warnings which can be fixed by auto-linting (or manual fixing of the issues) - in a separate PR.
This PR depends on the release of https://github.com/sveltejs/eslint-config to work.
Before submitting the PR, please make sure you do the following
npm run lint!)Tests
npm testoryarn test)