Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Cannot configure double quotes #18

Closed
waynebloss opened this issue May 29, 2019 · 1 comment
Closed

Cannot configure double quotes #18

waynebloss opened this issue May 29, 2019 · 1 comment

Comments

@waynebloss
Copy link

According to Configuring ESLint I can do:

{
    "rules": {
        "eqeqeq": "off",
        "curly": "error",
        "quotes": ["error", "double"]
    }
}

However, with the following configuration in my package.json file, the rule is ignored:

  "eslintConfig": {
    "extends": "universe/native",
    "rules": {
      "quotes": ["error", "double"]
    },
    "settings": {
      "react": {
        "version": "detect"
      }
    }
  },
  "prettier": {
    "trailingComma": "all"
  }

When I change it to "quotes": "double", VS Code does not give me any warnings about double quotes however eslint complains that:

Configuration for rule "quotes" is invalid: 	Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '"double"'). 

And I don't get any errors when using single quotes.

@waynebloss
Copy link
Author

Turns out that you guys changed a bunch of default prettier settings (I wish you hadn't) and I have to override them like this:

  "eslintConfig": {
    "extends": "universe/native",
    "rules": {
      "prettier/prettier": ["error", {
        "singleQuote": false,
        "trailingComma": "all"
      }]
    },
    "settings": {
      "react": {
        "version": "detect"
      }
    }
  },
  "prettier": {
    "trailingComma": "all"
  }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant