"No ESLint configuration found"错误

18 浏览
0 Comments

"No ESLint configuration found"错误

最近,我们升级到了 ESLint 3.0.0 并且在运行 grunt eslint 任务时收到了以下消息:

> $ grunt eslint
Running "eslint:files" (eslint) task
Warning: No ESLint configuration found. Use --force to continue.

这是 grunt-eslint 的配置:

var lintTargets = [
    "<%= app.src %>/**/*/!(*test|swfobject)+(.js)",
    "test/e2e/**/*/*.js",
    "!test/e2e/db/models/*.js"
];
module.exports.tasks = {
    eslint: {
        files: {
            options: {
                config: 'eslint.json',
                fix: true,
                rulesdir: ['eslint_rules']
            },
            src: lintTargets
        }
    }
};

我们应该怎么解决这个错误?

0