Skip to content

Commit

Permalink
Update linter rules for migrations folder
Browse files Browse the repository at this point in the history
  • Loading branch information
CeEv committed Jan 15, 2025
1 parent 149779e commit e96edca
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ module.exports = {
],
},
overrides: [
{
files: ['apps/server/src/migrations/mikro-orm/**/*.ts'],
rules: {
'filename-rules/match': [1, 'PascalCase'],
'no-console': 'off',
},
},
{
files: ['**/*spec.ts'],
plugins: ['jest'],
Expand All @@ -158,8 +165,8 @@ module.exports = {
{
patterns: [
{
group: ['@apps/**', '@infra/**', '@shared/**'],
message: 'apps-modules may NOT import from @apps, @infra or @shared',
group: ['@apps/**', '@infra/**', '@shared/**', 'apps/server/src/migrations/**'],
message: 'apps-modules may NOT import from @apps, @infra, @shared, or migrations',
},
],
},
Expand All @@ -175,7 +182,7 @@ module.exports = {
patterns: [
{
group: ['@apps/**', '@core/**', '@infra/**', '@modules/**'],
message: 'core-modules may NOT import from @apps, @core, @infra or @modules',
message: 'core-modules may NOT import from @apps, @core, @infra, or @modules',
},
],
},
Expand All @@ -190,8 +197,8 @@ module.exports = {
{
patterns: [
{
group: ['@apps/**', '@core/**', '@modules/**'],
message: 'infra-modules may NOT import from @apps, @core or @modules',
group: ['@apps/**', '@core/**', '@modules/**', 'apps/server/src/migrations/**'],
message: 'infra-modules may NOT import from @apps, @core, @modules, or migrations',
},
],
},
Expand Down Expand Up @@ -222,8 +229,15 @@ module.exports = {
{
patterns: [
{
group: ['@apps/**', '@core/**', '@infra/**', '@modules/**', '@shared/**'],
message: 'shared modules may NOT import from @apps, @core, @infra, @modules or @shared',
group: [
'@apps/**',
'@core/**',
'@infra/**',
'@modules/**',
'@shared/**',
'apps/server/src/migrations/**',
],
message: 'shared modules may NOT import from @apps, @core, @infra, @modules, or @shared',
},
],
},
Expand Down

0 comments on commit e96edca

Please sign in to comment.