Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint -> oxlint #1667

Merged
merged 5 commits into from Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 1 addition & 7 deletions package.json
Expand Up @@ -23,14 +23,8 @@
],
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.1.1",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-tsc": "^2.0.0"
"oxlint": "^0.0.20"
},
"packageManager": "yarn@4.0.2"
}
11 changes: 2 additions & 9 deletions packages/chart-react-billboard/package.json
Expand Up @@ -9,7 +9,7 @@
"start": "echo 'noop'",
"build": "echo 'noop'",
"test": "echo 'noop'",
"lint": "../../node_modules/.bin/eslint . -c .eslintrc.js --ext .ts,.tsx",
"lint": "yarn oxlint",
"prettier": "prettier",
"format": "yarn run prettier . --write",
"update": "yarn run ncu",
Expand All @@ -21,17 +21,10 @@
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"cross-env": "^7.0.3",
"eslint-plugin-react": "^7.33.2",
"oxlint": "^0.0.20",
"prettier": "^3.1.1",
"typescript": "^5.3.3"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.25.1",
"eslint-plugin-promise": "^5.1.0"
},
"dependencies": {
"@tony/cv-lib": "*",
"billboard.js": "^3.10.3",
Expand Down
11 changes: 2 additions & 9 deletions packages/chart-react-carbon/package.json
Expand Up @@ -9,7 +9,7 @@
"start": "echo 'noop'",
"build": "echo 'noop'",
"test": "echo 'noop'",
"lint": "../../node_modules/.bin/eslint . -c .eslintrc.js --ext .ts,.tsx",
"lint": "yarn oxlint",
"prettier": "prettier",
"format": "yarn run prettier . --write",
"update": "yarn run ncu",
Expand All @@ -21,17 +21,10 @@
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"cross-env": "^7.0.3",
"eslint-plugin-react": "^7.33.2",
"oxlint": "^0.0.20",
"prettier": "^3.1.1",
"typescript": "^5.3.3"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.25.1",
"eslint-plugin-promise": "^5.1.0"
},
"dependencies": {
"@carbon/charts": "1.13.8",
"@carbon/charts-react": "1.13.8",
Expand Down
11 changes: 2 additions & 9 deletions packages/chart-react-nivo/package.json
Expand Up @@ -9,7 +9,7 @@
"start": "echo 'noop'",
"build": "echo 'noop'",
"test": "echo 'noop'",
"lint": "../../node_modules/.bin/eslint . -c .eslintrc.js --ext .ts,.tsx",
"lint": "yarn oxlint",
"prettier": "prettier",
"format": "yarn run prettier . --write",
"update": "yarn run ncu",
Expand All @@ -21,17 +21,10 @@
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"cross-env": "^7.0.3",
"eslint-plugin-react": "^7.33.2",
"oxlint": "^0.0.20",
"prettier": "^3.1.1",
"typescript": "^5.3.3"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.25.1",
"eslint-plugin-promise": "^5.1.0"
},
"dependencies": {
"@nivo/bar": "^0.84.0",
"@nivo/core": "^0.84.0",
Expand Down
11 changes: 2 additions & 9 deletions packages/chart-react-plotly/package.json
Expand Up @@ -9,7 +9,7 @@
"start": "echo 'noop'",
"build": "echo 'noop'",
"test": "echo 'noop'",
"lint": "../../node_modules/.bin/eslint . -c .eslintrc.js --ext .ts,.tsx",
"lint": "yarn oxlint",
"prettier": "prettier",
"format": "yarn run prettier . --write",
"update": "yarn run ncu",
Expand All @@ -22,17 +22,10 @@
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"cross-env": "^7.0.3",
"eslint-plugin-react": "^7.33.2",
"oxlint": "^0.0.20",
"prettier": "^3.1.1",
"typescript": "^5.3.3"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.25.1",
"eslint-plugin-promise": "^5.1.0"
},
"dependencies": {
"@tony/cv-lib": "*",
"fast-deep-equal": "^3.1.3",
Expand Down
11 changes: 2 additions & 9 deletions packages/chart-react-victory/package.json
Expand Up @@ -9,7 +9,7 @@
"start": "echo 'noop'",
"build": "echo 'noop'",
"test": "echo 'noop'",
"lint": "../../node_modules/.bin/eslint . -c .eslintrc.js --ext .ts,.tsx",
"lint": "yarn oxlint",
"prettier": "prettier",
"format": "yarn run prettier . --write",
"update": "yarn run ncu",
Expand All @@ -21,17 +21,10 @@
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"cross-env": "^7.0.3",
"eslint-plugin-react": "^7.33.2",
"oxlint": "^0.0.20",
"prettier": "^3.1.1",
"typescript": "^5.3.3"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.25.1",
"eslint-plugin-promise": "^5.1.0"
},
"dependencies": {
"@tony/cv-lib": "*",
"fast-deep-equal": "^3.1.3",
Expand Down
3 changes: 3 additions & 0 deletions packages/data/package.json
Expand Up @@ -15,5 +15,8 @@
"clean": "echo 'NOOP'",
"build": "echo 'NOOP'",
"full-clean": "rm -rf scraped/"
},
"devDependencies": {
"oxlint": "^0.0.20"
}
}
11 changes: 2 additions & 9 deletions packages/lib/package.json
Expand Up @@ -4,7 +4,7 @@
"private": true,
"version": "0.0.1",
"scripts": {
"lint": "eslint . -c .eslintrc.js --ext .ts",
"lint": "yarn oxlint",
"test": "echo 'noop'",
"prettier": "prettier",
"format": "yarn run prettier . --write",
Expand All @@ -27,16 +27,9 @@
"devDependencies": {
"@types/chroma-js": "^2.4.3",
"@types/node": "^20.10.4",
"oxlint": "^0.0.20",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.25.1",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-tsc": "^2.0.0"
}
}
11 changes: 2 additions & 9 deletions packages/react/package.json
Expand Up @@ -8,7 +8,7 @@
"start": "yarn vite",
"build": "yarn vite build",
"preview": "yarn vite preview",
"lint": "../../node_modules/.bin/eslint . -c .eslintrc.cjs --ext .ts,.tsx",
"lint": "yarn oxlint",
"test": "echo 'noop'",
"prettier": "prettier",
"format": "yarn run prettier . --write",
Expand All @@ -22,20 +22,13 @@
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"cross-env": "^7.0.3",
"eslint-plugin-react": "^7.33.2",
"oxlint": "^0.0.20",
"prettier": "^3.1.1",
"prettier-plugin-css-order": "^2.0.1",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"vite-plugin-webfont-dl": "^3.9.1"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"eslint": "^8.0.0",
"eslint-plugin-import": "^2.25.1",
"eslint-plugin-promise": "^5.1.0"
},
"dependencies": {
"@atlaskit/toggle": "^13.0.1",
"@floating-ui/react": "^0.26.4",
Expand Down
4 changes: 1 addition & 3 deletions packages/react/src/App.tsx
Expand Up @@ -49,9 +49,7 @@ const DominantLanguageCSSVariable: React.FC = observer(() => {
`,
}}
></style>
) : (
<></>
);
) : null;
});

const App: React.FC = observer(() => {
Expand Down
15 changes: 6 additions & 9 deletions packages/react/src/Card.tsx
Expand Up @@ -210,15 +210,12 @@ export const ActivityInfo: React.FC<

const DateText: React.FC<
{ date: string } & React.HTMLProps<HTMLSpanElement>
> = ({ date, ...rest }) => (
<>
{date && (
<span title={format(new Date(date), "MMMM do, yyyy")} {...rest}>
{formatDistance(new Date(date), new Date())} ago
</span>
)}
</>
);
> = ({ date, ...rest }) =>
date && (
<span title={format(new Date(date), "MMMM do, yyyy")} {...rest}>
{formatDistance(new Date(date), new Date())} ago
</span>
);

export const ActivityCard: React.FC<ActivityCardProps> = ({
activity,
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/Settings/FilterDateRange.tsx
Expand Up @@ -54,15 +54,16 @@ export const FilterDateRange: React.FC<{
id="year-range"
>
{ticks.map(({ value, getTickProps }) => (
<div className="tick" {...getTickProps()} key={value}>
<div className="tick" key={value} {...getTickProps()}>
<div className="tick-label">{value}</div>
</div>
))}
{segments.map(({ getSegmentProps }, i) => (
<div {...getSegmentProps()} key={i} />
<div key={i} {...getSegmentProps()} />
))}
{handles.map(({ getHandleProps }, j) => (
<button
key={j}
{...getHandleProps({
style: {
width: "14px",
Expand All @@ -73,7 +74,6 @@ export const FilterDateRange: React.FC<{
border: "solid 1px #888",
},
})}
key={j}
/>
))}
</div>
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/Tag.tsx
Expand Up @@ -34,7 +34,7 @@ export const LanguageTag: React.FC<
return (
<div
className={`tag` + (className ? ` ${className}` : "")}
style={{ ...(language?.ui ?? {}), ...style }}
style={{ ...language?.ui, ...style }}
{...props}
>
{children || languageName}
Expand Down Expand Up @@ -62,10 +62,10 @@ export const CategoryTag: React.FC<
return (
<div
className={`tag` + (className ? ` ${className}` : "")}
style={{ ...(category?.ui ?? {}), ...style }}
style={{ ...category?.ui, ...style }}
{...props}
>
{category?.id && <>{CategoryEmojiMap[category.id]}</>}
{category?.id && CategoryEmojiMap[category.id]}
{children || category?.name || categoryName}
</div>
);
Expand Down