Skip to content

Commit

Permalink
Add linter rule to restricted imports into migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
CeEv committed Jan 16, 2025
1 parent d708c6b commit c7b4878
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,22 @@ module.exports = {
'@typescript-eslint/explicit-member-accessibility': 'off',
},
},
{
files: ['apps/server/src/migrations/**/*.ts'],
rules: {
'@typescript-eslint/no-restricted-imports': [
'warn',
{
patterns: [
{
group: ['@apps/**', '@infra/**', '@shared/**', 'apps/server/src/migrations/**'],
message: 'apps/server/src/migrations may NOT import from @apps, @infra, @shared, or migrations',
},
],
},
],
},
},
{
files: ['apps/server/src/apps/**/*.ts'],
rules: {
Expand Down

0 comments on commit c7b4878

Please sign in to comment.