protofire / solhint

Solhint is an open-source project to provide a linting utility for Solidity code.
https://protofire.github.io/solhint/
MIT License
1.02k stars 160 forks source link

Allowing scoped package name for shareable configs #327

Open jpapini opened 2 years ago

jpapini commented 2 years ago

According to the doc, shareable configs can only be named with the solhint-config- prefix. These lines confirms this rule: https://github.com/protofire/solhint/blob/3443eee94de7dbda7ad3abd5d3540c3a96e95a0f/lib/config/config-file.js#L68-L81

But I think we should allow users to name their packages with a scope like ESLint (doc).

For example: @scope/solhint-config or @scope/solhint-config-myconfig.

This would support packages that are hosted on private repos like GitHub or Package Cloud.

johnnyshankman commented 1 year ago

Bump, this is a blocker for me atm. My private organization cannot use the extension system as we need our pkg to be private and scoped.

johnnyshankman commented 1 year ago

Updated line is now: https://github.com/protofire/solhint/blob/master/lib/config/config-file.js#L75

Eslint docs: https://eslint.org/docs/latest/extend/shareable-configs#npm-scoped-modules

dbale-altoros commented 1 year ago

@johnnyshankman @jpapini Sorry for the late response. There is a new release available and we will be updating solhint on regular basis with a dedicated team to it Thanks for posting

I'm not sure I understand this issue, can you elaborate ? Thanks!

johnnyshankman commented 1 year ago

@dbale-altoros so right here: https://github.com/protofire/solhint/blob/master/lib/config/config-file.js#L68

you expect the npm package name to start with solhint-config- which means it can never be a privately scoped package on npm, as those always begin with @somecompany/the-pkg-name

example is that i want to deploy something like @manifoldxyz/solhint-config-default for my company.

example from npm docs: https://docs.npmjs.com/creating-and-publishing-private-packages image

dbale-altoros commented 1 year ago

Ok, thanks for the clarification I understand the issue I'm not sure about the impact of changing that... we need time to review this

Thanks a lot for posting!