10

I'm using WebStorm 2017.3 and ESLint.

I'm wondering: is there a way to customize ESLint errors highlighting so I will be able to distinguish the WebStorm's errors (there is no closing bracket) and ESLint 'errors' (there should be a space before the bracket)?

Currently, I can not distinguish critical typos and 'advices' of ESLint.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Anton Y.
  • 111
  • 5

2 Answers2

2

In File | Settings | Editor | Inspections, select ESLint

Uncheck in Options: use rule severity from the configuration file

From the Severity dropdown, choose the desired severity level, or select Edit severities and set up your own severity level with desired highlighting

enter image description here

InsOp
  • 2,425
  • 3
  • 27
  • 42
1

'Custom' severity highlighting is not supported for ESLint - WEB-25697. Level 1 issues (https://eslint.org/docs/user-guide/configuring#configuring-rules) are highlighted as warnings ( Settings | Editor | Color Scheme | General | Errors and Warnings | Warning), Level 2 - as errors (Settings | Editor | Color Scheme | General | Errors and Warnings | Error)

Update: since 2018.3, you can override severity levels from the linter's config by unchecking Use rule severity from the configuration file in Preferences | Editor | Inspections | ESLint. Please note that this way all rules enabled in the config will be highlighted the same way, without the distinction between errors and warnings. See this comment: https://youtrack.jetbrains.com/issue/WEB-25697#focus=streamItem-27-3090927.0-0

lena
  • 90,154
  • 11
  • 145
  • 150