[TypeScript] - Enable a TsConfig Ready (#3441)

* ts && tslint enabled

* tslint script

* jsx

* strict null checks

* added react types

* allowJS

* Added some fix in schemas and runing tslint well

* electron-build triggers build indirectly
This commit is contained in:
Raul Hidalgo Caballero 2018-02-27 19:23:46 +01:00 коммит произвёл French Ben
Родитель 26abc33e61
Коммит c6667350e0
8 изменённых файлов: 2373 добавлений и 1025 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -4,6 +4,7 @@ build
dist
dist-electron-builder/
release
src/**/*.js.map
installer
node_modules
coverage

3333
package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -11,19 +11,21 @@
},
"bugs": "https://github.com/kitematic/kitematic/issues",
"scripts": {
"start": "grunt",
"start-dev": "NODE_ENV=development grunt",
"test": "jest -c jest-unit.json",
"build": "tsc && npm run tslint",
"integration": "jest -c jest-integration.json",
"release": "grunt release",
"release:linux": "grunt release && electron-builder --linux",
"release:mac": "grunt release && electron-builder --mac",
"release:windows": "grunt release && electron-builder --windows",
"release-verbose": "grunt --verbose release",
"lint": "eslint src"
"postinstall": "npm run build",
"prestart": "npm run build",
"release": "npm run build && grunt release",
"release-verbose": "npm run build && grunt --verbose release",
"release:linux": "npm run release && electron-builder --linux",
"release:mac": "npm run release && electron-builder --mac",
"release:windows": "npm run release && electron-builder --windows",
"start": "grunt",
"start-dev": "npm run build && NODE_ENV=development grunt",
"test": "jest -c jest-unit.json",
"tslint": "tslint --fix --project ./tsconfig.json"
},
"license": "Apache-2.0",
"electron-version": "1.7.11",
"electron-version": "1.8.2",
"dependencies": {
"JSONStream": "^1.0.7",
"alt": "^0.16.2",
@ -58,10 +60,11 @@
"which": "^1.2.4"
},
"devDependencies": {
"@types/react": "^16.0.31",
"babel": "^5.8.23",
"babel-jest": "^5.2.0",
"electron": "^1.7.11",
"electron-builder": "^19.55.2",
"electron": "^1.8.2",
"electron-builder": "^20.2.0",
"eslint": "^4.1.1",
"eslint-plugin-react": "^3.3.0",
"grunt": "^0.4.5",
@ -92,7 +95,9 @@
"minimist": "^1.1.1",
"run-sequence": "^1.0.2",
"shell-escape": "^0.2.0",
"source-map-support": "^0.3.2"
"source-map-support": "^0.3.2",
"tslint": "^5.9.1",
"typescript": "^2.7.2"
},
"optionalDependencies": {
"grunt-electron-installer-debian": "^0.3.0",

Просмотреть файл

@ -1 +1,2 @@
import './app';
import "./app";
//# sourceMappingURL=main.js.map

1
src/main.js.map Normal file
Просмотреть файл

@ -0,0 +1 @@
{"version":3,"file":"main.js","sourceRoot":"","sources":["main.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,CAAC"}

1
src/main.ts Normal file
Просмотреть файл

@ -0,0 +1 @@
import "./app";

22
tsconfig.json Normal file
Просмотреть файл

@ -0,0 +1,22 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"compilerOptions": {
"checkJs": false,
"charset": "utf-8",
"jsx": "preserve",
"module": "es2015",
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitUseStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"strictNullChecks": true,
"target": "es2015"
},
"files": [
"./src/main.ts"
]
}

4
tslint.json Normal file
Просмотреть файл

@ -0,0 +1,4 @@
{
"$schema": "http://json.schemastore.org/tslint",
"extends": "tslint:recommended"
}