Skip to content

Commit

Permalink
chore: Add type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlancollins committed Dec 31, 2023
1 parent 440a5c4 commit e6633ef
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions bin/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ async function requireOrImport(path) {
if (pathToFileURL && e.code === 'ERR_REQUIRE_ESM') {
// This is needed on Windows, because import() fails if providing a Windows file path.
const url = pathToFileURL(path)
// @ts-expect-error
return import(url)
}
throw e
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,17 @@
"prettier": "prettier --ignore-unknown '**/*'",
"prettier:write": "pnpm run prettier --write",
"test:build": "publint --strict",
"test:types": "tsc",
"test:eslint": "eslint --ext .ts,.tsx src",
"test:format": "pnpm run prettier --check",
"test:pr": "nx run-many --targets=test:format,test:eslint,test:build",
"test:ci": "nx run-many --targets=test:format,test:eslint,test:build"
"test:pr": "nx run-many --targets=test:format,test:eslint,test:types,test:build",
"test:ci": "nx run-many --targets=test:format,test:eslint,test:types,test:build"
},
"nx": {
"includedScripts": [
"test:format",
"test:eslint",
"test:types",
"test:build"
]
},
Expand Down
22 changes: 13 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"allowUnreachableCode": true,
"baseUrl": ".",
"checkJs": true,
"declaration": true,
"esModuleInterop": true,
"lib": ["ES2022"],
"target": "ES2020",
"module": "ES2020",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"strict": true,
"noUncheckedIndexedAccess": true,
"strictNullChecks": true,
"declaration": true,
"noEmit": true,
"noImplicitAny": false,
"noImplicitReturns": true,
"esModuleInterop": true,
"noUncheckedIndexedAccess": true,
"skipLibCheck": true,
"baseUrl": ".",
"allowUnreachableCode": true
"strict": false,
"strictNullChecks": true,
"target": "ES2020"
},
"include": ["bin", "prettier.config.js", "src"]
}

0 comments on commit e6633ef

Please sign in to comment.