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.

Configuration for rule "<some rule>" is invalid

See original GitHub issue

I’m probably missing something silly (basically 0 results from google) but I got this error when using eslint-config-hardcore in a create-react-app project: image

I also tried just using a globally installed eslint: image

   // The error also happens when I comment out every "extends" other than hardcore
  "extends": [
    // "plugin:import/recommended",
  "env": {
    "browser": true
  "parserOptions": {
    "project": "./tsconfig.json"
  "plugins": [
    // "import",
  "reportUnusedDisableDirectives": true,
  "rules": {
    "no-alert": "error", // It's deprecated
    "prefer-arrow-callback": "warn",
    "prefer-const": "warn",
    "prefer-numeric-literals": "warn",
    "prefer-promise-reject-errors": "warn",
    "prefer-regex-literals": "warn",
    "prefer-rest-params": "warn",
    "prefer-spread": "warn",

    "jest/no-commented-out-tests": "warn",
    "jest/no-identical-title": "warn",
    "jest/prefer-called-with": "warn",
    "jest/prefer-expect-assertions": "off",
    "jest/prefer-hooks-on-top": "off",
    "jest/prefer-spy-on": "warn",
    "jest/prefer-strict-equal": "warn",
    "jest/prefer-to-be-null": "error",
    "jest/prefer-to-be-undefined": "error",
    "jest/prefer-to-contain": "error",
    "jest/prefer-to-have-length": "error",
    "jest/prefer-todo": "warn",
    "jest/valid-describe": "error",
    "jest/valid-expect": "error",
    "jest/valid-expect-in-promise": "error",
    "jest/valid-title": "error",

    "@typescript-eslint/explicit-module-boundary-types": "off",
    "@typescript-eslint/no-explicit-any": "off", // Check every once in a while
    "@typescript-eslint/unbound-method": "off", // Invalid errors - methods ARE bound silly

    "@typescript-eslint/no-invalid-this": "warn",
    "@typescript-eslint/no-invalid-void-type": "warn",
    "@typescript-eslint/prefer-enum-initializers": "warn",
    "@typescript-eslint/prefer-for-of": "warn",
    "@typescript-eslint/prefer-function-type": "warn",
    "@typescript-eslint/prefer-includes": "error",
    "@typescript-eslint/prefer-literal-enum-member": "warn",
    "@typescript-eslint/prefer-nullish-coalescing": "error",
    "@typescript-eslint/prefer-optional-chain": "error",
    "@typescript-eslint/prefer-readonly": "warn",
    "@typescript-eslint/prefer-readonly-parameter-types": "off",
    "@typescript-eslint/prefer-reduce-type-parameter": "warn",
    "@typescript-eslint/prefer-string-starts-ends-with": "warn",
    "@typescript-eslint/prefer-ts-expect-error": "warn",

    "react/button-has-type": "warn",
    "react/prefer-read-only-props": "warn",

    "testing-library/await-fire-event": "warn",
    "testing-library/prefer-explicit-assert": "warn",

    // disabling base rules
    "no-use-before-define": "off",
    "@typescript-eslint/no-use-before-define": "error"
  "settings": {
    "linkComponents": [

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

icecream17commented, Oct 22, 2021

If it helps, I’m using yarn and cra 5.0.0-next. Although I somehow just saw that yarn lets you resolve to a version outside of a dependency range, and nothing seems to break when I use ^2.24.2 except for another even more obscure (but separate) error 😅


Thanks for your help though

EvgenyOrekhovcommented, Nov 22, 2021

@icecream17 Shopify fixed their semver ranges and released a new version of @shopify/eslint-plugin. I just updated all dependencies and released eslint-config-hardcore 23.3.0. You can try and see if it works for you now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Eslint error, configuration for rule "import/no-cycle" is invalid
I changed the node_modules/eslint-config-airbnb-base/rules/imports.js "∞" to an integer to continue debugging. Next run showed this error, ...
Read more >
[Bug] Configuration for rule "dot-notation" is invalid #303
What happened? version 16 for eslint-config-standard-with-typescript works fine but version 17 throws error: Oops ...
Read more >
eslint/eslint - Gitter
Error: eslint/packages/eslint-config-eslint/default.yml: Configuration for rule "no-else-return" is invalid: Value "[object Object]" should NOT have more ...
Read more >
Rules - ESLint - Pluggable JavaScript Linter
Some problems reported by this rule are automatically fixable by the --fix command ... Disallow invalid regular expression strings in `RegExp` constructors.
Read more >
Using Node Properties when Defining Configuration Rules
When a rule is violated, part of the message that appears at runtime is derived from the message you define when creating the...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found