diff --git a/.eslintrc.cjs b/.eslintrc.cjs index f8ef95ec53..2de949407b 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -5,6 +5,7 @@ const CONFIGS = [ "plugin:react-hooks/recommended", "plugin:prettier/recommended", "plugin:tailwindcss/recommended", + "plugin:orbit-components/internal", ]; module.exports = { @@ -48,6 +49,8 @@ module.exports = { "no-await-in-loop": "off", "tailwindcss/classnames-order": "off", "tailwindcss/no-custom-classname": [1, { whitelist: ["(orbit\\-).*", "chromatic-ignore"] }], + // to improve performance locally + // https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#my-linting-feels-really-slow ...(!process.env.CI ? { "import/no-named-as-default": "off", @@ -72,9 +75,12 @@ module.exports = { "plugin:@typescript-eslint/recommended", "prettier", ], + plugins: ["@typescript-eslint"], + parser: "@typescript-eslint/parser", parserOptions: { extraFileExtensions: [".mts"], tsconfigRootDir: __dirname, + // https://typescript-eslint.io/linting/typed-linting/ project: [ "./tsconfig.scripts.json", "./tsconfig.json", @@ -98,7 +104,13 @@ module.exports = { "@typescript-eslint/consistent-type-definitions": ["error", "interface"], "@typescript-eslint/no-empty-interface": "off", "@typescript-eslint/prefer-readonly-parameter-types": "off", + "@typescript-eslint/no-unsafe-argument": "warn", + "@typescript-eslint/no-explicit-any": "warn", + "@typescript-eslint/no-duplicate-enum-values": "warn", "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-floating-promises": "off", + "@typescript-eslint/no-misused-promises": "off", + "@typescript-eslint/no-unsafe-call": "off", "no-unused-vars": "off", "@typescript-eslint/no-unused-vars": [ "error", diff --git a/docs/lib.es5.d.ts b/docs/lib.es5.d.ts index d94feb4496..f83319e2e0 100644 --- a/docs/lib.es5.d.ts +++ b/docs/lib.es5.d.ts @@ -21,5 +21,5 @@ interface Array { * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value. */ - filter(predicate: BooleanConstructor, thisArg?: any): Exclude[]; + filter(predicate: BooleanConstructor, thisArg?: unknown): Exclude[]; } diff --git a/docs/src/components/Navbar/index.tsx b/docs/src/components/Navbar/index.tsx index d63d1220f8..bd7279a43c 100644 --- a/docs/src/components/Navbar/index.tsx +++ b/docs/src/components/Navbar/index.tsx @@ -223,7 +223,6 @@ const Navbar = ({ location, docNavigation }: Props) => { role="tab" aria-selected={activeTab === "navigation"} aria-controls="navbar-tabpanel-navigation" - id="navbar-tab-navigation" type="button" onClick={() => setActiveTab("navigation")} > @@ -233,7 +232,6 @@ const Navbar = ({ location, docNavigation }: Props) => { role="tab" aria-selected={activeTab === "bookmarks"} aria-controls="navbar-tabpanel-bookmarks" - id="navbar-tab-bookmarks" type="button" onClick={() => setActiveTab("bookmarks")} > @@ -276,7 +274,6 @@ const Navbar = ({ location, docNavigation }: Props) => {