Skip to content

Commit 75b5516

Browse files
Copilotericfennis
andauthored
chore(dev): upgrade ESLint to latest compatible stack (v10) (#4378)
* chore: upgrade eslint to v9 latest with compatible lint deps Agent-Logs-Url: https://github.com/lucide-icons/lucide/sessions/f7c1f1b5-d213-4afa-91a8-b799a16397ec * Fix eslint config * Fix a lot of eslint errors * Fix eslint * Fix eslint errors * Fix eslint errors * Fix types * Fix eslint warning * Format code * Add eslint 10 * Remove unused vars * Update pnpm * Update deps --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Eric Fennis <[email protected]>
1 parent 7367c8f commit 75b5516

78 files changed

Lines changed: 981 additions & 1211 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintignore‎

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

‎.eslintrc.js‎

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

‎.github/dependabot.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ updates:
7878
- 'vite-plugin-*'
7979
linting-deps:
8080
patterns:
81+
- '@eslint/*'
8182
- '@html-eslint/*'
8283
- '@typescript-eslint/*'
84+
- 'angular-eslint'
8385
- 'cspell'
8486
- 'eslint'
8587
- 'eslint-*'

‎.vscode/settings.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"cSpell.words": ["devs", "preact", "Preact"],
2+
"cSpell.words": ["devs", "linecap", "linejoin", "preact", "Preact"],
33
"eslint.enable": true,
44
"eslint.validate": ["javascript", "svg"],
55
"svg.preview.background": "editor"

‎docs/.vitepress/lib/SvgPreview/Backdrop.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Fragment } from 'react';
1+
import React from 'react';
22

33
interface BackdropProps {
44
src: string;

‎docs/.vitepress/lib/SvgPreview/GapViolationHighlight.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import pathToPoints from './path-to-points';
33
import { Path, PathProps } from './types';
44

55
export const GapViolationHighlight = ({
6-
radius,
76
stroke,
87
strokeWidth,
98
strokeOpacity,

‎docs/.vitepress/lib/SvgPreview/index.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Fragment } from 'react';
1+
import React from 'react';
22
import { PathProps, Path } from './types';
33
import getPaths, { assert } from './utils';
44
import { GapViolationHighlight } from './GapViolationHighlight.tsx';
@@ -293,7 +293,7 @@ const Radii = ({
293293
...props
294294
}: { paths: Path[] } & PathProps<
295295
'strokeWidth' | 'stroke' | 'strokeDasharray' | 'strokeOpacity',
296-
any
296+
never
297297
>) => {
298298
return (
299299
<g
@@ -361,12 +361,12 @@ const Radii = ({
361361
const Handles = ({
362362
paths,
363363
...props
364-
}: { paths: Path[] } & PathProps<'strokeWidth' | 'stroke' | 'strokeOpacity', any>) => (
364+
}: { paths: Path[] } & PathProps<'strokeWidth' | 'stroke' | 'strokeOpacity', never>) => (
365365
<g
366366
className="svg-preview-handles-group"
367367
{...props}
368368
>
369-
{paths.map(({ c, prev, next, cp1, cp2 }, i) => (
369+
{paths.map(({ prev, next, cp1, cp2 }, i) => (
370370
<React.Fragment key={i}>
371371
{cp1 && <path d={`M${prev.x} ${prev.y} ${cp1.x} ${cp1.y}`} />}
372372
{cp1 && (

‎docs/.vitepress/lib/SvgPreview/path-to-points.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ function pathToPoints({ d, prev, next }: Path, interval = 1) {
1212
points.push(commander.getPointAtLength(i));
1313
}
1414
points.push(next);
15-
} catch (err) {}
15+
} catch (err) {
16+
console.warn(`Failed to convert path to points for d="${d}": ${err}`);
17+
}
1618
return points;
1719
}
1820

‎docs/.vitepress/lib/SvgPreview/utils.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const getCommands = (src: string) =>
5555
.flatMap(({ d, name }, idx) =>
5656
new SVGPathData(d)
5757
.toAbs()
58-
// @ts-ignore
58+
// @ts-expect-error `commands` is typed as a union of command types svgson does not narrow
5959
.commands.map((c, cIdx) => ({ ...c, id: idx, idx: cIdx, name })),
6060
);
6161

@@ -242,7 +242,7 @@ const getPaths = (src: string) => {
242242
break;
243243
}
244244
default: {
245-
// @ts-ignore
245+
// @ts-expect-error every command type is handled above, so `c` is not `never` here
246246
assertNever(c);
247247
}
248248
}

‎docs/.vitepress/lib/helpers.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ export const hash = (string: string, seed = 5381) => {
99
let i = string.length;
1010

1111
while (i) {
12-
// eslint-disable-next-line no-bitwise, no-plusplus
1312
seed = (seed * 33) ^ string.charCodeAt(--i);
1413
}
1514

16-
// eslint-disable-next-line no-bitwise
1715
return (seed >>> 0).toString(36).substr(0, 6);
1816
};
1917

0 commit comments

Comments
 (0)