stack/eslint-configs/extra-rules.js
2025-02-13 18:57:02 +01:00

7 lines
272 B
JavaScript

module.exports = {
'no-next-public-env': {
selector: "MemberExpression[object.name='process'][property.name='env'][parent.property.name=/^NEXT_PUBLIC_/]",
message: "Direct access to process.env.NEXT_PUBLIC_* is not allowed. Use getPublicEnvVar() instead."
}
}