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

configured eslint (without formatting existing files) #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlbertArakelyan
Copy link

@AlbertArakelyan AlbertArakelyan commented Dec 10, 2024

Configure Eslint

Configured ESLint with the latest version, by the way it surprised with its new 9th version 😁.
See the changelog here: https://eslint.org/blog/2024/04/eslint-v9.0.0-released/

Applied changes

  • Added ESlint package and a few plugins related to it as dev dependencies
  • Replaced next lint with eslint, so we run eslint directly rather than next runs it
  • Added eslint.config.mjs file, which is a new config file for eslint 9 rather than .eslintrc.js
  • Applied some closer to advanced rules in eslint configs (we can extend in future if needed)

What can be added in future

  • Even more advanced configs such as ordering tailwind classes and imports (personally I don't like these rules)
  • Some more rules fore prettier, but current also looked fine, but putting mine here just in case 🙂

.prettierrc

{
  "printWidth": 150,
  "trailingComma": "all",
  "singleQuote": true,
  "semi": true,
  "jsxSingleQuote": false,
  "quoteProps": "as-needed",
  "bracketSpacing": true,
  "bracketSameLine": true,
  "useTabs": false,
  "tabWidth": 2,
  "arrowParens": "avoid",
  "endOfLine": "auto",
  "plugins": ["prettier-plugin-tailwindcss"]
}

Related issue: #36

Copy link

vercel bot commented Dec 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
voice-assistant-web-cctq ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 7:13pm

Copy link

vercel bot commented Dec 10, 2024

@AlbertArakelyan is attempting to deploy a commit to the ntegrals' projects Team on Vercel.

A member of the Team first needs to authorize it.

@@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "eslint src",
"lint:fix": "eslint src --fix"
Copy link
Author

Choose a reason for hiding this comment

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

we can handle src directory passing part from eslint config file in future I think.

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.

1 participant