cal/packages/config/eslint-preset.js
Omar López a2a5d48037
Upgrade turborepo v4 (#3804)
* Upgrades to turborepo 4

Adds turbo eslint config

* Linting according to turbo eslint plugin

* Add missing variables to turbo config

* Adds more missing env vars to turbo json

* Update turbo.json

* Update turbo.json

* Matches local lint with CI lint

* Update turbo.json

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-08-11 13:17:56 -06:00

45 lines
1.3 KiB
JavaScript

/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["plugin:playwright/playwright-test", "next", "plugin:prettier/recommended", "turbo"],
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
project: ["./apps/*/tsconfig.json", "./packages/*/tsconfig.json"],
},
settings: {
next: {
rootDir: ["apps/*/", "packages/*/"],
},
},
rules: {
"@next/next/no-img-element": "off",
"@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
"react/jsx-curly-brace-presence": ["error", { props: "never", children: "never" }],
"react/self-closing-comp": ["error", { component: true, html: true }],
},
overrides: [
{
files: ["*.ts", "*.tsx"],
extends: ["plugin:@typescript-eslint/recommended", "plugin:@calcom/eslint/recommended"],
plugins: ["@typescript-eslint", "@calcom/eslint"],
parser: "@typescript-eslint/parser",
overrides: [
{
files: ["playwright/**/*.{tsx,ts}"],
rules: {
"no-undef": "off",
},
},
],
},
{
files: ["playwright/**/*.{js,jsx}"],
rules: {
"no-undef": "off",
},
},
],
};