Shareable ESLint config for AIO libs
Any update to a dependency/peer dependency must be a major version update, if not a lot of tests will break during npm install because of a version mismatch. Use of semver is warranted here so users can choose when to update their config instead of it being forced on them. The 2.x update broke a lot of tests.
To install, use npm 5 or greater:
npm install --save-dev @adobe/eslint-config-aio-lib-config
npx install-peerdeps --dev @adobe/eslint-config-aio-lib-configAdd this to your .eslintrc.json file in the root of your module:
{
"extends": "@adobe/eslint-config-aio-lib-config"
}The node/no-unpublished-require rule prevents using a module when it hasn't been added in the dependencies key in package.json.
This setting excludes this rule for test folders, where the module may have been added in the devDependencies key in package.json only.
Add this setting to a .eslintrc.json file in the affected folder:
{
"rules": {
"node/no-unpublished-require": 0
}
}