chore: upgrade eslint 9 (#24002)
* add eslint package * upgrade lint * remove linting for generated files from trpc * ts imports * add missing features lint script * enable turbo ui * reference workspace deps correctly * fixes * Fix eslint test * Fix eslint test * npm run all back * fix e2e * fix e2e * fix e2e --------- Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
1 parent
57150d992e
commit
96855ea391
155 files changed
+1918
-1495
No files matched your search
@@ -1,100 +0,0 @@
|
||||
/** @type {import("eslint").Linter.Config} */
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: [
|
||||
"plugin:playwright/playwright-test",
|
||||
"next",
|
||||
"plugin:prettier/recommended",
|
||||
"turbo",
|
||||
"plugin:you-dont-need-lodash-underscore/compatible-warn",
|
||||
],
|
||||
plugins: ["unused-imports"],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ["./apps/*/tsconfig.json", "./packages/*/tsconfig.json"],
|
||||
},
|
||||
settings: {
|
||||
next: {
|
||||
rootDir: ["apps/*/", "packages/*/"],
|
||||
},
|
||||
},
|
||||
ignorePatterns: ["**/node_modules/**", "**/dist/**", "**/build/**", "**/coverage/**", "**/.turbo/**"],
|
||||
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
|
||||
"playwright/no-page-pause": "error",
|
||||
"react/jsx-curly-brace-presence": ["error", { props: "never", children: "never" }],
|
||||
"react/self-closing-comp": ["error", { component: true, html: true }],
|
||||
|
||||
// In a newer version of react/no-danger, this is a valid config
|
||||
// to allow errors in custom components
|
||||
// but it would error anyway, because of a bug, not yet fixed
|
||||
// PR that enables this config: https://github.com/jsx-eslint/eslint-plugin-react/pull/3748
|
||||
// Issue still not fixed: https://github.com/jsx-eslint/eslint-plugin-react/issues/3833
|
||||
// "react/no-danger": ["error", { customComponentNames: ["*"] }],
|
||||
|
||||
"react/no-danger": "error",
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"warn",
|
||||
{
|
||||
vars: "all",
|
||||
varsIgnorePattern: "^_",
|
||||
args: "after-used",
|
||||
argsIgnorePattern: "^_",
|
||||
destructuredArrayIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
"unused-imports/no-unused-imports": "error",
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
patterns: [],
|
||||
},
|
||||
],
|
||||
"prefer-template": "error",
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ["*.ts", "*.tsx"],
|
||||
extends: ["plugin:@typescript-eslint/recommended", "plugin:@calcom/eslint/recommended"],
|
||||
plugins: ["@typescript-eslint", "@calcom/eslint"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
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,
|
||||
},
|
||||
],
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ["**/playwright/**/*.{tsx,ts}"],
|
||||
rules: {
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"no-undef": "off",
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["apps/website/**/*.{tsx,ts}"],
|
||||
rules: {
|
||||
/** TODO: Remove once website router is migrated */
|
||||
"@calcom/eslint-plugin-eslint/deprecated-imports-next-router": "off",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
files: ["**/playwright/**/*.{js,jsx}"],
|
||||
rules: {
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"no-undef": "off",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -10,7 +10,7 @@
|
||||
"prettier-preset.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"@calcom/eslint-plugin-eslint": "*",
|
||||
"@calcom/eslint-plugin-eslint": "workspace:*",
|
||||
"@todesktop/tailwind-variants": "^1.0.0",
|
||||
"eslint-config-next": "^13.2.1",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
@@ -26,9 +26,6 @@
|
||||
"@trivago/prettier-plugin-sort-imports": "4.1.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.52.0",
|
||||
"@typescript-eslint/parser": "^5.52.0",
|
||||
"eslint": "^8.34.0",
|
||||
"eslint-plugin-unused-imports": "^2.0.0",
|
||||
"eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0",
|
||||
"prettier": "^2.8.6",
|
||||
"prettier-plugin-tailwindcss": "^0.2.5",
|
||||
"tailwind-scrollbar": "^2.0.1",
|
||||
|
||||
Reference in new issue
Block a user