Skip to content

Commit

Permalink
Lint rule to ban process.env.REACT_APP_ENABLE_OASIS_MATOMO_ANALYTICS
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed Mar 14, 2024
1 parent b63c399 commit 5441a4b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ const config = {
],
},
],
'no-restricted-syntax': [
'error',
{
selector:
'MemberExpression[object.object.name="process"][object.property.name="env"][property.name="REACT_APP_ENABLE_OASIS_MATOMO_ANALYTICS"]',
message:
'Replace with window.REACT_APP_ENABLE_OASIS_MATOMO_ANALYTICS to support overriding in e2e tests',
},
],
'prefer-template': 'error',

'react/jsx-no-target-blank': 'off', // Not needed with modern browsers
Expand Down

0 comments on commit 5441a4b

Please sign in to comment.