From 45ac934f81d226a2e0073dc5eb2328d9076b623e Mon Sep 17 00:00:00 2001 From: jnachtigall Date: Tue, 8 Oct 2024 14:10:50 +0200 Subject: [PATCH 1/2] Update .prettierrc.mjs to support scss This change is needed to avoid errors if scss is used. See https://mantine.dev/styles/sass/#usage-with-nextjs --- .prettierrc.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.prettierrc.mjs b/.prettierrc.mjs index 31e43b8a..bf6965a4 100644 --- a/.prettierrc.mjs +++ b/.prettierrc.mjs @@ -18,6 +18,11 @@ const config = { '^@mantine-tests/(.*)$', '^@docs/(.*)$', '^@/.*$', + // scss as second to bottom + '^../(?!.*.scss$).*$', + '^./(?!.*.scss$).*$', + '\\.scss$', + // css at last '^../(?!.*.css$).*$', '^./(?!.*.css$).*$', '\\.css$', @@ -32,4 +37,4 @@ const config = { ], }; -export default config; \ No newline at end of file +export default config; From 4050df36b90086e07c302b8b8cd1f150ded432e5 Mon Sep 17 00:00:00 2001 From: jnachtigall Date: Tue, 8 Oct 2024 14:13:38 +0200 Subject: [PATCH 2/2] lint:stylelint also checking scss Needed to comply with https://mantine.dev/styles/sass/#usage-with-nextjs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index da956532..3b535995 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "start": "next start", "typecheck": "tsc --noEmit", "lint": "next lint && npm run lint:stylelint", - "lint:stylelint": "stylelint '**/*.css' --cache", + "lint:stylelint": "stylelint '**/*.*.{css,scss}' --cache", "jest": "jest", "jest:watch": "jest --watch", "prettier:check": "prettier --check \"**/*.{ts,tsx}\"",