Skip to content

Commit

Permalink
perf: add import warning to sentry/types (#71159)
Browse files Browse the repository at this point in the history
Adds an import warning for `sentry/types`. For example:

```
./static/app/stores/demoWalkthroughStore.tsx:4:33 lint/nursery/noRestrictedImports ━━━━━━━━━━━━━━━━━

  ⚠ Please import directly. For example: import type {Organization} from 'sentry/types/organization'

    2 │ import {createStore} from 'reflux';
    3 │
  > 4 │ import {OnboardingTaskKey} from 'sentry/types';
      │                                 ^^^^^^^^^^^^^^
    5 │
    6 │ interface DemoWalkthroughStoreDefinition extends StoreDefinition {
```
  • Loading branch information
anonrig committed May 20, 2024
1 parent 194fefd commit 92b5cd3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@
},
"nursery": {
"noDuplicateJsonKeys": "error",
"noNodejsModules": "error"
"noNodejsModules": "error",
"noRestrictedImports": {
"level": "warn",
"options": {
"paths": {
"sentry/types": "Please import directly. For example: import type {Organization} from 'sentry/types/organization'"
}
}
}
},
"performance": {
"noBarrelFile": "error"
Expand Down

0 comments on commit 92b5cd3

Please sign in to comment.