title: Using ESLint with Docker/Jenkins build
body: <p>I am trying to integrate ESLint with a Jenkinsfile, that is started with a dockerfile image. Whenever I run the build in Jenkins, I get the following error:</p>
  <pre><code>ESLint couldn't find the plugin &quot;eslint-plugin-react&quot;.
  </code></pre>
  <p>Here are my docker and jenkins files (with some non-needed parts taken out...):</p>
  <p>Dockerfile.node:</p>
  <pre><code>FROM node:14
  
  RUN npm install -g eslint@latest --save-dev
  RUN npm install -g react@17.0.1 --save-dev
  RUN npm install -g react-app@1.1.2 --save-dev
  RUN npm install -g eslint-plugin-react@7.26.1 --save-dev
  RUN npm install -g typescript@4.3.4 --save-dev
  RUN npm install -g @typescript-eslint/parser@5.0.0 --save-dev
  RUN npm install -g @typescript-eslint/eslint-plugin@5.0.0 --save-dev
  
  RUN useradd jenkins --shell /bin/bash --create-home
  USER jenkins
  </code></pre>
  <p>Jenkinsfile stage (the .eslintrc file lives in the source/web-ui folder):</p>
  <pre><code>stage('Run ESLint') {
        agent {
          dockerfile {
            filename 'Dockerfile.node'
            dir 'docker/'
            reuseNode true
          }
  
        }
        post {
          failure {
            echo '-- ESLint Failed! -- Please fix the above warnings/errors.'
          }
          success {
            echo 'ESLint succeeded!'
          }
  
        }
  
        steps {
          dir(path: 'source/web-ui') {
            echo 'Running ESLint against JS and TSX files'
            sh'''
            eslint --config .eslintrc.json .. --ext .js,.tsx
            '''
          }
  
        }
      }
  </code></pre>
  <p>and finally, here is my .eslintrc file:</p>
  <pre><code>{
      &quot;env&quot;: {
          &quot;browser&quot;: true,
          &quot;node&quot;: true,
          &quot;es6&quot;: true
      },
      /* RECOMMENDED RULES extended from plugins.
      If you need to remove one of the recommended rules, you may add it to the rules section (using &quot;off&quot; in array options), 
      which will override recommended rules. */
      &quot;extends&quot;: [
          &quot;eslint:recommended&quot;, // https://eslint.org/docs/rules/ - rules with ✓ are included
          &quot;plugin:react/recommended&quot;, // https://github.com/yannickcr/eslint-plugin-react
          &quot;plugin:@typescript-eslint/recommended&quot; // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/README.md
      ],
      &quot;parser&quot;: &quot;@typescript-eslint/parser&quot;,
      &quot;parserOptions&quot;: {
          &quot;ecmaFeatures&quot;: {
              &quot;jsx&quot;: true
          },
          &quot;ecmaVersion&quot;: 6,
          &quot;sourceType&quot;: &quot;module&quot;
      },
      &quot;plugins&quot;: [
          &quot;react&quot;,
          &quot;@typescript-eslint&quot;
      ],
      &quot;overrides&quot;: [
          {
              //if javascript file, ignore these rules:
              &quot;files&quot;: [&quot;*.{js,jsx}&quot;],
              &quot;rules&quot;: {
                  &quot;@typescript-eslint/no-var-requires&quot;: &quot;off&quot;,
                  &quot;@typescript-eslint/no-this-alias&quot; : &quot;off&quot;,
                  &quot;@typescript-eslint/no-unused-vars&quot;: &quot;off&quot;
            }
          }
        ],
      &quot;rules&quot;: {
      },
      &quot;settings&quot;: {
          &quot;react&quot;: {
            &quot;version&quot;: &quot;17.0.1&quot;
          }
        }
  }
  </code></pre>
  <p>It's tripping me up because it's finding eslint globally and running it, but hitting a wall when trynig to find the react plugin, which was installed at the same time eslint was. I tried adding the --resolve-plugins-relative-to flag on, but that came up with the same error. I'm fairly new to docker, so I'm guessing it's something in that file?</p>