“No ESLint configuration found” error

后端 未结 11 2209
故里飘歌
故里飘歌 2021-02-01 16:03

Recently, we\'ve upgraded to ESLint 3.0.0 and started to receive the following message running the grunt eslint task:

> $ grunt eslint
Running \"         


        
相关标签:
11条回答
  • 2021-02-01 16:26

    Run the command ember init. When it asks for overwriting the existing file(s). Type n to skipping overwriting the file. Now it will automatically create required files like .eslintrc, etc.

    For me the same issue occurred when i copied my folder except dist, dist_production and node_modules folder to another system and tried running ember build.

    0 讨论(0)
  • 2021-02-01 16:27

    We faced this problem today and realized, that the issue was not caused inside the project that we were working on, but inside a package that we had a link on using the command:

    yarn link
    

    Which is a feature often useful to test out new features or when trying to debug an issue in a package that manifests itself in another project. We solved it by either removing the link, or in case of ember.js disabling the developer mode of our addon package.

    index.js

    module.exports = {
        isDevelopingAddon: function() {
          return false;
        },
        ...
    }
    
    0 讨论(0)
  • 2021-02-01 16:31

    Create a new file on the root directory called .eslintrc.json file:

     {
        "parserOptions": {
             "ecmaVersion": 6,
             "sourceType": "module",
             "ecmaFeatures": {
                 "jsx": true
             }
        },
        "rules": {
            "semi": "error"
        }
    }
    
    0 讨论(0)
  • 2021-02-01 16:34

    The error you are facing is because your configuration is not present. To configure the eslint type

    eslint --init

    then configure as your requirement.

    then execute the project again.

    0 讨论(0)
  • 2021-02-01 16:34

    I hade the same problem with Gulp and running "gulp-eslint": "^3.0.1" version. I had to rename config: to configFile in Gulp task

    .pipe(lint({configFile: 'eslint.json'}))
    
    0 讨论(0)
提交回复
热议问题