You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If putout is installed globally (as recommended, via npm i putout -g) but eslint and a plugin, such as eslint-plugin-prettier are installed locally (via npm i eslint eslint-plugin-prettier --save-dev) and enabled in the .eslintrc.js file, attempting to run putout will fail.
Example .eslintrc.js file (must exist in the current working directory):
Command tested: putout --fix source.js. Note that the error does not occur when --fix is not specified (such as putout source.js).
Example of the error:
Error: Cannot find module 'eslint-plugin-prettier'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at loadPlugin (/Users/sgilroy/.nvm/versions/node/v8.15.0/lib/node_modules/putout/lib/eslint.js:26:12)
at /Users/sgilroy/.nvm/versions/node/v8.15.0/lib/node_modules/putout/lib/eslint.js:36:25
at getLinter (/Users/sgilroy/.nvm/versions/node/v8.15.0/lib/node_modules/putout/lib/eslint.js:57:28)
at module.exports (/Users/sgilroy/.nvm/versions/node/v8.15.0/lib/node_modules/putout/lib/eslint.js:85:36)
at /Users/sgilroy/.nvm/versions/node/v8.15.0/lib/node_modules/putout/lib/process-file.js:77:38
at Array.map (<anonymous>)
If putout is installed globally (as recommended, via
npm i putout -g
) buteslint
and a plugin, such aseslint-plugin-prettier
are installed locally (vianpm i eslint eslint-plugin-prettier --save-dev
) and enabled in the .eslintrc.js file, attempting to runputout
will fail.Example .eslintrc.js file (must exist in the current working directory):
Command tested:
putout --fix source.js
. Note that the error does not occur when--fix
is not specified (such asputout source.js
).Example of the error:
Project to use to reproduce the problem:
eslint-plugin-error.zip
Workaround: install the eslint plugin globally
npm i eslint-plugin-prettier -g
.The text was updated successfully, but these errors were encountered: