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.

`id-denylist` breaks ESLint per Documentation

See original GitHub issue

Currently, the documentation is ambiguous and should use a different syntax. When a user unknowingly removes the first "error" it causes an unexpected breakage.

Change the structure from this:

"id-denylist": ["error", "data", "err", "e", "cb", "callback"]

To something like this:

"id-denylist": ["error", ["data", "err", "e", "cb", "callback"]]

If not do-able, have it implicitly assigned as “error” or “warn” if neither is specified as the first argument.

Currently the only way to diagnose this issue is by linting via CLI. It goes unnoticed in Problems in VSCode.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
anikethsahacommented, Jul 28, 2020

Thanks for the Issue.

Though in the docs, if you see the options, for incorrect and correct ,

Examples of correct code for this rule with sample "data", "callback" restricted identifiers:

/*eslint id-denylist: ["error", "data", "callback"] */

var encodingOptions = {...};

function processFileResult() {
    // ...
}

With this, I guess it is quite clear. Maybe we can update the docs by breaking down the options and explaining the options?

0reactions
eslint-deprecated[bot]commented, Sep 1, 2020

Unfortunately, it looks like there wasn’t enough interest from the team or community to implement this change. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach accepted status after 21 days tend to never be accepted, and as such, we close those issues. This doesn’t mean the idea isn’t interesting or useful, just that it’s not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rules - ESLint - Pluggable JavaScript Linter
Rules in ESLint are grouped by type to help you understand their purpose. Each rule has emojis denoting: ✓ Recommended. The "extends": "eslint:recommended" ......
Read more >
Rules - ESLint - Pluggable JavaScript Linter
Rules are the core building block of ESLint. A rule validates if your code meets a certain expectation, and what to do if...
Read more >
Working with Rules - ESLint - Pluggable JavaScript Linter
Each rule in ESLint has three files named with its identifier (for example, no-extra-semi ). in the lib/rules directory: a source file (for...
Read more >
linebreak-style - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
indent - ESLint - Pluggable JavaScript Linter
function hello(indentSize, type) { if (indentSize === 4 && type !== 'tab') { console.log('Each next indentation will increase on 4 spaces'); } }....
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