transloadit / eslint-config-transloadit

Transloadit eslint rules
MIT License
2 stars 1 forks source link

Roll out v2.0.0-0 across main js repos #13

Closed kvz closed 3 years ago

kvz commented 3 years ago

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

kvz commented 3 years ago

upgrade workflow that worked for me:

kvz commented 3 years ago

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

mifi commented 3 years ago

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)

mifi commented 3 years ago

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
kvz commented 3 years ago

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.

kvz commented 3 years ago

Thanks for the other additions, changed the instructions accordingly (i think) 👌

kvz commented 3 years ago

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

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:

mifi commented 3 years ago

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.

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

kvz commented 3 years ago

Ah okay that clears things up, thanks!

kvz commented 3 years ago

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)
kvz commented 3 years ago

Upgraded all consumers, just in master, to the final release.