Skip to content

Commit

Permalink
Rename all eslint plugin rules to lichtblick
Browse files Browse the repository at this point in the history
  • Loading branch information
aneuwald-ctw committed Aug 19, 2024
1 parent c91f5ba commit fd48379
Show file tree
Hide file tree
Showing 1,354 changed files with 6,560 additions and 2,096 deletions.
20 changes: 10 additions & 10 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ ignorePatterns:
plugins:
- file-progress
- tss-unused-classes
- "@foxglove/eslint-plugin-studio"
- "@lichtblick/eslint-plugin-suite"

extends:
- plugin:@foxglove/base
- plugin:@foxglove/react
- plugin:@foxglove/jest
- plugin:@lichtblick/base
- plugin:@lichtblick/react
- plugin:@lichtblick/jest
- plugin:storybook/recommended
- plugin:@foxglove/studio/all
- plugin:@lichtblick/suite/all

settings:
import/internal-regex: "^@foxglove"
import/internal-regex: "^@lichtblick"

rules:
"@foxglove/license-header": error
"@foxglove/prefer-hash-private": error
"@lichtblick/license-header": error
"@lichtblick/prefer-hash-private": error

tss-unused-classes/unused-classes: error

Expand Down Expand Up @@ -130,7 +130,7 @@ rules:
overrides:
- files: ["*.ts", "*.tsx"]
extends:
- plugin:@foxglove/typescript
- plugin:@lichtblick/typescript
parserOptions:
project: ./tsconfig.eslint.json
rules:
Expand Down Expand Up @@ -160,7 +160,7 @@ overrides:
# https://eslint.org/docs/latest/rules/no-loop-func
"no-loop-func": error

# unused vars must have `_` prefix, but `_` alone is not ignored (see @foxglove/studio/lodash-imports)
# unused vars must have `_` prefix, but `_` alone is not ignored (see @lichtblick/suite/lodash-imports)
"@typescript-eslint/no-unused-vars":
- error
- vars: all
Expand Down
6 changes: 5 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

/* eslint-disable filenames/match-exported */

import { makeConfig } from "@lichtblick/suite-base/webpack";
import { StorybookConfig } from "@storybook/react-webpack5";
import path from "path";
import { Configuration } from "webpack";

import { makeConfig } from "@lichtblick/suite-base/webpack";

const storybookConfig: StorybookConfig = {
// Workaround for https://github.com/storybookjs/storybook/issues/19446
stories: ["../packages/**/!(node_modules)**/*.stories.tsx"],
Expand Down
12 changes: 8 additions & 4 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

import { GlobalStyles } from "@mui/material";
import { Story, StoryContext } from "@storybook/react";
import { useMemo, useRef, useEffect } from "react";
import { useTranslation } from "react-i18next";

import { Condvar } from "@lichtblick/den/async";
import CssBaseline from "@lichtblick/suite-base/components/CssBaseline";
import GlobalCss from "@lichtblick/suite-base/components/GlobalCss";
Expand All @@ -14,10 +22,6 @@ import ReadySignalContext from "@lichtblick/suite-base/stories/ReadySignalContex
import ThemeProvider from "@lichtblick/suite-base/theme/ThemeProvider";
import { makeMockAppConfiguration } from "@lichtblick/suite-base/util/makeMockAppConfiguration";
import waitForFonts from "@lichtblick/suite-base/util/waitForFonts";
import { GlobalStyles } from "@mui/material";
import { Story, StoryContext } from "@storybook/react";
import { useMemo, useRef, useEffect } from "react";
import { useTranslation } from "react-i18next";

import "./styles.css";

Expand Down
6 changes: 5 additions & 1 deletion benchmark/src/BenchmarkStats.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
import Log from "@lichtblick/log";
import { std } from "mathjs";

import Log from "@lichtblick/log";

const log = Log.getLogger(__filename);

type Sample = {
Expand Down
6 changes: 5 additions & 1 deletion benchmark/src/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

import { useMemo, useState } from "react";

import {
SharedRoot,
IDataSourceFactory,
AppSetting,
LaunchPreferenceValue,
StudioApp,
} from "@lichtblick/suite-base";
import { useMemo, useState } from "react";

import { McapLocalBenchmarkDataSourceFactory, SyntheticDataSourceFactory } from "./dataSources";
import { LAYOUTS } from "./layouts";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
3 changes: 3 additions & 0 deletions benchmark/src/dataSources/SyntheticDataSourceFactory.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
3 changes: 3 additions & 0 deletions benchmark/src/dataSources/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
6 changes: 5 additions & 1 deletion benchmark/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

import ReactDOM from "react-dom";

import Logger from "@lichtblick/log";
import { initI18n } from "@lichtblick/suite-base";
import ReactDOM from "react-dom";

const log = Logger.getLogger(__filename);
log.debug("initializing");
Expand Down
3 changes: 3 additions & 0 deletions benchmark/src/layouts.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
7 changes: 5 additions & 2 deletions benchmark/src/players/BenchmarkPlayer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

import { toRFC3339String } from "@foxglove/rostime";

import { filterMap } from "@lichtblick/den/collection";
import Log from "@lichtblick/log";
import { MessageEvent } from "@lichtblick/suite";
Expand All @@ -21,8 +26,6 @@ import {
} from "@lichtblick/suite-base/players/types";
import delay from "@lichtblick/suite-base/util/delay";

import { toRFC3339String } from "@foxglove/rostime";

const log = Log.getLogger(__filename);

const DEFAULT_CACHE_SIZE_BYTES = 1.0e9;
Expand Down
9 changes: 6 additions & 3 deletions benchmark/src/players/PointcloudPlayer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

import * as rostime from "@foxglove/rostime";
import { Time } from "@foxglove/rostime";

import Log from "@lichtblick/log";
import { MessageEvent } from "@lichtblick/suite";
import { GlobalVariables } from "@lichtblick/suite-base/hooks/useGlobalVariables";
Expand All @@ -17,9 +23,6 @@ import {
} from "@lichtblick/suite-base/players/types";
import { RosDatatypes } from "@lichtblick/suite-base/types/RosDatatypes";

import * as rostime from "@foxglove/rostime";
import { Time } from "@foxglove/rostime";

import { BenchmarkStats } from "../BenchmarkStats";

const log = Log.getLogger(__filename);
Expand Down
9 changes: 6 additions & 3 deletions benchmark/src/players/SinewavePlayer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

import * as rostime from "@foxglove/rostime";
import { Time } from "@foxglove/rostime";

import Log from "@lichtblick/log";
import { MessageEvent } from "@lichtblick/suite";
import { GlobalVariables } from "@lichtblick/suite-base/hooks/useGlobalVariables";
Expand All @@ -17,9 +23,6 @@ import {
} from "@lichtblick/suite-base/players/types";
import { RosDatatypes } from "@lichtblick/suite-base/types/RosDatatypes";

import * as rostime from "@foxglove/rostime";
import { Time } from "@foxglove/rostime";

import { BenchmarkStats } from "../BenchmarkStats";

const log = Log.getLogger(__filename);
Expand Down
11 changes: 7 additions & 4 deletions benchmark/src/players/TransformPlayer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

import * as rostime from "@foxglove/rostime";
import { Time } from "@foxglove/rostime";
import { FrameTransform } from "@foxglove/schemas";

import Log from "@lichtblick/log";
import { MessageEvent } from "@lichtblick/suite";
import { GlobalVariables } from "@lichtblick/suite-base/hooks/useGlobalVariables";
Expand All @@ -18,10 +25,6 @@ import {
import { RosDatatypes } from "@lichtblick/suite-base/types/RosDatatypes";
import { Quaternion } from "@lichtblick/suite-base/util/geometry";

import * as rostime from "@foxglove/rostime";
import { Time } from "@foxglove/rostime";
import { FrameTransform } from "@foxglove/schemas";

import { now } from "./time";
import { BenchmarkStats } from "../BenchmarkStats";

Expand Down
9 changes: 6 additions & 3 deletions benchmark/src/players/TransformPreloadingPlayer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

import { Time, compare } from "@foxglove/rostime";
import { FrameTransform, Vector3 } from "@foxglove/schemas";

import Log from "@lichtblick/log";
import { MessageEvent } from "@lichtblick/suite";
import { GlobalVariables } from "@lichtblick/suite-base/hooks/useGlobalVariables";
Expand All @@ -22,9 +28,6 @@ import {
import { RosDatatypes } from "@lichtblick/suite-base/types/RosDatatypes";
import delay from "@lichtblick/suite-base/util/delay";

import { Time, compare } from "@foxglove/rostime";
import { FrameTransform, Vector3 } from "@foxglove/schemas";

const log = Log.getLogger(__filename);

const CAPABILITIES: string[] = [PlayerCapabilities.playbackControl];
Expand Down
3 changes: 3 additions & 0 deletions benchmark/src/players/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
3 changes: 3 additions & 0 deletions benchmark/src/players/time.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
3 changes: 3 additions & 0 deletions benchmark/src/services/MemoryAppConfiguration.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
3 changes: 3 additions & 0 deletions benchmark/src/services/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
8 changes: 6 additions & 2 deletions benchmark/webpack.config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

import type { WebpackArgv } from "@lichtblick/suite-base/WebpackArgv";
import { makeConfig } from "@lichtblick/suite-base/webpack";
import ReactRefreshPlugin from "@pmmmwh/react-refresh-webpack-plugin";
import { CleanWebpackPlugin } from "clean-webpack-plugin";
import HtmlWebpackPlugin from "html-webpack-plugin";
import path from "path";
import { Configuration, WebpackPluginInstance } from "webpack";
import type { Configuration as WebpackDevServerConfiguration } from "webpack-dev-server";

import type { WebpackArgv } from "@lichtblick/suite-base/WebpackArgv";
import { makeConfig } from "@lichtblick/suite-base/webpack";

interface WebpackConfiguration extends Configuration {
devServer?: WebpackDevServerConfiguration;
}
Expand Down
3 changes: 3 additions & 0 deletions ci/bump-nightly-version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
3 changes: 3 additions & 0 deletions ci/exec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
3 changes: 3 additions & 0 deletions ci/license-check.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
3 changes: 3 additions & 0 deletions ci/lint-dependencies.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
3 changes: 3 additions & 0 deletions ci/lint-unused-exports.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
Expand Down
6 changes: 5 additions & 1 deletion desktop/electronBuilderConfig.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
// SPDX-FileCopyrightText: Copyright (C) 2023-2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)<[email protected]>
// SPDX-License-Identifier: MPL-2.0

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/

const path = require("path");

const {
makeElectronBuilderConfig,
} = require("@lichtblick/suite-desktop/src/electronBuilderConfig");
const path = require("path");

module.exports = makeElectronBuilderConfig({
appPath: path.resolve(__dirname, ".webpack"),
Expand Down
Loading

0 comments on commit fd48379

Please sign in to comment.