ShopperCove
Menu
All writingBlogTopicsCategoriesAboutRSS
Blog
Categories
Observability & SRE62All categories
Topics
sre111localhost lab102performance70python58javascript47bundle size36benchmarking35node.js35web development21typescript19benchmark16content creation15All topics
About
Loading article…

ShopperCove

Hands-on notes on developer tools, written after the tool has actually been run.

All writingBlogCategoriesTopicsAboutPrivacyRSS

© 2026 ShopperCove

On this page

  1. typescript-eslint 8.71.0: no-unsafe-enum-assignment + rule fixes (28 Sep 2026)
  2. New rule: `@typescript-eslint/no-unsafe-enum-assignment`
  3. Fixes in 8.71.0
  4. Hands-on upgrade checklist
  5. Bottom line
  6. FAQ
  7. Is no-unsafe-enum-assignment enabled in the recommended config?
  8. What does no-unsafe-enum-assignment flag?
  9. Does the rule need type information?
  10. Sources
  11. Related
  1. Blog

Is no-unsafe-enum-assignment in Recommended?

typescript-eslint published v8.71.0 on 28 September 2026: new typed rule @typescript-eslint/no-unsafe-enum-assignment (flags plain numbers/unsafe values assigned into enum-typed locations) plus fixes for no-misused-promises, no-unnecessary-type-assertion, unbound-method, and switch-exhaustiveness-check. npm latest confirmed 8.71.0; ShopperCove docs checklist only; pairs with live ESLint 10.12 coverage; no affiliate.

5 October 2026·4 min read

Summary

Disclosure

This post contains affiliate links. If you buy through them, I may earn a commission at no extra cost to you. I only make firsthand claims about products I have actually used.

On this page
  1. typescript-eslint 8.71.0: no-unsafe-enum-assignment + rule fixes (28 Sep 2026)
  2. New rule: `@typescript-eslint/no-unsafe-enum-assignment`
  3. Fixes in 8.71.0
  4. Hands-on upgrade checklist
  5. Bottom line
  6. FAQ
  7. Is no-unsafe-enum-assignment enabled in the recommended config?
  8. What does no-unsafe-enum-assignment flag?
  9. Does the rule need type information?
  10. Sources
  11. Related

typescript-eslint 8.71.0: no-unsafe-enum-assignment + rule fixes (28 Sep 2026)

No: typescript-eslint 8.71.0 (28 September 2026) enables the new @typescript-eslint/no-unsafe-enum-assignment rule through plugin:@typescript-eslint/strict-type-checked, so recommended (non-strict) configs do not turn it on and you add it yourself. It requires type information, has no options, and flags plain numbers, coincidental numeric literals and arithmetic results assigned into numeric enum types.

There is no affiliate link in this article. This post has no affiliate links.

New rule: @typescript-eslint/no-unsafe-enum-assignment

Extending plugin:@typescript-eslint/strict-type-checked enables this rule. It requires type information (with the usual type-checked lint performance tradeoffs).

What it targets: TypeScript is deliberately lenient about assigning plain number values into numeric enums (useful for bit-flag combinations). The cost is that any number—including one that matches no enum member—can land in an enum-typed location. Numeric literals that merely coincide with a member’s value, and arithmetic that yields a plain number, have the same problem.

The rule reports those unsafe assignments so you depend on named members, not accidental numeric coincidence.

From the official examples:

PatternNotes
const fruit: Fruit = someNumberPlain number into enum type — flagged
const fruit: Fruit = 0 when Fruit.Apple === 0Literal that only “works” because of the member value — flagged
mutated++ / mutated += 1 on an enum-typed variableYields plain number — flagged
const fruit: Fruit = Fruit.AppleNamed member — OK
Reassign with another named memberOK

Options: none (not configurable).

When not to use it (per docs): codebases that intentionally derive enum values with non-bitwise operators; validating untrusted API/user input before treating it as an enum (temporary disables or a validator like Zod may be better); third-party enums imported only as types; or teams that treat enums as a namespaced bag of values (consider const object + union instead).

Enable explicitly if you are not on strict-type-checked:

// eslint.config.mjs (flat)
rules: {
  "@typescript-eslint/no-unsafe-enum-assignment": "error",
}

Fixes in 8.71.0

From the release notes:

RuleFix
no-misused-promisesHandle a return outside of any function (#12912)
no-unnecessary-type-assertionSpecialize generic assertion report message (#12832)
unbound-methodRespect this: void on class properties
switch-exhaustiveness-checkAlways sort literal cases in stable order (#12885)

Hands-on upgrade checklist

  1. Inventory: npm ls @typescript-eslint/eslint-plugin (and matching @typescript-eslint/parser / utils). Note whether you are below 8.71.0.
  2. Pin / bump in staging: install @typescript-eslint/eslint-plugin@8.71.0 (and keep sister packages on the same 8.71.0 line). Confirm with npm view @typescript-eslint/eslint-plugin version → expect 8.71.0 as latest as of sources read 5 Oct 2026.
  3. Type-aware config: if you use strict-type-checked, expect no-unsafe-enum-assignment to light up on numeric-enum assignment patterns. If you only use recommended (non-strict) configs, decide whether to enable the rule deliberately.
  4. Re-run lint CI: watch for new enum-assignment findings and for quieter/more accurate results on the four fixed rules above.
  5. Do not invent security urgency: this minor is features + bugfixes in the official release notes; ShopperCove is not attaching CVE IDs.

ShopperCove did not change production typescript-eslint versions for this article. Prefer the GitHub release and rule docs over third-party roundups. For core ESLint (not this plugin), see the live ShopperCove note on ESLint v10.12.0.

Bottom line

typescript-eslint v8.71.0 (28 Sep 2026) adds no-unsafe-enum-assignment for type-aware configs and ships four useful rule fixes. Pin @typescript-eslint/*@8.71.0 when ready. No affiliate.

FAQ

Is no-unsafe-enum-assignment enabled in the recommended config?

No. Per the rule docs it is enabled by strict-type-checked. On recommended, add "@typescript-eslint/no-unsafe-enum-assignment": "error" to your flat config rules.

What does no-unsafe-enum-assignment flag?

Assigning a plain number, a literal that only matches a member's value (Fruit = 0), or ++ / += results to an enum-typed location. Assigning named members like Fruit.Apple is fine.

Does the rule need type information?

Yes. It is a type-aware rule, so it runs only with typed linting and has the usual type-checked performance cost.

Related reading: Should You Upgrade to TypeScript 7? 10.2s to 1.4s Tested; ESLint v10.12.0: SourceCode tokens/comments types + rule fixes (2 Oct 2026)​

Sources

  • 01npmjs.com/package/@typescript-eslint/eslint-plugin
  • 02registry.npmjs.org/@typescript-eslint/eslint-plugin/8.71.0
  • 03typescript-eslint.io/users/releases/

Related

  • Open shoppercove.com
  • Open shoppercove.com
  • Open shoppercove.com
  • Open shoppercove.com
  • Open shoppercove.com
  • Open shoppercove.com
  • Open shoppercove.com
  • Related reading: typescript-eslint recommended vs strict-type-checked
typescript-eslinteslinttypescriptlintingstatic analysisenumweb development

Lab evidence

What I found running this

Sources read 5 Oct 2026 (Asia/Calcutta) via WebFetch/npm: GitHub release v8.71.0 (published 2026-09-28T17:07:50Z); npm @typescript-eslint/eslint-plugin@8.71.0 (time 2026-09-28T17:13:54.998Z; dist-tag latest=8.71.0). Rule docs Open typescript-eslint.io — requires type information; enabled via plugin:@typescript-eslint/strict-type-checked. Checklist: bump @typescript-eslint/* to 8.71.0; enable or review no-unsafe-enum-assignment if on strict-type-checked; re-run CI for fixed rules. No production lint suite upgraded on ShopperCove; no invented CVEs; no affiliate.

Explore the product

Untested by us, and no traffic result is guaranteed. Check the live offer and refund terms first.

AI Traffic Secrets for AI-era SEO

See AI Traffic Secrets details

Ready Client Sites for prebuilt websites

See Ready Client Sites details

Notes when a lab post goes up

Occasional email for new hands-on reviews. No sequence and no sponsors.

Explore the product

Untested by us, and no traffic result is guaranteed. Check the live offer and refund terms first.

AI Traffic Secrets for AI-era SEO

See AI Traffic Secrets details

Ready Client Sites for prebuilt websites

See Ready Client Sites details

Keep reading

  • What Changed in ESLint v10.12.0? Should You Update?

    ESLint published v10.12.0 on 2 October 2026 as a minor release: documentation and TypeScript types for SourceCode#getText(), getLoc(), and getRange() now accept tokens and comments (matching runtime behavior), plus multiple rule fixes including astral/Unicode letter handling and autofix edge cases. npm latest confirmed 10.12.0; ShopperCove docs checklist only; no affiliate.

    Summary5 Oct 20264 min read

  • Biome vs ESLint: Should You Switch? 0.41s vs 18.7s

    Biome 2.5.15 check vs ESLint 9.39.4 + Prettier 3.8.4 on react-hook-form (317 files): 0.41 s vs 18.7 s sequential stack (ESLint 13.58 s, Prettier check 5.22 s). migrate eslint: 54/476 direct, ~50% covered. Biome 200 errors/427 warnings vs ESLint 0/562; 9 format diffs; 287 noExplicitAny from recommended.

    Summary5 Oct 20266 min read

  • oxlint vs ESLint: Is 100x Faster Worth It?

    oxlint 1.87.0 vs ESLint 9.39.4 on react-hook-form (301 files): 0.09 s vs 9.81 s single-thread (6.02 s with --concurrency auto, 1.10 s warm --cache). @oxlint/migrate ported 42 of 84 rules natively, 80 with JS plugins. 315 vs 562 warnings; seeded test 11/15 native, 13/15 with JS plugins, ESLint 15/15.

    Summary5 Oct 20267 min read