Typescript-eslint: Add no-unused-expressions to recommended

Created on 11 Nov 2019  路  3Comments  路  Source: typescript-eslint/typescript-eslint

Added in https://github.com/typescript-eslint/typescript-eslint/pull/1175 by @Nizarius

Should be added to the eslint-recommened set.

eslint-plugin recommended-rules

All 3 comments

Or have any way to add this rule to the eslint rule list?

If a rule is not in recommended/fixable/requires type information, how can I use them?

THX for the docs.

I was trying to follow the docs of eslint & typescript-eslint, but the linter just keeping throw the Error Definition for rule '@typescript-eslint/no-unused-expressions' was not found.

So first I thought the reason was that I use plugin:@typescript-eslint/recommended and @typescript-eslint/no-unused-expressions is not recommended. But your reply shows the reason seems not true.

Then I found some issues like this Error. Most of them were version issues but the packages of typescript-eslint in my project seem were already up-to-date but it's not really. At last, I found the package react-scripts was depended on the 1.x @typescript-eslint/eslint-plugin. OMG monorepo always cause issues like this, and maybe I should notice not only package.json but also yarn.lock.

THX for your help again.

Was this page helpful?
0 / 5 - 0 ratings