2022-03-23 22:00:30 +00:00
|
|
|
/** @type {import("eslint").Linter.Config} */
|
2022-02-11 19:33:35 +00:00
|
|
|
module.exports = {
|
2022-05-17 19:53:29 +00:00
|
|
|
root: true,
|
2022-08-11 19:17:56 +00:00
|
|
|
extends: ["plugin:playwright/playwright-test", "next", "plugin:prettier/recommended", "turbo"],
|
2023-02-14 23:26:29 +00:00
|
|
|
plugins: ["unused-imports"],
|
2022-05-17 19:53:29 +00:00
|
|
|
parserOptions: {
|
|
|
|
tsconfigRootDir: __dirname,
|
|
|
|
project: ["./apps/*/tsconfig.json", "./packages/*/tsconfig.json"],
|
|
|
|
},
|
2022-02-11 19:33:35 +00:00
|
|
|
settings: {
|
|
|
|
next: {
|
|
|
|
rootDir: ["apps/*/", "packages/*/"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
2022-05-17 19:31:49 +00:00
|
|
|
"@next/next/no-img-element": "off",
|
2022-02-18 16:53:45 +00:00
|
|
|
"@next/next/no-html-link-for-pages": "off",
|
|
|
|
"jsx-a11y/role-supports-aria-props": "off", // @see https://github.com/vercel/next.js/issues/27989#issuecomment-897638654
|
2022-07-12 17:50:04 +00:00
|
|
|
"react/jsx-curly-brace-presence": ["error", { props: "never", children: "never" }],
|
2022-07-12 20:57:49 +00:00
|
|
|
"react/self-closing-comp": ["error", { component: true, html: true }],
|
2023-02-14 23:26:29 +00:00
|
|
|
"@typescript-eslint/no-unused-vars": "off",
|
|
|
|
"unused-imports/no-unused-imports": "error",
|
|
|
|
"unused-imports/no-unused-vars": [
|
|
|
|
"warn",
|
|
|
|
{ vars: "all", varsIgnorePattern: "^_", args: "after-used", argsIgnorePattern: "^_" },
|
|
|
|
],
|
2022-02-11 19:33:35 +00:00
|
|
|
},
|
|
|
|
overrides: [
|
|
|
|
{
|
2022-05-18 16:05:25 +00:00
|
|
|
files: ["*.ts", "*.tsx"],
|
2022-07-11 23:35:50 +00:00
|
|
|
extends: ["plugin:@typescript-eslint/recommended", "plugin:@calcom/eslint/recommended"],
|
|
|
|
plugins: ["@typescript-eslint", "@calcom/eslint"],
|
2022-05-18 16:05:25 +00:00
|
|
|
parser: "@typescript-eslint/parser",
|
2023-02-16 22:39:57 +00:00
|
|
|
rules: {
|
|
|
|
"@typescript-eslint/consistent-type-imports": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
prefer: "type-imports",
|
|
|
|
// TODO: enable this once prettier supports it
|
|
|
|
// fixStyle: "inline-type-imports",
|
|
|
|
fixStyle: "separate-type-imports",
|
|
|
|
disallowTypeAnnotations: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2022-05-18 16:05:25 +00:00
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ["playwright/**/*.{tsx,ts}"],
|
|
|
|
rules: {
|
|
|
|
"no-undef": "off",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
files: ["playwright/**/*.{js,jsx}"],
|
2022-02-11 19:33:35 +00:00
|
|
|
rules: {
|
|
|
|
"no-undef": "off",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|