Skip to content

Commit

Permalink
feat: add eslint rule for date-fns imports
Browse files Browse the repository at this point in the history
  • Loading branch information
jbroma committed Mar 14, 2024
1 parent b7a230e commit 8231abd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ const restrictedImportPaths = [
name: '@styles/theme/illustrations',
message: 'Do not import theme illustrations directly. Please use the `useThemeIllustrations` hook instead.',
},
{
name: 'date-fns/locale',
message: "Do not import 'date-fns/locale' directly. Please use the submodule import instead, like 'date-fns/locale/en-GB'.",
},
];

const restrictedImportPatterns = [
Expand Down

0 comments on commit 8231abd

Please sign in to comment.