Skip to content
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

[2.x] Add option to install ESLint with Prettier #412

Merged
merged 10 commits into from
Sep 17, 2024

Conversation

avosalmon
Copy link
Contributor

@avosalmon avosalmon commented Sep 16, 2024

CleanShot 2024-09-12 at 09 55 53

This PR introduces an option to install and configure ESLint with Prettier for the Inertia stacks.
Selecting the ESLint with Prettier option will install ESLint and Prettier with some relevant plugins and add config files.

Note

Most of the changes for the stubs are code style changes by CI (14759fc, 60a5a2a). Following the commit logs would make it easier to review the changes rather than diving into the files changed.

Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@avosalmon avosalmon changed the title Add option to install ESLint with Prettier [2.x] Add option to install ESLint with Prettier Sep 16, 2024
@avosalmon avosalmon marked this pull request as ready for review September 17, 2024 00:31
@taylorotwell taylorotwell merged commit 6f41572 into laravel:2.x Sep 17, 2024
15 of 16 checks passed
@taylorotwell
Copy link
Member

Thanks!

@hafezdivandari
Copy link

hafezdivandari commented Sep 17, 2024

This has messed up the CI. cc @crynobone @driesvints

image

@kjjd84
Copy link

kjjd84 commented Sep 25, 2024

this introduced a ton of deprecation warnings to any apps that use this option

@avosalmon
Copy link
Contributor Author

@kjjd84 Can you elaborate on what kind of deprecation warnings you got?

@kjjd84
Copy link

kjjd84 commented Sep 25, 2024

@kjjd84 Can you elaborate on what kind of deprecation warnings you got?

npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead

@avosalmon
Copy link
Contributor Author

@kjjd84 The warnings are coming from eslint^8.57.0. However, we are not able to upgrade to ESLint 9 because some of the plugins don't support it yet. We will upgrade ESLint once all the plugins are ready for ESLint 9.

npm install -D eslint@^8.57.0
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead

@avosalmon
Copy link
Contributor Author

@kjjd84 Vue and Next.js CLIs are also using ESLint 8. I got the same deprecation warnings when I scaffolded Vue and Next apps. It's unavoidable during the transition period. We will upgrade to ESLint 9 as soon as they migrate to ESLint 9.

@whoami15
Copy link

whoami15 commented Oct 2, 2024

@avosalmon I noticed that when using the Laravel installer, the "ESLint with Prettier" option is not listed among the optional features. Will this be added there as well?

SCR-20241002-jmkn

@avosalmon
Copy link
Contributor Author

@whoami15 Let me add it to the installer. Thanks for bringing this up!

@avosalmon
Copy link
Contributor Author

@whoami15 It will be available in the next release laravel/installer#361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants