ixartz / Next-js-Boilerplate

🚀🎉📚 Boilerplate and Starter for Next.js 14+ with App Router and Page Router support, Tailwind CSS 3.4 and TypeScript ⚡️ Made with developer experience first: Next.js + TypeScript + ESLint + Prettier + Drizzle ORM + Husky + Lint-Staged + Vitest + Testing Library + Playwright + Storybook + Commitlint + VSCode + Netlify + PostCSS + Tailwind CSS ✨
https://nextjs-boilerplate.com
MIT License
9.22k stars 1.77k forks source link

Eslint conflicts with sorting rules #299

Closed zawarudo closed 2 months ago

zawarudo commented 2 months ago

Hello @ixartz

After the recent PR #297 I found there are some conflicting rules still that cause the linter to not be able to resolve / auto fix no matter how you format it.

image

Changing the rule like so seemed to resolve the conflict.

     'sort-imports': 'off', // Avoid conflicts with `simple-import-sort` plugin

I've made a branch reproducing the issue and the fix. https://github.com/zawarudo/Next-js-Boilerplate/tree/setup/lint-sort-conflicts-repoduction

How to reproduce.

I've opened a PR for this, thanks!

ixartz commented 2 months ago

Thank you for this detailed error reporting. Indeed, it seems we need to disable both rules: 'import/order' and 'sort-imports'

This is something new, I totally rebuild all the eslint configuration from scratch with the new flat config.

ixartz commented 2 months ago

Thank you for reporting and opening the PR. I just merge it!