build: upgrade ESLint core to v9 (gh54 part VI) by Planeshifter · Pull Request #10972 · stdlib-js/stdlib

@Planeshifter

Upgrade ESLint from v8 to v9 and fix all v9-specific breakages:

- Bump `eslint` from `^8.57.0` to `^9.0.0`
- Add `!**/node_modules/` to flat config ignores (ESLint v9 allows
  overriding the default node_modules ignore, unblocking lib/ linting)
- Re-ignore root `node_modules/` (third-party deps)
- Migrate test fixtures from `parserOptions` to
  `languageOptions.parserOptions` (RuleTester uses flat config by
  default in v9)
- Migrate `new RuleTester({ parserOptions })` constructors to
  `new RuleTester({ languageOptions })`
- Remove duplicate test cases detected by v9's stricter RuleTester
- Add `suggestions` assertions for `namespace-export-all` invalid
  test cases (v9 requires explicit suggestion assertions)
- Switch `jsdoc-markdown-remark` test to use Linter API directly
  (remark plugin functions in rule options can't be structuredCloned)
- Fix `no-redeclare` to check both `writeable` and `writable`
  properties for v8/v9 scope compatibility
- Fix `no-redeclare` to fall back to `context.parserOptions` when
  `context.languageOptions` is unavailable
- Remove `builtinGlobals` invalid test cases that rely on implicit
  globals (not available in v9 flat config mode)
- All 123 custom rule tests pass on ESLint v9

Ref: stdlib-js/metr-issue-tracker#54