refactor: use shared typescript config

This commit is contained in:
abhijithvijayan 2020-04-07 23:41:10 +05:30
parent d1835068a3
commit 41c17c6b97
3 changed files with 22 additions and 40 deletions

View File

@ -30,6 +30,7 @@
"webextension-polyfill-ts": "^0.14.0"
},
"devDependencies": {
"@abhijithvijayan/tsconfig": "^1.1.2",
"@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.9.0",

View File

@ -1,48 +1,24 @@
{
"compilerOptions": {
"extends": "@abhijithvijayan/tsconfig",
"compilerOptions": {
"outDir": "dist",
/* for manifest/index.js */
"allowJs": true,
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "esnext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"target": "es5", // ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.
"module": "esnext", // Module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'.
"jsx": "react",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"removeComments": true, /* Do not emit comments to output. */
"noEmit": true, /* Do not emit outputs. */
"noEmitOnError": true,
"esModuleInterop": true,
"isolatedModules": true,
/* Strict Type-Checking Options */
"strict": true,
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
"dom",
"dom.iterable",
"esnext"
],
"noEmit": true, // Do not emit outputs.
"esModuleInterop": true,
"isolatedModules": true,
/* Additional Checks */
"allowSyntheticDefaultImports": true,
"noUnusedParameters": true, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"useDefineForClassFields": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
/* Module Resolution Options */
"moduleResolution": "node",
"resolveJsonModule": true,
"declaration": true,
"pretty": true,
"newLine": "lf",
"stripInternal": true,
"noUnusedLocals": true
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules"
},
"include": [
"src"
]
}

View File

@ -2,6 +2,11 @@
# yarn lockfile v1
"@abhijithvijayan/tsconfig@^1.1.2":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@abhijithvijayan/tsconfig/-/tsconfig-1.1.2.tgz#37e3da206bcfb3bf782bbc2ba992f635c30b36ee"
integrity sha512-Dk1QXwuV2HKMIiaRQp0Gv+nZRKoNGw4YVLk4ap3HVIFd0lw8+Qrvl043XKWETk0XSgt+z9O5+pYdJVvuay2W5Q==
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"