Skip to content

Commit

Permalink
Update eslint rule restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
rajsite committed May 22, 2024
1 parent f20655e commit 813e0e2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"validate:test:sequential": "npm run test --workspaces --if-present",
"validate:lint-concurrent:nimble-components": "npm run lint-concurrent -w packages/nimble-components",
"validate:test-concurrent:nimble-components": "npm run test-concurrent -w packages/nimble-components",
"storybook": "concurrently -n nimble,spright,storybook \"npm run build-components:watch -w @ni/nimble-components\" \"npm run build-components:watch -w @ni/spright-components\" \"npm run start -w @ni-private/storybook\""
"storybook": "npm run start -w @ni-private/storybook"
},
"repository": {
"type": "git",
Expand Down
16 changes: 15 additions & 1 deletion packages/storybook/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,21 @@ module.exports = {
'error',
{ devDependencies: true }
],
'import/no-relative-packages': 'off'
// This rule is disabled in order to allow linking directly to nimble-components and spright-components source
// Other files in the repo should NOT directly link to source and should resolve with the package identifier instead
'import/no-relative-packages': 'off',
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['@ni/nimble-components/*', '@ni/spright-components/*'],
message:
'For storybook, link directly to the nimble-components or spright-components source path in the monorepo instead.'
},
]
}
],
}
}
]
Expand Down

0 comments on commit 813e0e2

Please sign in to comment.