Skip to content

Commit

Permalink
chore(_tools): fix type errors in _tools (#3635)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k committed Sep 13, 2023
1 parent 63bc0d3 commit 62315dc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,7 @@ jobs:
run: deno fmt --check

- name: Lint
run: deno lint

- name: Check License headers
run: deno task fmt:licence-headers --check

- name: Check Deprecations
run: "deno task lint:deprecations"

- name: Check Import paths in Docs
run: "deno task lint:doc-imports"

- name: Check circular dependencies between modules
run: "deno task lint:circular"
run: deno task lint

- name: Spell-check
uses: crate-ci/typos@master
Expand Down
2 changes: 1 addition & 1 deletion _tools/check_deprecation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ let shouldFail = false;
const DEFAULT_DEPRECATED_VERSION = semver.increment(
semver.increment(
semver.increment(
VERSION,
semver.parse(VERSION),
"minor",
)!,
"minor",
Expand Down
4 changes: 2 additions & 2 deletions _tools/check_doc_imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ function checkImportStatements(
);
const importDeclarations = sourceFile.statements.filter((s) =>
s.kind === SyntaxKind.ImportDeclaration
) as ImportDeclaration[];
) as ts.ImportDeclaration[];

for (const importDeclaration of importDeclarations) {
const { moduleSpecifier } = importDeclaration;
const importPath = (moduleSpecifier as StringLiteral).text;
const importPath = (moduleSpecifier as ts.StringLiteral).text;
const isRelative = importPath.startsWith(".");
const isInternal = importPath.startsWith(
"https://deno.land/std@$STD_VERSION/",
Expand Down
3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"lint:deprecations": "deno run --allow-read --allow-net ./_tools/check_deprecation.ts",
"lint:doc-imports": "deno run --allow-env --allow-read ./_tools/check_doc_imports.ts",
"lint:circular": "deno run --allow-env --allow-read --allow-net=deno.land ./_tools/check_circular_submodule_dependencies.ts",
"lint": "deno lint && deno task fmt:licence-headers --check && deno task lint:deprecations && deno task lint:doc-imports && deno task lint:circular",
"lint:tools-types": "deno check _tools/*.ts",
"lint": "deno lint && deno task fmt:licence-headers --check && deno task lint:deprecations && deno task lint:doc-imports && deno task lint:circular && deno task lint:tools-types",
"typos": "typos -c ./.github/workflows/typos.toml",
"build:crypto": "deno task --cwd crypto/_wasm wasmbuild",
"wasmbuild": "deno run --unstable -A https://deno.land/x/wasmbuild@0.10.3/main.ts --js-ext mjs --sync"
Expand Down

0 comments on commit 62315dc

Please sign in to comment.