Skip to content

Conversation

@avosalmon
Copy link

@avosalmon avosalmon commented Feb 5, 2025

Running npm run lint throws an error because the ESLint config file does not exist.

This PR adds an ESLint flat config file (the new config system introduced in ESLint 9) and fixes some lint errors.

I have added the following plugins

eabc060 fixes the lint errors below.

CleanShot 2025-02-05 at 13 56 04


export default function SettingsLayout({ children }: { children: React.ReactNode }) {
const currentPath = window.location.pathname;
const currentItem = sidebarNavItems.find((item) => currentPath === item.url);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tnylea ESLint complained because currentItem is not used. Any plans to use it?

Copy link
Contributor

@tnylea tnylea Feb 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right! currentItem is not needed as currentPath is what we need to show an active state for the current setting menu item. I'll get this merged in today 👏 Thanks!

@avosalmon avosalmon changed the title Set up ESLint ESLint Feb 5, 2025
@avosalmon
Copy link
Author

I wonder if we should run PHPStan, Pint, ESLint, and Prettier on CI to catch and fix issues before merging a PR.

@tnylea
Copy link
Contributor

tnylea commented Feb 5, 2025

I wonder if we should run PHPStan, Pint, ESLint, and Prettier on CI to catch and fix issues before merging a PR.

I'm going to work on that today! This would be great to add as an action that automatically runs when someone pushes new code.

Thanks again for this PR. Getting it merged in now 🤘

@tnylea tnylea merged commit 4106212 into develop Feb 5, 2025
1 check passed
@taylorotwell taylorotwell deleted the eslint branch February 14, 2025 14:48
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.

3 participants