Skip to content

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

@vercel
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

@vercel
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.

"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