Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
'plugin:prettier/recommended',
'plugin:react-hooks/recommended',
],
plugins: ['prettier', 'tailwindcss', 'react-hooks', 'unused-imports'],
plugins: ['prettier', /* 'tailwindcss', */ 'react-hooks', 'unused-imports'],
parserOptions: {
project: './tsconfig.eslint.json',
ecmaVersion: 2020,
Expand Down Expand Up @@ -45,8 +45,10 @@ module.exports = {
'react/no-danger': 0,
'@typescript-eslint/return-await': 0,
'@typescript-eslint/consistent-type-imports': 'error',
'tailwindcss/classnames-order': 'warn',
'tailwindcss/no-contradicting-classname': 'error',
// TODO: Re-enable when eslint-plugin-tailwindcss supports Tailwind v4
// Temporarily disabled - eslint-plugin-tailwindcss not yet compatible with Tailwind v4
// 'tailwindcss/classnames-order': 'warn',
// 'tailwindcss/no-contradicting-classname': 'error',
'no-restricted-globals': [
'error',
{
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"prettier": "^2.6.2",
"resolve-url-loader": "^5.0.0",
"sass": "^1.53.0",
"tailwindcss": "^3.4.14",
"tailwindcss": "^4.1.18",
"terser-webpack-plugin": "^4.2.3",
"ts-jest": "^26.5.4",
"typescript": "5.6.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react"
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
"react-intersection-observer": "^8.32.2",
"react-modal": "^3.14.3",
"react-swipeable": "^7.0.1",
"tailwindcss": "^3.4.14",
"tailwindcss-safe-area": "0.8.0",
"@tailwindcss/postcss": "^4.0.0",
"tailwindcss": "^4.1.18",
"ts-jest": "^26.5.4",
"typescript": "5.6.3"
},
Expand Down
7 changes: 1 addition & 6 deletions packages/shared/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

module.exports = {
plugins: [
'postcss-import',
[
'postcss-simple-vars',
{
Expand All @@ -16,10 +15,7 @@ module.exports = {
},
},
],
process.env.TARGET_BROWSER
? require('tailwindcss/nesting')(require('postcss-nesting'))
: 'tailwindcss/nesting',
'tailwindcss',
'@tailwindcss/postcss',
'postcss-focus-visible',
'postcss-custom-media',
'postcss-mixins',
Expand All @@ -30,6 +26,5 @@ module.exports = {
propList: ['*'],
})
: ['postcss-rem-to-responsive-pixel', { rootValue: 16, propList: ['*'] }],
'autoprefixer',
],
};
2 changes: 2 additions & 0 deletions packages/shared/src/components/accordion/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@reference "../../styles/globals.css";

.AccordionRoot {
@apply flex flex-col gap-2 w-full flex-1;
}
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/src/components/dropdown/style.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@reference "../../styles/globals.css";

[data-radix-popper-content-wrapper] {
z-index: 1000!important;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@reference "../../styles/globals.css";

.knob {
@apply bg-raw-cabbage-40;
transition-property: transform, width;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ReactElement } from 'react';
import React, { useState } from 'react';
import type { QueryClient, QueryKey } from '@tanstack/react-query/build/modern';
import type { QueryClient, QueryKey } from '@tanstack/react-query';
import { useQueryClient } from '@tanstack/react-query';
import classNames from 'classnames';
import {
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/src/components/markdown.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@reference "../styles/globals.css";

.markdown {
position: relative;
word-break: break-word;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@reference "../../styles/globals.css";

.authorOnboarding {
& p {
margin: 1rem 0;
Expand Down
6 changes: 4 additions & 2 deletions packages/shared/src/components/profile/ActivitySection.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { ReactElement, ReactNode } from 'react';
import React, { Fragment } from 'react';
import type { UseInfiniteQueryResult } from '@tanstack/react-query/build/legacy/types';
import type { InfiniteData } from '@tanstack/react-query';
import type {
InfiniteData,
UseInfiniteQueryResult,
} from '@tanstack/react-query';
import classed from '../../lib/classed';
import type { FeedData } from '../../graphql/feed';
import type { Post } from '../../graphql/posts';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const LanguageDropdown = ({
const [open, setOpen] = useState(false);
const validLanguages = useFeature(featureValidLanguages);
const languageOptions = useMemo(() => {
return ['Original language', ...Object.values(validLanguages)];
return ['Original language', ...Object.values(validLanguages)] as string[];
}, [validLanguages]);
const values = useMemo(() => {
return [null, ...Object.keys(validLanguages)];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useQuery } from '@tanstack/react-query';
import type { UseQueryResult } from '@tanstack/react-query/src/types';
import type { UseQueryResult } from '@tanstack/react-query';
import type { FunnelBootData } from '../types/funnelBoot';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@reference "../../../styles/globals.css";

/*
* Had to CSS to hack my way with the best value variant.
* First, we need to expand the label using the wrapper of the radio item which isn't highly customizable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type {
InfiniteData,
UseInfiniteQueryOptions,
UseInfiniteQueryResult,
} from '@tanstack/react-query';
import { useInfiniteQuery } from '@tanstack/react-query';
import type { UseInfiniteQueryResult } from '@tanstack/react-query/build/legacy/types';
import type {
ContentPreference,
ContentPreferenceType,
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/src/styles/base.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@reference "./globals.css";

html, #daily-companion-wrapper {
background: var(--theme-background-default);
color: var(--theme-text-primary);
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/src/styles/components/buttons.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@reference "../globals.css";

.btn {
transition: 0.2s ease-in-out;
transition-property: border, background, box-shadow, color;
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/src/styles/components/menu.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@reference "../globals.css";

.react-contexify {
position: fixed;
opacity: 0;
Expand Down
7 changes: 1 addition & 6 deletions packages/shared/src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
@import 'tailwindcss/base.css';
@import 'tailwindcss';
@import './base.css';

@import 'tailwindcss/components.css';
@import './components.css';

@import 'tailwindcss/utilities.css';
@import './utilities.css';

@import './ios.css';
10 changes: 2 additions & 8 deletions packages/shared/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { type Config } from 'tailwindcss';
// eslint-disable-next-line import/no-extraneous-dependencies
import safeArea from 'tailwindcss-safe-area';
import type { Config } from 'tailwindcss';
// eslint-disable-next-line import/no-extraneous-dependencies
import containerQueries from '@tailwindcss/container-queries';
import colors from './tailwind/colors';
Expand Down Expand Up @@ -261,9 +258,6 @@ export default {
},
},
// eslint-disable-next-line global-require
plugins: [caret, typography, buttons, safeArea, containerQueries],
corePlugins: {
invert: false,
},
plugins: [caret, typography, buttons, containerQueries],
// eslint-disable-next-line
} satisfies Config;
16 changes: 7 additions & 9 deletions packages/shared/tailwind/caret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,27 @@
// @ts-nocheck
import plugin from 'tailwindcss/plugin';

const generateColors = (e, colors, prefix) =>
const generateColors = (colors, prefix) =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this was our only custom part?

Object.keys(colors).reduce((acc, key) => {
if (typeof colors[key] === 'string') {
return {
...acc,
[`${prefix}-${e(key)}`]: {
[`${prefix}-${key}`]: {
'caret-color': colors[key],
},
};
}

const innerColors = generateColors(e, colors[key], `${prefix}-${e(key)}`);
const innerColors = generateColors(colors[key], `${prefix}-${key}`);

return {
...acc,
...innerColors,
};
}, {});

export default plugin.withOptions(({ className = 'caret' } = {}) => {
return ({ e, addUtilities, theme, variants }) => {
const colors = theme('colors');
const caretColors = generateColors(e, colors, `.${className}`);
addUtilities(caretColors, variants('caretColor'));
};
export default plugin(({ addUtilities, theme }) => {
const colors = theme('colors');
const caretColors = generateColors(colors, `.caret`);
addUtilities(caretColors);
});
2 changes: 1 addition & 1 deletion packages/shared/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
Expand Down
2 changes: 1 addition & 1 deletion packages/storybook/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
Expand Down
3 changes: 1 addition & 2 deletions packages/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@
"postcss-simple-vars": "^7.0.1",
"prettier": "^2.6.2",
"serwist": "^9.0.9",
"tailwindcss": "^3.4.14",
"tailwindcss-safe-area": "0.8.0",
"tailwindcss": "^4.1.18",
"ts-jest": "^26.5.4",
"typescript": "5.6.3",
"vercel": "^21.3.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/webapp/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
Expand Down
Loading