diff --git a/eslint.config.mjs b/eslint.config.mjs index ed92fb90f..e8ae9e4b6 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -6,6 +6,7 @@ import pluginPromise from "eslint-plugin-promise" import react from "eslint-plugin-react" import reactHooks from "eslint-plugin-react-hooks" import storybook from "eslint-plugin-storybook" +import tailwind from "eslint-plugin-tailwindcss" import tsdoc from "eslint-plugin-tsdoc" import globals from "globals" import tseslint from "typescript-eslint" @@ -177,6 +178,17 @@ const config = tseslint.config([ "@typescript-eslint/no-unsafe-call": "off", }, }, + { + name: "tailwind", + files: ["packages/elements-react/**/*.{js,jsx,ts,tsx}"], + ...tailwind.configs["flat/recommended"][0], + ...tailwind.configs["flat/recommended"][1], + settings: { + tailwindcss: { + config: "packages/elements-react/tailwind.config.ts", + }, + }, + }, ]) export default config diff --git a/package-lock.json b/package-lock.json index d23dfec06..4b781716b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -77,6 +77,7 @@ "eslint-plugin-react": "7.37.2", "eslint-plugin-react-hooks": "5.0.0", "eslint-plugin-storybook": "0.11.1", + "eslint-plugin-tailwindcss": "3.17.5", "eslint-plugin-tsdoc": "0.4.0", "globals": "15.13.0", "jest": "29.7.0", @@ -18814,6 +18815,23 @@ "eslint": ">=6" } }, + "node_modules/eslint-plugin-tailwindcss": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.17.5.tgz", + "integrity": "sha512-8Mi7p7dm+mO1dHgRHHFdPu4RDTBk69Cn4P0B40vRQR+MrguUpwmKwhZy1kqYe3Km8/4nb+cyrCF+5SodOEmaow==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-glob": "^3.2.5", + "postcss": "^8.4.4" + }, + "engines": { + "node": ">=18.12.0" + }, + "peerDependencies": { + "tailwindcss": "^3.4.0" + } + }, "node_modules/eslint-plugin-tsdoc": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.4.0.tgz", @@ -18915,13 +18933,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true, - "license": "MIT" - }, "node_modules/eslint/node_modules/acorn": { "version": "8.14.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", diff --git a/package.json b/package.json index a919cf0df..3fa7ffcdc 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "eslint-plugin-react": "7.37.2", "eslint-plugin-react-hooks": "5.0.0", "eslint-plugin-storybook": "0.11.1", + "eslint-plugin-tailwindcss": "3.17.5", "eslint-plugin-tsdoc": "0.4.0", "globals": "15.13.0", "jest": "29.7.0", diff --git a/packages/elements-react/src/theme/default/components/card/auth-methods.tsx b/packages/elements-react/src/theme/default/components/card/auth-methods.tsx index 82c5fc36a..d15361485 100644 --- a/packages/elements-react/src/theme/default/components/card/auth-methods.tsx +++ b/packages/elements-react/src/theme/default/components/card/auth-methods.tsx @@ -25,23 +25,23 @@ export function DefaultAuthMethodListItem({ const Icon = iconsMap[group] || null return ( -