Skip to content

Commit 3144eac

Browse files
authored
[PAY-3424] Restrict imports from SDK 'dist' folder in client code (#10043)
1 parent 8aa7242 commit 3144eac

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

packages/common/.eslintrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ module.exports = {
99
message:
1010
'Do NOT use `Promise.allSettled` as it will be undefined. Use `allSettled` from `utils/allSettled.ts` instead.'
1111
}
12+
],
13+
'no-restricted-imports': [
14+
'error',
15+
{
16+
patterns: [
17+
{
18+
group: ['@audius/sdk/dist*'],
19+
message:
20+
'Do not import from the SDK dist folder. If needed, update SDK to export the item you wish to use.'
21+
}
22+
]
23+
}
1224
]
1325
}
1426
}

packages/mobile/.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ module.exports = {
5757
message:
5858
'Use @audius/harmony-native instead. If needing to access an @audius/harmony export, reference it directly with @audius/harmony/src/..'
5959
}
60+
],
61+
patterns: [
62+
{
63+
group: ['@audius/sdk/dist*'],
64+
message:
65+
'Do not import from the SDK dist folder. If needed, update SDK to export the item you wish to use.'
66+
}
6067
]
6168
}
6269
]

packages/web/.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ module.exports = {
4242
{
4343
group: ['react-spring*'],
4444
message: 'Please use @react-spring/web instead'
45+
},
46+
{
47+
group: ['@audius/sdk/dist*'],
48+
message:
49+
'Do not import from the SDK dist folder. If needed, update SDK to export the item you wish to use.'
4550
}
4651
]
4752
}

0 commit comments

Comments
 (0)