Skip to content

Commit

Permalink
Bump eslint from 8.56.0 to 9.14.0 (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Nov 5, 2024
1 parent 8e44ce6 commit 0d43fa6
Show file tree
Hide file tree
Showing 8 changed files with 505 additions and 998 deletions.
1 change: 1 addition & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type StorybookConfig } from "@storybook/react-webpack5";

const config: StorybookConfig = {
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: ["@storybook/addon-essentials"],
Expand Down
3 changes: 0 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"editor.tabSize": 2,
"eslint.options": {
"reportUnusedDisableDirectives": "error"
},
"files.eol": "\n",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
Expand Down
48 changes: 48 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* eslint-disable @typescript-eslint/no-require-imports */

const foxglove = require("@foxglove/eslint-plugin");
const storybook = require("eslint-plugin-storybook");
const globals = require("globals");
const tseslint = require("typescript-eslint");

module.exports = tseslint.config(
{
ignores: ["**/dist", "!.storybook"],
},
{
languageOptions: {
parserOptions: {
project: "tsconfig.eslint.json",
},
},
},
...foxglove.configs.base,
...foxglove.configs.jest,
...foxglove.configs.typescript,
...foxglove.configs.react,
...storybook.configs["flat/recommended"],
{
languageOptions: {
globals: {
...globals.node,
},
},

rules: {
"react-hooks/exhaustive-deps": "error",
},
},
{
rules: {
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@foxglove/prefer-hash-private": "off",
},
},
{
files: ["**/*.stories.tsx", ".storybook/**/*"],
rules: {
"filenames/match-exported": "off",
},
},
);
24 changes: 8 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"clean": "rimraf dist *.tsbuildinfo",
"prepack": "tsc -b tsconfig.json tsconfig.cjs.json",
"build": "tsc -b tsconfig.json tsconfig.cjs.json",
"lint": "eslint --report-unused-disable-directives --fix .",
"lint:ci": "eslint --report-unused-disable-directives .",
"lint": "eslint --fix .",
"lint:ci": "eslint .",
"test": "echo 'nothing to test'",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
Expand All @@ -35,7 +35,7 @@
"three": ">=0.140.2"
},
"devDependencies": {
"@foxglove/eslint-plugin": "1.0.1",
"@foxglove/eslint-plugin": "2.0.0",
"@foxglove/tsconfig": "2.0.0",
"@storybook/addon-essentials": "7.6.16",
"@storybook/react": "7.6.16",
Expand All @@ -44,19 +44,10 @@
"@types/node": "22.7.5",
"@types/react": "18.3.3",
"@types/three": "0.165.0",
"@typescript-eslint/eslint-plugin": "7.0.2",
"@typescript-eslint/parser": "7.0.2",
"chromatic": "11.3.2",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-es": "4.1.0",
"eslint-plugin-filenames": "1.3.2",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jest": "27.6.3",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "7.34.2",
"eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-storybook": "0.9.0",
"eslint": "9.14.0",
"eslint-plugin-storybook": "0.11.0",
"globals": "15.12.0",
"jest": "29.7.0",
"prettier": "3.2.5",
"react": "18.3.1",
Expand All @@ -65,7 +56,8 @@
"storybook": "7.6.16",
"three": "0.165.0",
"ts-jest": "29.1.2",
"typescript": "5.4.5"
"typescript": "5.6.3",
"typescript-eslint": "8.13.0"
},
"packageManager": "yarn@4.0.2"
}
6 changes: 3 additions & 3 deletions src/FontManager.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useEffect, useRef } from "react";
import { useEffect, useRef, type ReactElement } from "react";

import { AtlasData, FontManager } from "./FontManager";

Expand All @@ -21,7 +21,7 @@ function atlasToImageData(atlas: AtlasData) {
return img;
}

export function Atlas(): JSX.Element {
export function Atlas(): ReactElement {
const canvasRef = useRef<HTMLCanvasElement>(null);
useEffect(() => {
if (!canvasRef.current) {
Expand All @@ -39,7 +39,7 @@ export function Atlas(): JSX.Element {
return <canvas ref={canvasRef} style={{ backgroundColor: "black" }} />;
}

export function Layout(): JSX.Element {
export function Layout(): ReactElement {
const canvasRef = useRef<HTMLCanvasElement>(null);
useEffect(() => {
if (!canvasRef.current) {
Expand Down
4 changes: 2 additions & 2 deletions src/LabelPool.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta, StoryObj } from "@storybook/react";
import { useEffect, useRef, useState } from "react";
import { useEffect, useRef, useState, type ReactElement } from "react";
import * as THREE from "three";
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";

Expand Down Expand Up @@ -140,7 +140,7 @@ function BasicTemplate({
positionY: number;
positionZ: number;
logDepthBuffer: boolean;
}): JSX.Element {
}): ReactElement {
const canvasRef = useRef<HTMLCanvasElement>(null);

const [storyScene] = useState(() => new StoryScene({ logDepthBuffer }));
Expand Down
12 changes: 12 additions & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// -*- jsonc -*-
{
"extends": "@foxglove/tsconfig/base",
"include": ["**/*", ".storybook/**/*"],
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noEmit": true,
"lib": ["DOM", "es2020"],
"jsx": "react-jsx"
}
}
Loading

0 comments on commit 0d43fa6

Please sign in to comment.