Context
eslint.config.js builds a flat config from scratch: strictTypeChecked + stylisticTypeChecked, plus no-unnecessary-condition, no-non-null-assertion, no-floating-promises, no-misused-promises, require-await, and a no-restricted-syntax ban on TS enums. @max-health-inc/config/eslint/react is not used.
This is the strictest lint configuration in the org, and it is the one configuration no other repo can import.
The consequence is backwards. Apps consuming this package are linted by the shared preset, which enables neither strictTypeChecked nor no-unnecessary-condition nor no-non-null-assertion nor the enum ban. So this library holds itself to a materially higher standard than the code calling into it, and none of that rigor is reachable by consumers.
Ask
Two directions, either resolves it:
- Contribute upstream. Add the strict rules to
@max-health-inc/config as a strict: true option on createReactConfig, then consume the preset here. Build configuration belongs in the config package, and this puts the strict rules within reach of every consumer that wants them.
- Export the rules. Keep the local config, but export the rule objects from this package so consumers can opt in.
(1) is preferable. It is also the only one of the two that stops this file from drifting away from the preset again.
Smaller divergence in the same file
no-console here allows warn and error. The shared preset also allows info. Whichever is right, it should be decided in one place; tracked from the config side in Max-Health-Inc/config#5.
Context
eslint.config.jsbuilds a flat config from scratch:strictTypeChecked+stylisticTypeChecked, plusno-unnecessary-condition,no-non-null-assertion,no-floating-promises,no-misused-promises,require-await, and ano-restricted-syntaxban on TS enums.@max-health-inc/config/eslint/reactis not used.This is the strictest lint configuration in the org, and it is the one configuration no other repo can import.
The consequence is backwards. Apps consuming this package are linted by the shared preset, which enables neither
strictTypeCheckednorno-unnecessary-conditionnorno-non-null-assertionnor the enum ban. So this library holds itself to a materially higher standard than the code calling into it, and none of that rigor is reachable by consumers.Ask
Two directions, either resolves it:
@max-health-inc/configas astrict: trueoption oncreateReactConfig, then consume the preset here. Build configuration belongs in the config package, and this puts the strict rules within reach of every consumer that wants them.(1) is preferable. It is also the only one of the two that stops this file from drifting away from the preset again.
Smaller divergence in the same file
no-consolehere allowswarnanderror. The shared preset also allowsinfo. Whichever is right, it should be decided in one place; tracked from the config side in Max-Health-Inc/config#5.