I ran into a similar problem, but found a solution to this problem. I thought it was worth sharing.
To install the correct versions of each eslint configuration associated with a package, you can run the following command:
npm info " eslint-config-airbnb@latest " peerDependencies
You can get an exact dependency on peers that are listed when executing the command:
for example, on exits (with a response date) will cause the following:
{ eslint: '^3.19.0 || ^4.3.0', 'eslint-plugin-jsx-a11y': '^5.1.1', 'eslint-plugin-import': '^2.7.0', 'eslint-plugin-react': '^7.1.0' }
From the above, you can find out exactly what dependencies to install for the current one (last build).
If you want to install all the dependencies at once (only for Linux / OSX users) Use the command below:
( export PKG=eslint-config-airbnb; npm info " $PKG@latest " peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev " $PKG@latest " )
More details here .
source share