Problem with eslintrc: "indent" is invalid: Value "4" must be an enum value
See original GitHub issueI 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:
- Created 8 years ago
- Comments:6
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@shinnn thanks for the hint. Now it works. If someone has the same problem, defining the indent rule as
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.
@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.