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.

Problem with eslintrc: "indent" is invalid: Value "4" must be an enum value

See original GitHub issue

I use gulp-eslint as follows:

var standaloneScript = 'public/api/config-api.js';
gulp.task('eslint', function () {
    return gulp.src(standaloneScript)
        .pipe($.eslint())
        .pipe($.eslint.format())
        .pipe($.eslint.failOnError());
});

In my root folder I have a eslintrc specified. But eslint crashes because of the indent rule. It says:

    Configuration for rule "indent" is invalid:
    Value "4" must be an enum value.
//...
"rules": {
        "indent": [4, 4],
//...

What can I do? Removing indent works, but this is not an option for me. Could you help me to resolve this issue?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
tschoartschicommented, Jul 15, 2015

@shinnn thanks for the hint. Now it works. If someone has the same problem, defining the indent rule as

{
//...
"indent": [2, 4]
//...
}

worked for me. Why I didn’t thought it is a problem with the rule is, that I used this exact .eslintrc with ember-cli-eslint also and there I had never any problems.

0reactions
shinnncommented, Jul 18, 2015

@jonathanKingston I won’t, because I’m currently not an actual user of ember-cli-eslint. I just needed to look into your code to answer the question reported here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[@typescript-eslint/indent] Wrong enum error #3357 - GitHub
[x ] I have tried restarting my IDE and the issue persists. [x ] I have updated to the latest version of the...
Read more >
Configuration for rule "react/jsx-indent" is invalid: Value "4 ...
I've had a look at the documentation for the package and I can't see any issues with my eslintrc file. Here is a...
Read more >
indent | typescript-eslint
This rule extends the base eslint/indent rule. It adds support for TypeScript nodes. How to Use​ .eslintrc.cjs. module.
Read more >
Rules - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
How to fix Definition for rule typescript-eslint no-use-before ...
For my .eslintrc.js file I have the following rules set up: ... 'error', '@typescript-eslint/consistent-type-definitions': 'error', ...
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