Project

General

Profile

Bug #21448

npm lint fails when plugin has additional dependencies

Added by Tomáš Strachota almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
JavaScript stack
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

The lint script in the foreman just includes files from plugins into a lint run executed from the context of the foreman. This causes troubles when a plugin adds some custom lint dependency (like eslint-plugin-jest from the example below).

[foreman|2.4.1|develop] npm run lint

> TheForemanDevDeps@1.17.0 lint /home/vagrant/foreman/foreman
> eslint -c .eslintrc webpack/ script/ $(./script/foreman_plugins_eslint.js) || exit 0

Oops! Something went wrong! :(

ESLint couldn't find the plugin "eslint-plugin-jest". This can happen for a couple different reasons:

1. If ESLint is installed globally, then make sure eslint-plugin-jest is also installed globally. A globally-installed ESLint cannot find a locally-installed plugin.

2. If ESLint is installed locally, then it's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm i eslint-plugin-jest@latest --save-dev

If you still can't figure out the problem, please stop by https://gitter.im/eslint/eslint to chat with the team.

Associated revisions

Revision 9d366d05 (diff)
Added by Tomáš Strachota almost 3 years ago

Fixes #21448 - execute npm run lint from context of plugins

History

#1 Updated by The Foreman Bot almost 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4946 added

#2 Updated by Walden Raines almost 3 years ago

  • Target version changed from 224 to 228

#3 Updated by Daniel Lobato Garcia almost 3 years ago

  • Legacy Backlogs Release (now unused) set to 296

#4 Updated by Anonymous almost 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF