diff --git a/package.json b/package.json index 997417aa..5dea3df1 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", diff --git a/tsconfig.json b/tsconfig.json index de54bf1f..ad04958b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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 } }