When using CRA with an additional linter I hit problems with matching peer dependency versions with eslint-config-react-app. It has absolute requirements for its peer dependencies.
{
"peerDependencies": {
"babel-eslint": "7.0.0",
"eslint": "3.8.1",
"eslint-plugin-flowtype": "2.21.0",
"eslint-plugin-import": "2.0.1",
"eslint-plugin-jsx-a11y": "2.2.3",
"eslint-plugin-react": "6.4.1"
}
}
(https://github.com/facebookincubator/create-react-app/blob/a5f760bab9b1876df13ac4345a4b42655fec46fa/packages/eslint-config-react-app/package.json)
Specifically babel-eslint, eslint, and eslint-plugin-react is hard not to clash with. I had another eslint-config that listed all three of them with incompatible versions. As an example it listed eslint as ^3.11.0.
Had eslint-config-react-app used the caret-style dependencies for it's peer dependencies, it would have worked out fine.
In general, I understand why you might want to absolutify your linter dependencies - there's nothing more annoying than lint errors showing up on CI that you didn't catch locally. But in this case, where it's very common to add another linter setup I think it might be worth it, to be more lax about the requirements.
For my case, pinning the versions listed in peerDeps of eslint-config-react-app got rid of the peer dependency warnings, after I had downgraded the requirements in the other eslint-config I used.
Would you be open to widen the peer dependency version ranges in eslint-config-react-app?
When using CRA with an additional linter I hit problems with matching peer dependency versions with
eslint-config-react-app. It has absolute requirements for its peer dependencies.{ "peerDependencies": { "babel-eslint": "7.0.0", "eslint": "3.8.1", "eslint-plugin-flowtype": "2.21.0", "eslint-plugin-import": "2.0.1", "eslint-plugin-jsx-a11y": "2.2.3", "eslint-plugin-react": "6.4.1" } }(https://github.com/facebookincubator/create-react-app/blob/a5f760bab9b1876df13ac4345a4b42655fec46fa/packages/eslint-config-react-app/package.json)
Specifically
babel-eslint,eslint, andeslint-plugin-reactis hard not to clash with. I had another eslint-config that listed all three of them with incompatible versions. As an example it listedeslintas^3.11.0.Had
eslint-config-react-appused the caret-style dependencies for it's peer dependencies, it would have worked out fine.In general, I understand why you might want to absolutify your linter dependencies - there's nothing more annoying than lint errors showing up on CI that you didn't catch locally. But in this case, where it's very common to add another linter setup I think it might be worth it, to be more lax about the requirements.
For my case, pinning the versions listed in peerDeps of
eslint-config-react-appgot rid of the peer dependency warnings, after I had downgraded the requirements in the other eslint-config I used.Would you be open to widen the peer dependency version ranges in
eslint-config-react-app?