dubinc / dub

Open-source link management infrastructure. Loved by modern marketing teams like Vercel, Raycast, and Perplexity.
https://dub.co
GNU Affero General Public License v3.0
17.87k stars 1.89k forks source link

Proposal: ESlint rules across repository #581

Closed versecafe closed 2 months ago

versecafe commented 8 months ago

Proposed change

Add eslint package containing a base rule set for the UI library, Utils lib, and the actual app, have them set to use the warn-only plugin to not interrupt current function but rather to serve as a guide for development and to help keep standards across the repo as dozens of people occasionally contribute.

Currently the "lint" command in every single package and app it is set up in does nothing, in @dub/utils and @dub/ui it is set to point to src/ which applies to no files and has no actual rules configured when set to src/**/* to actually point to files, and the Next config could be as simple as:

{
  "extends": "next/core-web-vitals",
  "plugins": ["only-warn"]
}

Or could be done with a full in depth config specifically setup with turborepo in mind.

I'd be happy to implement this and get everything into compliance once the lint rules are agreed on but I wanted to bring up the idea before going off to set it up.

@steven-tey What's your opinion on this?

linear[bot] commented 8 months ago

ENG-171 Proposal: ESlint rules across repository