Skip to content

Commit

Permalink
chore: lax some linting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
atilafassina committed Oct 5, 2024
1 parent 21a12a4 commit 77fc09e
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 31 deletions.
2 changes: 2 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export default tseslint.config(
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",

// These on-by-default rules don't work well for this repo and we like them off.
"no-constant-condition": "off",
Expand Down
4 changes: 2 additions & 2 deletions src/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DEV_DEFAULT_CSP, PROD_DEFAULT_CSP } from "./lib/csp/csp.js";
import { HeaderNames, SecHeaders } from "./types.js";
import { DEV_DEFAULT_CSP, PROD_DEFAULT_CSP } from "./lib/csp.js";

Check failure on line 1 in src/defaults.ts

View workflow job for this annotation

GitHub Actions / Lint

Can't resolve './lib/csp.js' in '/home/runner/work/shieldwall/shieldwall/src'

Check failure on line 1 in src/defaults.ts

View workflow job for this annotation

GitHub Actions / release

Cannot find module './lib/csp.js' or its corresponding type declarations.

Check failure on line 1 in src/defaults.ts

View workflow job for this annotation

GitHub Actions / Build

Cannot find module './lib/csp.js' or its corresponding type declarations.

Check failure on line 1 in src/defaults.ts

View workflow job for this annotation

GitHub Actions / Type Check

Cannot find module './lib/csp.js' or its corresponding type declarations.
import { type HeaderNames } from "./types.js";

export const HEADER_NAMES: HeaderNames = {
hsts: "Strict-Transport-Security",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import crypto from "node:crypto";
import { DEFAULT_HEADERS, HEADER_NAMES } from "./defaults.js";
import { SecHeaders } from "./types.js";
import { type SecHeaders } from "./types.js";
import { keyIsHeader } from "./utils.js";
import { generateCSP } from "./lib/csp/csp.js";
import { generateCSP } from "./lib/csp.js";

Check failure on line 5 in src/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Can't resolve './lib/csp.js' in '/home/runner/work/shieldwall/shieldwall/src'

Check failure on line 5 in src/index.ts

View workflow job for this annotation

GitHub Actions / Type Check

Cannot find module './lib/csp.js' or its corresponding type declarations.
import { type FetchEvent } from "@solidjs/start/server";
import { appendHeader } from "vinxi/http";

Expand Down
21 changes: 0 additions & 21 deletions src/shieldwall.test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CSPDirectives } from "csp-header";
import { type CSPDirectives } from "csp-header";

export interface CSPHeaderConfig {
dev?: CSP;
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HEADER_NAMES } from "./defaults.js";
import { HeaderNames } from "./types.js";
import { type HeaderNames } from "./types.js";

export function deepMerge(
target: Record<string, unknown>,
Expand Down
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "ES2022",
"paths": {
"~/*": ["./src/*"]
}
"target": "ES2022"
},
"include": ["src"]
}
1 change: 1 addition & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from "tsup";

export default defineConfig({
name: "shieldwall",
bundle: false,
clean: true,
dts: true,
Expand Down

0 comments on commit 77fc09e

Please sign in to comment.