Closed kvz closed 3 years ago
upgrade workflow that worked for me:
git checkout main || git checkout master
git pull
git checkout -b linting2
yarn add -D eslint-config-transloadit@2.0.0-0 eslint-plugin-react-hooks eslint-plugin-promise@^4.3.1 eslint-plugin-import eslint-plugin-node eslint-plugin-prefer-import
react/jsx-one-expression-per-line
no-await-in-loop
Upgrade linting to 2.0.0-0
DEBUG=eslint:cli-engine ./node_modules/.bin/eslint . --fix --quiet
(optionally without --quiet
to also see warnings).eslintrc.js
Fix linting
Upgrade linting to 2.0.0-0
which Refs: https://github.com/transloadit/eslint-config-transloadit/issues/13
and optionally adds conflict resolve tip.Question: is there a trick to upgrade the peerdeps, just like installing them? Tried running that and it picked old versions. Then tried with @2.0.0-0 and it errored out
which peer deps are giving you an error? peer deps are just normal deps, nothing special about them (just a flag saying that a subdependency requires the peer deps)
I took my liberty of updating your comment above to add -D
in yarn add
as it is most common to have linting as part of dev dependnecies to avoid them being installed in production or by consuming apps.
As for api2 I see that all linting is part of dependencies
- I'm not sure if that is deliberate. It may severely increase install times on production servers when using yarn --prod
I also had to run the following:
yarn add -D eslint-plugin-promise@^4.3.1 eslint-plugin-import eslint-plugin-node
which peer deps are giving you an error? peer deps are just normal deps, nothing special about them (just a flag saying that a subdependency requires the peer deps)
I basically meant: this line was quite convenient for installing peerDeps: npx install-peerdeps --dev eslint-config-transloadit
i thought, but i could not change it to automatically install/upgrade to the peerDeps of 2.0.0-0. For instance, just running that command defaulted to 1.3 versions. And running npx install-peerdeps --dev eslint-config-transloadit@2.0.0-0
errored out.
Thanks for the other additions, changed the instructions accordingly (i think) 👌
As for api2 I see that all linting is part of
dependencies
- I'm not sure if that is deliberate. It may severely increase install times on production servers when usingyarn --prod
Ah yes, and you make a good point. The api works a bit different tho so in practice it doesn't matter there. But we might as well do it right everywhere :ok_hand:
I basically meant: this line was quite convenient for installing peerDeps:
npx install-peerdeps --dev eslint-config-transloadit
i thought, but i could not change it to automatically install/upgrade to the peerDeps of 2.0.0-0. For instance, just running that command defaulted to 1.3 versions. And runningnpx install-peerdeps --dev eslint-config-transloadit@2.0.0-0
errored out.
Ah. I managed to get this command to work to list out the deps:
npm info "eslint-config-transloadit@2.0.0-0" peerDependencies
{
'@babel/core': '^7.13.10',
'@babel/eslint-parser': '^7.13.10',
'@babel/eslint-plugin': '^7.13.10',
eslint: '^7.22.0',
'eslint-plugin-import': '^2.22.1',
'eslint-plugin-jest': '^24.3.1',
'eslint-plugin-jsx-a11y': '^6.4.1',
'eslint-plugin-node': '^11.1.0',
'eslint-plugin-promise': '^4.3.1',
'eslint-plugin-react': '^7.22.0',
'eslint-plugin-react-hooks': '^4.2.0'
}
but I think peerDeps for v1 and v2.0.0-0 are the same, no?
https://github.com/transloadit/eslint-config-transloadit/blame/main/package.json
Ah okay that clears things up, thanks!
To go 2.0.0 after going 2.0.0-0:
yarn add -D eslint-config-transloadit
# remove any reference of: no-underscore-dangle
yarn fix
# commit as: Upgrade to linting 2.0.0 (final release)
Upgraded all consumers, just in master, to the final release.
Big diffs due to commas being added every so and so lines can induce large merge conflicts. Here is a tip for the involved projects to deal with their pending affected PRs https://gist.github.com/kvz/b205470849f0489549f43c7a27a406dd