Code Quality report fails when ESLint is set up (with plugins enabled)
Summary
I added ESLint to a project that already had the Code Quality job set up, which all of a sudden started to fail with this error message:
error: (CC::CLI::Analyze::EngineFailure) engine eslint failed with status 1 and stderr
Module not supported: eslint-plugin-@typescript-eslint
Module not supported: @typescript-eslint/parser
Module not supported: @typescript-eslint/eslint-plugin
/usr/src/app/lib/validate_config.js:17
throw e;
^
Error: Failed to load config "plugin:@typescript-eslint/eslint-recommended" to extend from.
Referenced from: /code/.eslintrc.js
Steps to reproduce
I use a .eslintrc.js
generated by ESLint, which looks as follows (most notably, it enables TypeScript support):
module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
},
"overrides": [
{
"files": "**/*.ts",
"rules": {
// There's a TypeScript-specific version of this rule;
// we disable the generic one, because it thinks imported types are unused
// when they're not:
"no-unused-vars": "off",
}
}
]
};
Example Project
This surfaced in this commit: vincenttunru/tripledoc@ed425be7
What is the current bug behavior?
I get the error message posted above.
What is the expected correct behavior?
Code quality passes successfully like before.
Relevant logs and/or screenshots
Posted above.
Output of checks
This bug happens on GitLab.com.
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
Edited by Vincent