-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add prettier and eslint #638
Conversation
c13bf0d
to
8e57fcc
Compare
Was also thinking of introducing codsniffer linting, what standards does this project follow? Just PSR2? |
Ah, never mind, I just noticed the cs fixer config |
9d1d01d
to
b292c49
Compare
b292c49
to
1b5ce0f
Compare
Do you reckon there is anything we can do about the following? I know some are indirect dependencies, but some are root dependencies.
|
"popper.js": "^1.14.3", | ||
"sass": "^1.32.6", | ||
"sass-loader": "^10.0.0" | ||
"eslint-loader": "^4.0.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't use the deprecated loader here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about that but encore doesn't yet have first class support for eslint-webpack-plugin. Would be better to write a custom rule for that now and remove it later on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, it's just eventually replacing two lines of code with one hopefully, let me add that so it makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, then maybe wait for Encore to support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already pushed a new commit that adds the plugin for that, that should continue to work even after encore supports it natively. Gonna be cleanup either way so might as well use a dependency that isn't deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, i was committing too fast
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, as that's simple enough, it is fine with me
popper.js is not an unused dependency. It satisfies the peerDependency of bootstrap @alcohol for the warnings, the |
OK, I understood it. npm 7 is installing peer dependencies by default, even when they are optional peer dependencies (which looks weird to me as there is no way to omit them then) |
Maybe that was why |
yeah, and that's actually the expected way for peer dependencies to work (neither pnpm nor yarn are automatically installing missing peer dependencies, and npm 6 was not doing it either) |
Since I seem unable to push to your branch, I added some changes here: https://github.com/composer/satis/tree/theimbender-dependency-update Any idea why |
Probably the peer dependency thing, let me add back popper |
Seems resolved though now that I updated to node 15. |
Also if I run
|
that's because your package-lock.json uses the v2 format introduced in npm 7.x |
I see. Is there a way to specify what node/npm version our project uses, like composer can reference what php version we support? |
Should i require npm 7.x? |
Great, any recommendations? |
If 7.x introduces changes that are not BC with 6.x, then yes I would prefer to target the latest versions from here on forwards. |
if we use a npm 7.x lock file, we should indeed require npm 7 in the package.json to avoid weird issues. |
Ok I rebased https://github.com/composer/satis/tree/theimbender-dependency-update But if I locally run |
ok, let me run that exact same command because there might be something wonky with my node_modules then |
yeah i'm gonna just do that every time i commit any change involving a lock file, less headache. The command |
Yep! I just get the one expected diff now:
Nothing else. 👍 |
Merged via aba12d6...ff2da4f |
composer test
so you can run the project's tests with the same version of PHPUnit that the CI checks will use