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" "webextension-polyfill-ts": "^0.14.0"
}, },
"devDependencies": { "devDependencies": {
"@abhijithvijayan/tsconfig": "^1.1.2",
"@babel/core": "^7.9.0", "@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.9.0", "@babel/plugin-proposal-object-rest-spread": "^7.9.0",

View File

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

View File

@ -2,6 +2,11 @@
# yarn lockfile v1 # 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": "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3":
version "7.8.3" version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"