Releases: openmrs/openmrs-contrib-eslint-config
Release list
v2.1.0
This minor release relaxes two rules for test mocks:
require()is now allowed in files under__mocks__, including TypeScript mocks.typeof import(...)annotations are now allowed in*.test.ts,*.test.tsx, and__mocks__files. This avoids duplicate namespace type imports when a mock needs both a module value and its type.
Source files outside those scopes stay strict. The named test preset also remains independently loadable.
When upgrading, remove any consistent-type-imports disable comments that become unused in test files. Repositories that do not rely on the relaxed behavior can keep declaring ^2.0.0; that range already accepts this release.
v2.0.0
Breaking: @typescript-eslint/no-require-imports is restored to error for source files, matching the legacy configs this package was ported from. require() stays allowed in CommonJS tooling and config files (*.config.js, *-config.js, karma.conf.js, protractor.conf.js, tools/**, setup-tests.js, __mocks__/**, *.cjs). 1.0.0 disabled the rule everywhere by mistake.
Dependency floors move to the versions validated for this release: @eslint/js ^9.39.0, eslint-config-prettier ^10.1.8, eslint-plugin-react-hooks ^7.1.1, globals ^17.9.0, typescript-eslint ^8.66.0, eslint-plugin-testing-library ^7.16.2, eslint-plugin-jest-dom ^5.10.1, eslint-plugin-playwright ^2.11.0, eslint-plugin-import ^2.32.0.
Upgrading from 1.0.0: repos whose source already passed the legacy configs need no code changes, with one exception. If your repo adopted 1.0.0 and its lint deleted eslint-disable comments for no-require-imports as unused, restore them (openmrs-esm-core needs 7). See the README's versioning policy for what may change in minors versus majors.
v1.0.0
First stable release of @openmrs/eslint-config.
Graduates the package off the 0.x line ahead of the cross-repo O3 rollout, so consuming repositories can declare ^1.0.0 and absorb minor releases without per-repo version-bump PRs. The rule set is unchanged from 0.1.0, which was validated as a zero-new-findings migration in openmrs-esm-core#1827.
Changes since 0.1.0:
- The
eslintpeer range is now^9.39.0(was>=9), matching the version the config is tested against. ESLint 10 support will come in a future release once the bundled plugins are validated against it.
See the README for usage, the migration guide, and the versioning policy (new rules land as warn in a minor and are promoted to error only in a major).
v0.1.0
Initial release of @openmrs/eslint-config: composable ESLint 9 flat-config presets (base, react, test, e2e) for OpenMRS O3 frontend modules, with a pre-composed default export.
See the README for usage and the versioning policy. This is a 0.x release; the rule set may still churn as repositories adopt it during the cross-repo rollout.