Skip to content

Commit

Permalink
feat(singletons): add eslint rule for boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
binoy14 committed Apr 29, 2024
1 parent 884fca1 commit bfd9a30
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ const config = {
'sort-imports': 'off', // handled by simple-import-sort
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',

'no-undef': 'off',
'no-dupe-class-members': 'off', // doesn't work with TS overrides
'no-shadow': 'off',
Expand Down Expand Up @@ -217,6 +216,14 @@ const config = {
],
},
},

// Prefer top-level type imports in singletons because boundaries plugin doesn't support named typed imports
{
files: ['packages/sanity/src/_singletons/**'],
rules: {
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
},
},
],
}

Expand Down

0 comments on commit bfd9a30

Please sign in to comment.