diff --git a/app/client/.eslintrc.base.json b/app/client/.eslintrc.base.json index 4231bb9529..8a12bcfa8c 100644 --- a/app/client/.eslintrc.base.json +++ b/app/client/.eslintrc.base.json @@ -3,6 +3,12 @@ "$schema": "http://json.schemastore.org/eslintrc", "root": true, "parser": "@typescript-eslint/parser", + "ignorePatterns": [ + "jest.config.js", + "jest.setup.ts", + "rollup.config.js", + ".eslintrc.js" + ], "plugins": [ "react", "@typescript-eslint", @@ -25,9 +31,11 @@ "sourceType": "module", // Allows for the use of imports "ecmaFeatures": { "jsx": true // Allows for the parsing of JSX - } + }, + "project": "./tsconfig.json" }, "rules": { + "@typescript-eslint/strict-boolean-expressions": "error", "@typescript-eslint/no-explicit-any": "error", "@typescript-eslint/no-unused-vars": "error", "jest/no-focused-tests": "error", diff --git a/app/client/.eslintrc.js b/app/client/.eslintrc.js index d4b30e5a1f..f1de8424c5 100644 --- a/app/client/.eslintrc.js +++ b/app/client/.eslintrc.js @@ -13,6 +13,7 @@ const baseNoRestrictedImports = const eslintConfig = { extends: ["./.eslintrc.base.json"], rules: { + "@typescript-eslint/strict-boolean-expressions": "off", "@typescript-eslint/no-explicit-any": "off", "react/display-name": "off", "react/prop-types": "off", diff --git a/app/client/.lintstagedrc b/app/client/.lintstagedrc index 9c4c717e14..1f4e72ac35 100644 --- a/app/client/.lintstagedrc +++ b/app/client/.lintstagedrc @@ -1,7 +1,7 @@ { "src/**/*.{js,ts,tsx}": ["npx eslint --fix"], "src/**/*.{js,ts,tsx,css,md,json}": ["npx prettier --write"], - "cypress/**/*.{js,ts}": ["npx eslint --fix"], + "cypress/**/*.{js,ts}": ["cd ./cypress && npx eslint -c .eslintrc.json --fix"], "cypress/**/*.{js,ts,json}": ["npx prettier --write"], "packages/**/*.{js,ts,tsx}": ["npx eslint --fix"], "packages/**/*.{js,ts,tsx,css,mdx,json}": ["npx prettier --write"] diff --git a/app/client/cypress/.eslintrc.json b/app/client/cypress/.eslintrc.json index 9b907362ee..9c7199817a 100644 --- a/app/client/cypress/.eslintrc.json +++ b/app/client/cypress/.eslintrc.json @@ -1,9 +1,11 @@ { "extends": ["../.eslintrc.base.json"], + "ignorePatterns": ["locators", "fixtures"], "env": { "cypress/globals": true }, "rules": { + "@typescript-eslint/strict-boolean-expressions": "off", "@typescript-eslint/no-array-constructor": "off", "@typescript-eslint/no-namespace": "off", "@typescript-eslint/no-unused-vars": "off", diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/Audio_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/Audio1_spec.ts similarity index 100% rename from app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/Audio_spec.ts rename to app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/Audio1_spec.ts diff --git a/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder1_spec.ts similarity index 100% rename from app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder_spec.ts rename to app/client/cypress/e2e/Regression/ClientSide/Widgets/Audio/AudioRecorder1_spec.ts diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Mongo_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/Mongo1_spec.ts similarity index 100% rename from app/client/cypress/e2e/Regression/ServerSide/QueryPane/Mongo_Spec.ts rename to app/client/cypress/e2e/Regression/ServerSide/QueryPane/Mongo1_spec.ts diff --git a/app/client/cypress/tsconfig.json b/app/client/cypress/tsconfig.json index 2ed43b3a40..1e80a45b6e 100644 --- a/app/client/cypress/tsconfig.json +++ b/app/client/cypress/tsconfig.json @@ -32,5 +32,5 @@ "noFallthroughCasesInSwitch": true, "types": ["cypress", "node", "cypress-tags", "cypress-real-events"] }, - "include": ["/**/*.ts", "../packages/rts/src/version.js"] + "include": ["./", "../packages/rts/src/version.js"] } diff --git a/app/client/package.json b/app/client/package.json index 9d876ff5aa..e5b6f1dc09 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -34,7 +34,7 @@ "generate:widget": "plop --plopfile generators/index.js", "postinstall": "node cypress/apply-patches.js && yarn init-husky", "storybook": "yarn workspace @design-system/storybook storybook", - "lint": "eslint --cache --ext .js,.ts,.tsx ./src && eslint --cache --ext .js,.ts ./cypress", + "lint": "eslint --cache ./src && cd ./cypress && eslint -c .eslintrc.json --cache ./", "g:lint": "cd $INIT_CWD && eslint --cache .", "lint:ci": "yarn workspaces foreach -ptv run lint", "prettier": "prettier --check ./src && prettier --check ./cypress", diff --git a/app/client/packages/ast/.eslintrc.json b/app/client/packages/ast/.eslintrc.json index f6cf7cd422..d17162040c 100644 --- a/app/client/packages/ast/.eslintrc.json +++ b/app/client/packages/ast/.eslintrc.json @@ -2,6 +2,7 @@ "extends": ["../../.eslintrc.base.json"], "ignorePatterns": ["build"], "rules": { + "@typescript-eslint/strict-boolean-expressions": "off", "@typescript-eslint/no-explicit-any": "off" } } diff --git a/app/client/packages/design-system/headless/src/components/Button/src/Button.tsx b/app/client/packages/design-system/headless/src/components/Button/src/Button.tsx index 5430dba777..9f4f8444cc 100644 --- a/app/client/packages/design-system/headless/src/components/Button/src/Button.tsx +++ b/app/client/packages/design-system/headless/src/components/Button/src/Button.tsx @@ -20,7 +20,13 @@ export type ButtonRef = React.Ref; type ButtonRefObject = React.RefObject; const _Button = (props: ButtonProps, ref: ButtonRef) => { - const { autoFocus, children, className, draggable, isDisabled } = props; + const { + autoFocus, + children, + className, + draggable = false, + isDisabled = false, + } = props; const { hoverProps, isHovered } = useHover({ isDisabled }); const { focusProps, isFocusVisible } = useFocusRing({ autoFocus }); const { buttonProps, isPressed } = useButton(props, ref as ButtonRefObject); @@ -28,8 +34,8 @@ const _Button = (props: ButtonProps, ref: ButtonRef) => { return (