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.

Support overrides

See original GitHub issue

When adding TypeScript support in eslint-config-kentcdodds (see https://github.com/kentcdodds/eslint-config-kentcdodds/pull/54), I noticed CI isn’t failing even though I haven’t added all @typescript-eslint rules (yet).

I’m happy to help out if you could point me into the right direction of adding support here. 🙂

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
darekkaycommented, May 13, 2021

My workaround is to define high-level configurations (containing overrides) and move all plugin rules into separate files:

root
  - config-all.js
  - react.js
  - nodejs.js
  - plugins
    - base.js
    - jest.js
    - typescript.js

So while react.js uses overrides to apply typescript rules only to TS(X) files, there’s a special config file config-all.js that contains all rules without overrides:

module.exports = {
  extends: [
    "../plugins/base.js",
    "../plugins/jest.js",
    "../plugins/typescript.js",
  ],

  plugins: ["@typescript-eslint"],
};

When checking config-all.js, eslint-find-rules will now check all referenced plugins/rules.

1reaction
MichaelDeBoeycommented, Apr 14, 2021

A new use-case we have on eslint-config-kentcdodds is wanting to enable all Jest related rules only for testing files (as can be seen in https://github.com/kentcdodds/eslint-config-kentcdodds/pull/98).

Enabling all the rules in the root just to make our tests happy isn’t the preferred way, so this feature could benefit us a lot.

@leepowelldev Do you have the time to create a PR with working version of this or should we look into it ourselves?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support for npm 8.3 Overrides #15278 - renovatebot/renovate
json under the "overrides" object matches the version of the dependency in dependencies or devDependencies . If you have any ideas on how...
Read more >
How overrides work - Google Ad Manager Help
A Clear override option appears next to settings that have been overridden. This option won't appear if the setting is not overridden. To...
Read more >
Overrides of clinical decision support alerts in primary care ...
Clinical Decision Support (CDS) systems can alert physicians about potential clinical risks and suggest suitable treatment alternatives at appropriate times ...
Read more >
overrides (DHCP Relay Agent) | Junos OS - Juniper Networks
Override the default configuration settings for the extended DHCP relay agent. Specifying the overrides statement with no subordinate statements removes all ...
Read more >
Apply overrides to instances - Components - Figma Help Center
Figma supports overrides to text, fill, stroke, and effect properties. This allows you to make changes to the more superficial aspects of an...
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