Skip to content

ESLint check fails for quotes rule with allowTemplateLiterals #171

Closed
@mesaugat

Description

@mesaugat

For this rule:

"quotes": [2, "single", {"allowTemplateLiterals": true}]

CodeClimate is showing me this error:

Error: /code/.eslintrc:
	Configuration for rule "quotes" is invalid:
	Value "[object Object]" must be an enum value.

    at validateRuleOptions (/usr/src/app/node_modules/eslint/lib/config/config-validator.js:102:15)
    at /usr/src/app/node_modules/eslint/lib/config/config-validator.js:148:13
    at Array.forEach (native)
    at Object.validate (/usr/src/app/node_modules/eslint/lib/config/config-validator.js:147:35)
    at Object.load (/usr/src/app/node_modules/eslint/lib/config/config-file.js:394:19)
    at loadConfig (/usr/src/app/node_modules/eslint/lib/config.js:74:33)
    at getLocalConfig (/usr/src/app/node_modules/eslint/lib/config.js:177:23)
    at Config.getConfig (/usr/src/app/node_modules/eslint/lib/config.js:272:22)
    at CLIEngine.getConfigForFile (/usr/src/app/node_modules/eslint/lib/cli-engine.js:715:29)
    at module.exports (/usr/src/app/lib/validate_config.js:9:22)

I am using "eslint": "^3.12.2" in my local system and it doesn't show any problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions