'eslint command fails on CI Server with error "ESLint couldn't find the config "standard" to extend from"

I have eslint configuration which works perfectly fine on my local setup (with vscode editor).

but on CI Server, it fails with following error:

  eslint:config-array-factory Config file found: /home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json +0ms
  eslint:config-array-factory Loading {extends:"standard"} relative to /home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json +1ms

Oops! Something went wrong! :(

ESLint: 6.6.0.

ESLint couldn't find the config "standard" to extend from. Please check that the name of the config is correct.

The config "standard" was referenced from the config file in "/home/worker/workspace/-CI-CD-Pipeline-Node-Ts_DC-705/.eslintrc.json".

If you still have problems, please stop by https://gitter.im/eslint/eslint to chat with the team.

I am running following command to lint:

./node_modules/.bin/eslint ./ --ext .ts

I see there are multiple issues on git related to this (https://github.com/microsoft/vscode-eslint/issues/696) but none has solution or that did not worked for me.

Can anyone please help me here.



Solution 1:[1]

it seems that eslint-config-standard-with-typescript isn't installed.

Try this:

npm install --save-dev eslint@7 eslint-plugin-promise@4 eslint-plugin-import@2 eslint-plugin-node@11 @typescript-eslint/eslint-plugin@4 eslint-config-standard-with-typescript

Solution 2:[2]

To disable eslint during build you can add this code to *.config file as described here

module.exports = {
    eslint: {
            ignoreDuringBuilds: true,
  },
}

it helped me remove the error

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Janka
Solution 2 c_e_nwadike