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.

Change Request: report unnecessary config overrides

See original GitHub issue

ESLint version

v8.5.0

What problem do you want to solve?

  1. I extend a shared config in the root / I set a rule in the root
  2. I override a rule from the shared config, or add a rule not present in the shared config / I override a rule set by the root in a nested config or override
  3. Later, the shared config changes such that the local rule configuration is a unused, ie, prevents no warnings / Later, I change config in the root such that the nested config or override is unused, ie, prevents no warnings

The problem is that it’s really difficult to figure out when the third step applies.

What do you think is the correct solution?

Like the reportUnusedDisableDirectives config option, I would like a config option that reports unnecessary configuration - in other words, any configuration that exists that matches the existing inferred configuration.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

I’d need many pointers to submit a PR for this, but I’m happy to help where I can.

(filed based on https://github.com/eslint/eslint/issues/15466#issuecomment-1003467207)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
nzakascommented, Jan 12, 2022

It’s not a flaw, it’s an intentional design decision. We no longer want ESLint to have to load modules. Instead, we want you to use import, require, etc. to pull in what you want and place it into the config array. That’s how we will escape the shared config loading hell we can get stuck in right now.

I think the best course forward right now is just to wait until we have the new config system ready for testing and see what would make sense.

0reactions
ljharbcommented, Mar 13, 2022

The unfortunate aspect of that design decision is that it will no longer be possible to have a static configuration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize pipeline configuration - GitLab Docs
On the left sidebar, select Settings > CI/CD. Expand General Pipelines. Select the Auto-cancel redundant pipelines checkbox. Select Save changes. Use the ...
Read more >
Unauthorized change request
Unauthorized change request ; Unauthorized option is selected. This option indicates that the change is an unauthorized change. ; Assignment group field is ......
Read more >
Overridable config parameters | Community Connectors
Overridable config parameters provide the option to let report editors modify default values in a data source. Defining config parameters as ...
Read more >
Reviewing the Field Override Report
The Field Override report displays a summary of the government form overrides in a return. The override detail in the report links to...
Read more >
System Configuration Overrides - ExpressionEngine Docs
ExpressionEngine's settings are loaded in this order at runtime: Settings stored in the database are loaded. Settings in config.php are loaded and override...
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