eslint-config-airbnb-typescript
eslint-config-airbnb-typescript copied to clipboard
`no-unreachable` should not be disabled
The TypeScript compiler only enforces this check if explicitly configured to do so: https://www.typescriptlang.org/tsconfig#allowUnreachableCode
(Default behaviour is just to surface an editor warning.)
no-unreachable is disabled here:
https://github.com/iamturns/eslint-config-airbnb-typescript/blob/766a2b975055bd827b72cbb538643e9103c1bdd4/lib/shared.js#L282
I think it would be more in-keeping with the spirit of this config to leave it enabled, rather than requiring users to have allowUnreachableCode: false in their tsconfig file to achieve the same behaviour.
I've raised an issue for the ESLint docs too: https://github.com/eslint/eslint/issues/18378