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

feat: require the package with fullname #515

Merged

Conversation

zouguangxian
Copy link
Contributor

  • supports require.resolve(package) in extends field

supports require.resolve(package) in extends field
@zouguangxian zouguangxian changed the title feat: support require the package with fullname feat: require the package with fullname Oct 24, 2023
@dbale-altoros
Copy link
Collaborator

@zouguangxian thanks a lot for your PR

Can you explain what this PR does and how is this useful ?
Is this testeable ?
Notice it is not passing the github actions flow

@dbale-altoros dbale-altoros self-requested a review October 26, 2023 13:14
@dbale-altoros dbale-altoros added the awaiting user feedback awaiting user feedback label Oct 26, 2023
@zouguangxian
Copy link
Contributor Author

@zouguangxian thanks a lot for your PR

Can you explain what this PR does and how is this useful ? Is this testeable ? Notice it is not passing the github actions flow

In a monorepo, there will be a common practice of putting the shareable configuration in a package, e.g. @organize/solhint-config, then using this package in the solhint.config.js of individual package:

  {
    "extends": "@organize/solhint-config",
    "plugins": [],
    "rules": {
    }
  }

but it requires the package name should be like 'solhint:recommended' or 'solhint-config-${path}' in the configGetter function, so that '@organize/solhint-config' can not be supported.

this patch will allow the developer to use the package in this way:

  {
    "extends": require.resolve("@organize/solhint-config"),
    "plugins": [],
    "rules": {
    }
  }

@dbale-altoros
Copy link
Collaborator

@zouguangxian thanks for the clarification
We need at least for the PR to pass the e2e tests and also don't have errors on it
Please whenever you have time, please correct it, add tests if possible and we can review it

image

Thanks a lot for your contribution

We are planning a new version pretty soon... stay tuned...

Join our discord:
https://discord.gg/4TYGq3zpjs

@zouguangxian
Copy link
Contributor Author

fixed, please review again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting user feedback awaiting user feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants