ESLint showing errors in Brackets

后端 未结 1 2063
失恋的感觉
失恋的感觉 2021-01-29 15:33

My javascript code is working perfectly except ESLint is showing that I have errors, such as:

\"ERROR: \'myFunction\' is defined but never used. [no-unuse

相关标签:
1条回答
  • 2021-01-29 15:41

    I had the same problem: create a package.json file a the root of your project and put you ESLint configuration in a eslintConfig object as defined in the ESLint documentation:

    {
        "eslintConfig": {
            "globals": {
                "Vue": true
            },
            "env": {
                "browser": true,
                "es6": true,
                "jquery": true
            },
            "extends": [
                "eslint:recommended"
            ],
            "parserOptions": {
                "sourceType": "module"
            },
            "rules": {
                "no-console": 0,
                "indent": [
                    "error",
                    4
                ],
                "linebreak-style": [
                    "error",
                    "unix"
                ],
                "quotes": [
                    "error",
                    "double"
                ]
            }
        }
    }
    

    Good coding!

    0 讨论(0)
提交回复
热议问题