question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

should throw an error when disabling a non-existent rule

See original GitHub issue

Tell us about your environment

  • **ESLint Version:**master
  • Node Version:
  • npm Version:

What parser (default, Babel-ESLint, etc.) are you using? default

What did you do? Please include the actual source code causing the issue.


/* eslint foo: 0 */

// edit: or in a config file
{
  "rules": { "foo": 0}
}

What did you expect to happen? throw an error, since there is no rule named foo. What actually happened? Please include the actual, raw output from ESLint. no error thrown.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:33 (33 by maintainers)

github_iconTop GitHub Comments

2reactions
platinumazurecommented, Apr 27, 2019

TSC Summary: The main issue is that if a rule is disabled, either in a config file or in an inline comment, the disable would silently do nothing and the user would never know. We thought this would be a problem for end users, but Jordan Harband pointed out that this has a large negative effect on plugin maintainers that want to support multiple versions of ESLint. This issue was originally created and accepted as a bug and I don’t believe sufficient discussion has occurred that takes into account the negative side effects of the original design. I believe this should not be in 6.0.0 and that this needs more discussion, possibly even an RFC.

TSC Question: Should we remove this from 6.0.0 and ask for further design discussion? As an ancillary question, should we require an RFC for this change?

2reactions
sstern6commented, Nov 13, 2018

thanks @kaicataldo Ill hold off. Plenty of other stuff I can get done.

Read more comments on GitHub >

github_iconTop Results From Across the Web

throwing an eslint error if disabling a rule that is not triggered
I'm heavily using eslint in a React project and there seems that there could be many practical uses for such a rule. eslint...
Read more >
Errors and Warnings — Verilator 5.005 documentation
Disable the warning globally invoking Verilator with the -Wno-{warning-code} option. This should be avoided, as it removes all checking across the designs, and ......
Read more >
Documentation: 15: 43.9. Errors and Messages - PostgreSQL
This example will abort the transaction with the given error message and hint: RAISE EXCEPTION 'Nonexistent ID --> %', user_id USING HINT =...
Read more >
12 Errors and Error Handling
Generated errors are exceptions of class exit or throw. ... The only exception to this rule is the class error with the reason...
Read more >
NGINX only not working when Custom Error Documents is ...
Go into Apache & NGINX settings -> disable NGINX Proxy. This will put the server into the nginx-only operation. Wordpress site under that ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found