Skip to content

Commit

Permalink
Added eslint check for "hidden" class
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Nov 20, 2024
1 parent a84ebcc commit fb8ab7c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ const esLintConfig = tseslint.config(eslint.configs.recommended, ...tseslint.con
"@typescript-eslint/require-await": "off",
"no-console": ["error", { allow: ["warn", "error"] }],
"no-fallthrough": "off",
"no-restricted-syntax": ["error", "Literal[value=/text-m[\\d]/i]"],
"no-restricted-syntax": ["error", {
selector: "Literal[value=/text-m[\\d]/i]",
message: "Classes like text-m# are deprecated and should be replaced with text-#."
}, {
selector: "Literal[value=/(?<![^\\s])hidden/i]",
message: "Tailwind class 'hidden' conflicts with Slate embed code. Use tw-hidden instead."
}],
"prettier/prettier": ["error"],
"@typescript-eslint/no-unused-vars": [
"error",
Expand Down

0 comments on commit fb8ab7c

Please sign in to comment.