storybookjs / eslint-plugin-storybook

🎗Official ESLint plugin for Storybook
MIT License
245 stars 52 forks source link

feat(no-uninstalled-addons): add option for a custom package.json location #102

Closed andrelas1 closed 2 years ago

andrelas1 commented 2 years ago

Issue: #101

What Changed

Checklist

Check the ones applicable to your change:

Change Type

Indicate the type of change your pull request is:

Release Notes

feat(no-uninstalled-addons): add option for a custom package.json location (#102)

Features

The no-uninstalled-addons feature had an issue where it was assuming that the package.json of which the addon dependencies are installed was always in the root, and for some projects that was not true. For that scenario, the rule now provides an option to specify the exact path of the package.json:

module.exports = {
  rules: {
    'storybook/no-uninstalled-addons': ['error', { packageJsonLocation: './custom-folder/package.json' }],
  },
}
yannbf commented 2 years ago

Thanks a ton @andrelas1 for your efforts, this looks fantastic!

github-actions[bot] commented 2 years ago

:rocket: PR was released in v0.6.2 :rocket: