Skip to content

Commit

Permalink
Use multiline eslint ignores where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinez committed Aug 29, 2024
1 parent 7c9f1a0 commit 6c00951
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/lib/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import { routeToPath } from "@app/lib/router";
import { canonicalize, isUrl } from "@app/lib/utils";

dompurify.setConfig({
// eslint-disable-next-line @typescript-eslint/naming-convention
/* eslint-disable @typescript-eslint/naming-convention */
SANITIZE_DOM: false,
// eslint-disable-next-line @typescript-eslint/naming-convention
FORBID_TAGS: ["textarea", "style"],
/* eslint-enable @typescript-eslint/naming-convention */
});

// Converts self closing anchor tags into empty anchor tags, to avoid erratic wrapping behaviour
Expand Down
7 changes: 2 additions & 5 deletions src/modals/ColorPaletteModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,26 @@
(acc, sheet) =>
(acc = [
...acc,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
/* eslint-disable @typescript-eslint/ban-ts-comment */
// @ts-ignore
...Array.from(sheet.cssRules).reduce(
(def, rule) =>
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
(def =
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
rule.selectorText === ":root"
? [
...def,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
...Array.from(rule.style).filter(name =>
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
name.startsWith(variableName),
),
]
: def),
[],
),
/* eslint-enable @typescript-eslint/ban-ts-comment */
]),
[],
);
Expand Down
3 changes: 2 additions & 1 deletion tests/support/fixtures.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/naming-convention */
import type { Config } from "@http-client";
import type { PeerManager, RadiclePeer } from "./peerManager.js";
import type * as Stream from "node:stream";
Expand Down Expand Up @@ -610,6 +609,7 @@ export const markdownUrl = `/nodes/127.0.0.1/${markdownRid}`;
export const shortNodeRemote = "z6MktU…1xB22S";
export const defaultHttpdPort = 8081;
export const gitOptions = {
/* eslint-disable @typescript-eslint/naming-convention */
alice: {
GIT_AUTHOR_NAME: "Alice Liddell",
GIT_AUTHOR_EMAIL: "[email protected]",
Expand All @@ -626,6 +626,7 @@ export const gitOptions = {
GIT_COMMITTER_EMAIL: "[email protected]",
GIT_COMMITTER_DATE: "1671627600",
},
/* eslint-enable @typescript-eslint/naming-convention */
};
export const defaultConfig: Config = {
publicExplorer: "https://app.radicle.xyz/nodes/$host/$rid$path",
Expand Down
5 changes: 4 additions & 1 deletion tests/support/peerManager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/naming-convention */
import type { Config, BaseUrl } from "@http-client";
import type * as Execa from "execa";

Expand Down Expand Up @@ -209,10 +208,12 @@ export class RadiclePeer {

const env = {
...gitOptions,
/* eslint-disable @typescript-eslint/naming-convention */
RAD_HOME: radHome,
RAD_PASSPHRASE: "asdf",
RAD_KEYGEN_SEED: node,
RAD_SOCKET: socket,
/* eslint-enable @typescript-eslint/naming-convention */
};

await execa("rad", ["auth", "--alias", name], { env });
Expand Down Expand Up @@ -380,13 +381,15 @@ export class RadiclePeer {
const childProcess = execa(cmd, args, {
...opts,
env: {
/* eslint-disable @typescript-eslint/naming-convention */
GIT_CONFIG_GLOBAL: "/dev/null",
GIT_CONFIG_NOSYSTEM: "1",
RAD_HOME: this.#radHome,
RAD_PASSPHRASE: "asdf",
RAD_LOCAL_TIME: "1671125284",
RAD_KEYGEN_SEED: this.#radSeed,
RAD_SOCKET: this.#socket,
/* eslint-enable @typescript-eslint/naming-convention */
...opts?.env,
...this.#gitOptions,
},
Expand Down

0 comments on commit 6c00951

Please sign in to comment.