Open benj-dobs opened 6 months ago
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:
no-unreachable
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.
allowUnreachableCode: false
tsconfig
I've raised an issue for the ESLint docs too: https://github.com/eslint/eslint/issues/18378
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 theirtsconfig
file to achieve the same behaviour.