Skip to content

Commit

Permalink
chore: adjust tsconfig.json
Browse files Browse the repository at this point in the history
  • Loading branch information
wellyshen committed Oct 23, 2020
1 parent 9c90339 commit 1bdd163
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-cool-starter",
"version": "3.13.1",
"version": "3.13.2",
"description": "A starter boilerplate for a universal web application with the best development experience and best practices.",
"license": "MIT",
"homepage": "https://github.com/wellyshen/react-cool-starter",
Expand Down Expand Up @@ -47,7 +47,7 @@
"start": "cross-env NODE_ENV=production PORT=8080 ts-node --transpile-only --files .",
"build": "yarn clean:build && cross-env NODE_ENV=production webpack --progress --config ./tools/webpack/config.babel.js",
"analyze": "yarn clean:build && cross-env NODE_ENV=analyze webpack -p --progress --config ./tools/webpack/config.babel.js",
"type-check": "tsc --noEmit",
"type-check": "tsc",
"type-check:watch": "yarn type-check --watch",
"lint": "run-s lint:*",
"lint:code": "eslint --fix . --ext .js,.jsx,.ts,.tsx",
Expand Down
33 changes: 26 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
{
"compilerOptions": {
"outDir": "public/assets",
"sourceMap": true,
"noImplicitAny": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"strict": true,
"target": "esnext",
"module": "commonjs",
"target": "es6",
"jsx": "react"
"lib": ["dom", "dom.iterable", "esnext"],
"jsx": "react",
// Specify module resolution strategy: "node" (Node.js) or "classic" (TypeScript pre-1.6)
"moduleResolution": "node",
// Enable all strict type-checking options. Recommended by TS
"strict": true,
// Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports.
// Implies "allowSyntheticDefaultImports". Recommended by TS
"esModuleInterop": true,
// Skip type checking of declaration files. Recommended by TS
"skipLibCheck": true,
// Disallow inconsistently-cased references to the same file. Recommended by TS
"forceConsistentCasingInFileNames": true,
// Do not emit outputs
"noEmit": true,
// Raise error on expressions and declarations with an implied "any" type
"noImplicitAny": true,
// Report errors on unused locals
"noUnusedLocals": true,
// Report errors on unused parameters
"noUnusedParameters": true,
// Report error when not all code paths in function return a value
"noImplicitReturns": true,
// Report errors for fallthrough cases in switch statement
"noFallthroughCasesInSwitch": true
}
}

0 comments on commit 1bdd163

Please sign in to comment.