From 503f4cdc234b53e81ca5ab82b6f2a7f3b429ce3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Syn=C3=A1=C4=8Dek?= Date: Fri, 10 May 2024 21:22:02 +0200 Subject: [PATCH 1/2] fix lint error with custom CSS class Relates to #2261 - this makes the linter pass all the checks. The issue is that "nextra" is some kind of indirect dependency for the website but two components are using `nextra-scrollbar` CSS class. I fixed this by adding this class to whitelist of the `tailwindcss/no-custom-classname` eslint rule. --- .eslintrc.cjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 5d85b242f8f..edbdb883a09 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -95,7 +95,12 @@ module.exports = { 'tailwindcss/enforces-negative-arbitrary-values': 'error', 'tailwindcss/enforces-shorthand': 'error', 'tailwindcss/migration-from-tailwind-2': 'error', - 'tailwindcss/no-custom-classname': 'error', + 'tailwindcss/no-custom-classname': [ + 'error', + { + whitelist: ['nextra-scrollbar'], + }, + ], 'react/no-unknown-property': ['error', { ignore: ['jsx', 'global'] }], }, settings: { From 4e8288a239fb7264137b946ac9794f4d3687a373 Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Sat, 17 Aug 2024 00:42:42 +0200 Subject: [PATCH 2/2] add todo comment --- .eslintrc.cjs | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index edbdb883a09..660dc36baf8 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -98,6 +98,7 @@ module.exports = { 'tailwindcss/no-custom-classname': [ 'error', { + // TODO: figure out why there is an error only on CI whitelist: ['nextra-scrollbar'], }, ],