setuping prettier and eslint with new next app

hey folks here is my eslint config and prettier config I'm using with the t3-app
/** @type {import("eslint").Linter.Config} */
const config = {
  parser: "@typescript-eslint/parser",
  parserOptions: {
    project: true,
  },
  plugins: ["@typescript-eslint"],
  extends: [
    "plugin:prettier/recommended",
    "plugin:@next/next/recommended",
    "plugin:@typescript-eslint/recommended-type-checked",
    "plugin:@typescript-eslint/stylistic-type-checked",
  ],
  rules: {
    // These opinionated rules are enabled in stylistic-type-checked above.
    // Feel free to reconfigure them to your own preference.
    "prettier/prettier": ["error"],
    "@typescript-eslint/array-type": "off",
    "@typescript-eslint/consistent-type-definitions": "off",

    "@typescript-eslint/consistent-type-imports": [
      "warn",
      {
        prefer: "type-imports",
        fixStyle: "inline-type-imports",
      },
    ],
    "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
    "@typescript-eslint/require-await": "off",
    "@typescript-eslint/no-misused-promises": [
      "error",
      {
        checksVoidReturn: { attributes: false },
      },
    ],
  },
};

module.exports = config;

/** @type {import('prettier').Config & import('prettier-plugin-tailwindcss').options} */
const config = {
  plugins: ["prettier-plugin-tailwindcss"],
};

export default config;

and with this I do get the eslint and prettier warning when I do something wrong I have attached the image also when I save the file it does automatically formats the file but the problem is when I use same config with new next-app I do not get any warning nor it formats when I save the file here are the prettier and eslint packages I'm using in the t3-app
@next/eslint-plugin-next,
@types/eslint,
@typescript-eslint/eslint-plugin,
@typescript-eslint/parser,
eslint,
eslint-config-prettier,
eslint-plugin-prettier,
prettier,
prettier-plugin-tailwindcss,
image.png
image.png
image.png
Was this page helpful?