SIGN IN SIGN UP

build(frontend): lint for unused module exports

The check in the previous commit only covers what no TypeScript tool can
see: the modules index.ts hangs on the global cmk object, whose call
sites are strings in Python. An export another module could import is a
different problem, and eslint has a rule for it.

That rule could not run. The repository eslint config ignored this
package wholesale (CMK-32715), and lifting the ignore costs 16
auto-fixable findings plus two references to jest's global, which the
test files now declare. What it does not cost is the disable directives
the package carries for the rules of its own .eslintrc.json: those rules
stay unported, so the plugin naming them is registered without them and
directives left unused are not reported. Nothing that was enforced
before stops being enforced.

import-x rather than the eslint-plugin-import already in package.json:
both want a legacy .eslintrc for the file walk the rule does, and only
import-x accepts the one this package already has instead of demanding a
stub at the repository root. Two further edges are worth knowing,
because a wrong answer makes the rule report nothing rather than fail:
it walks .js only unless import-x/extensions names .ts, and it must not
resolve symlinks, or every import lands outside the tree Bazel handed
it.

38 exports are then left that no other module imports. None of them are
dead -- each is used inside its own file -- so they lose the export
keyword rather than the body, which hands them to noUnusedLocals.

eslint.config.js goes as well: nothing loads a CommonJS eslint config
here, and the list of vendored files it carried now lives in
eslint.config.mjs, shortened to the directories those files sit in.

Change-Id: I6144219c980fb56f48ba0d3c206629618406e6c1
B
Benjamin Knapp committed
f7f80ef9649eb174e8271e93ef24ca02b7103a26
Parent: 4635883
Committed by Jenkins <jenkins@review.lan.tribe29.com> on 8/21/2026, 9:16:17 AM