#Trying to make clean project

1 messages · Page 1 of 1 (latest)

gilded swan
#

Hey, I am trying to make clean and scalable projects.

This is how my eslint looks

import { FlatCompat } from "@eslint/eslintrc"
import { dirname } from "path"
import { fileURLToPath } from "url"

const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)

// Pass recommendedConfig to FlatCompat
const compat = new FlatCompat({
  baseDirectory: __dirname,
  recommendedConfig: {
    eslint: { extends: ["eslint:recommended"] },
  },
})

const eslintConfig = [
  {
    ignores: ["node_modules", ".next", "public"],
  },
  ...compat.config({
    extends: ["next/core-web-vitals", "prettier"],
  }),
]

export default eslintConfig

and my prettier

{
  "semi": false,
  "singleQuote": false,
  "tabWidth": 2,
  "trailingComma": "es5",
  "printWidth": 100,
  "plugins": ["prettier-plugin-organize-imports", "prettier-plugin-tailwindcss"]
}

Any other suggestions?

fresh monolithBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

remote glen
#

take a look at create-t3-app it has great strictness for tsconfig and eslint. you can then iterate from there if you want some other rules for the project.