Skip to content

Commit a3931b4

Browse files
update prettier/tailwind/eslint configs (#1786)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent b60fc55 commit a3931b4

24 files changed

+1392
-236
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@theguild/components": patch
3+
---
4+
dependencies updates:
5+
- Updated dependency [`@theguild/[email protected]` ↗︎](https://www.npmjs.com/package/@theguild/tailwind-config/v/0.6.0) (from `0.6.0-alpha-20241106003557-2c94714753ba2342f442f836b4683119985ee2c5`, in `peerDependencies`)

.eslintrc.cjs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ module.exports = {
88
'@theguild/eslint-config/yml',
99
// '@theguild/eslint-config/mdx',
1010
'plugin:tailwindcss/recommended',
11-
// 'plugin:storybook/recommended', // broken in ESLint 9
11+
'plugin:storybook/recommended',
1212
],
13-
parserOptions: {
14-
project: ['tsconfig.eslint.json', 'website/tsconfig.json', 'packages/*/tsconfig.json'],
15-
},
1613
rules: {
1714
'tailwindcss/classnames-order': 'off', // conflicts with official prettier-plugin-tailwindcss and tailwind v3
1815
// set more strict to highlight in editor
@@ -38,13 +35,6 @@ module.exports = {
3835
whitelist: [
3936
// TODO: find a way to fix it and remove these classes since they are imported somewhere and are used
4037
'line',
41-
'aa-ItemLink',
42-
'aa-ItemContent',
43-
'aa-ItemContentBody',
44-
'aa-ItemContentTitle',
45-
'aa-ItemContentSubtitle',
46-
'aa-SourceHeader',
47-
'aa-SourceHeaderTitle',
4838
'hive-focus',
4939
'hive-focus-within',
5040
'@container', // Tailwind ESLint Plugin doesn't see the Container Queries classes but it does see prefixes like @sm:
@@ -65,11 +55,5 @@ module.exports = {
6555
'import/extensions': ['error', { js: 'never', json: 'always' }],
6656
},
6757
},
68-
{
69-
files: ['*.config.js'],
70-
rules: {
71-
'import/no-default-export': 'off',
72-
},
73-
},
7458
],
7559
};

.prettierrc.cjs

Lines changed: 0 additions & 7 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
"@storybook/react": "8.2.9",
3131
"@storybook/theming": "8.2.9",
3232
"@svgr/webpack": "8.1.0",
33-
"@theguild/eslint-config": "0.12.1",
34-
"@theguild/prettier-config": "2.0.7",
35-
"@theguild/tailwind-config": "0.6.0-alpha-20241106003557-2c94714753ba2342f442f836b4683119985ee2c5",
33+
"@theguild/eslint-config": "0.13.0",
34+
"@theguild/prettier-config": "3.0.0",
35+
"@theguild/tailwind-config": "0.6.0",
3636
"@types/jest-image-snapshot": "6.4.0",
3737
"@types/react": "18.3.12",
3838
"@types/react-paginate": "7.1.4",
@@ -44,7 +44,7 @@
4444
"husky": "9.1.6",
4545
"jest-image-snapshot": "6.4.0",
4646
"lint-staged": "15.2.10",
47-
"next-themes": "0.4.3",
47+
"next-themes": "0.3.0",
4848
"postcss": "8.4.47",
4949
"postcss-loader": "8.1.1",
5050
"prettier": "3.3.3",

packages/components/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"types:check": "tsc --noEmit"
5959
},
6060
"peerDependencies": {
61-
"@theguild/tailwind-config": "0.6.0-alpha-20241106003557-2c94714753ba2342f442f836b4683119985ee2c5",
61+
"@theguild/tailwind-config": "0.6.0",
6262
"next": "^13 || ^14 || ^15.0.0",
6363
"react": "^18.2.0",
6464
"react-dom": "^18.2.0"
@@ -81,7 +81,7 @@
8181
"devDependencies": {
8282
"@svgr/babel-plugin-remove-jsx-attribute": "^8.0.0",
8383
"@theguild/editor": "workspace:*",
84-
"@theguild/tailwind-config": "0.6.0-alpha-20241106003557-2c94714753ba2342f442f836b4683119985ee2c5",
84+
"@theguild/tailwind-config": "0.6.0",
8585
"@types/dedent": "0.7.2",
8686
"@types/react": "18.3.12",
8787
"@types/react-dom": "18.3.1",

packages/components/src/components/anchor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import NextLink from 'next/link';
33
import clsx from 'clsx';
44
import { ILink } from '../types/components';
55

6-
export interface AnchorProps extends ILink {}
6+
export type AnchorProps = ILink;
77
export const Anchor = forwardRef<HTMLAnchorElement, AnchorProps>(function Anchor(
88
{ href = '', children, newWindow, sameSite, className, ...props },
99
forwardedRef,

packages/components/src/components/cookies-consent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useState } from 'react';
22
import { cn } from '../cn';
33
import { CallToAction } from './call-to-action';
44

5-
export interface CookiesConsentProps extends React.HTMLAttributes<HTMLElement> {}
5+
export type CookiesConsentProps = React.HTMLAttributes<HTMLElement>;
66
export function CookiesConsent(props: CookiesConsentProps) {
77
const [consented, setConsented] = useState(() => localStorage.getItem('cookies') === 'true');
88

packages/components/src/components/explore-main-product-cards.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ArrowIcon } from './icons';
66
import { TextLink } from './text-link';
77
import { MainProductCard } from './tools-and-libraries-cards';
88

9-
export interface ExploreMainProductCardsProps extends HTMLAttributes<HTMLDivElement> {}
9+
export type ExploreMainProductCardsProps = HTMLAttributes<HTMLDivElement>;
1010

1111
export function ExploreMainProductCards({ className, ...rest }: ExploreMainProductCardsProps) {
1212
return (

packages/components/src/components/footer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
21
import { FC, ReactElement, SVGProps } from 'react';
32
import { clsx } from 'clsx';
43
import { GuildLogo, TheGuild } from '../logos';

packages/components/src/components/hive-footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
YouTubeIcon,
1414
} from './icons';
1515

16-
export interface HiveFooterProps extends IFooterExtendedProps {}
16+
export type HiveFooterProps = IFooterExtendedProps;
1717

1818
export function HiveFooter({ className, logo, resources = [], sameSite }: HiveFooterProps) {
1919
return (

0 commit comments

Comments
 (0)