Skip to content

Commit

Permalink
docs: Add comment explaining flatmap logic in eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
rifont committed Sep 30, 2024
1 parent 4bf4714 commit 44b35a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const noRestrictedImportsMultiLevelNovuPattern = {
group: [
'@novu/*/**/*',
// These packages have legitimate exports 1 path part below the root level
// This flatmap logic ignores the path 1 below the root level and prevents deeper imports.

Check warning on line 46 in eslint.config.mjs

View workflow job for this annotation

GitHub Actions / Spell check

Unknown word (flatmap)
...['framework', 'js', 'novui'].flatMap((pkg) => [`!@novu/${pkg}/**/*`, `@novu/${pkg}/*/**/*`]),
],
message: "Please import only from the root package entry point. For example, use 'import { Client } from '@novu/node';' instead of 'import { Client } from '@novu/node/src';'",
Expand Down

0 comments on commit 44b35a4

Please sign in to comment.