-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update ts config and new linter (#697)
- add "isolatedModules": true, - "importsNotUsedAsValues": "error", - "noImplicitAny": true, - add a must read section to the ts docs - self lint BREAKING CHANGE: tsconfig changed and linter has new rules for ts files.
- Loading branch information
1 parent
605cd2a
commit e11b8fe
Showing
9 changed files
with
89 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
// project options | ||
"outDir": "dist", | ||
"allowJs": true, | ||
"checkJs": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitReturns": false, | ||
"noImplicitAny": false, | ||
"noImplicitThis": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": false, | ||
"strictFunctionTypes": true, | ||
"strictNullChecks": true, | ||
"strictPropertyInitialization": true, | ||
"strictBindCallApply": true, | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"alwaysStrict": true, | ||
"esModuleInterop": true, | ||
"stripInternal": true, | ||
"resolveJsonModule": true, | ||
"preserveConstEnums": true, | ||
"removeComments": false, | ||
"target": "ES2019", | ||
"moduleResolution": "node", | ||
"lib": ["ES2019", "ES2020.Promise", "ES2020.String", "ES2020.BigInt", "DOM", "DOM.Iterable"], | ||
"noEmitOnError": true, | ||
"noEmit": false, | ||
"noEmitOnError": true, | ||
"emitDeclarationOnly": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"incremental": true, | ||
"composite": true, | ||
"outDir": "dist" | ||
"isolatedModules": true, | ||
"removeComments": false, | ||
// module resolution | ||
"esModuleInterop": true, | ||
"moduleResolution": "node", | ||
// linter checks | ||
"noImplicitReturns": false, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": false, | ||
// advanced | ||
"importsNotUsedAsValues": "error", | ||
"forceConsistentCasingInFileNames": true, | ||
"skipLibCheck": true, | ||
"stripInternal": true, | ||
"resolveJsonModule": true | ||
}, | ||
"include": ["src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { hello } from './typed' | ||
|
||
export const main = ():void => { | ||
export const main = (): void => { | ||
hello('world') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const hello = (name:string):string => { | ||
export const hello = (name: string): string => { | ||
return `Hello ${name}` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "./src/config/tsconfig.aegir.json", | ||
"compilerOptions": { | ||
"outDir": "dist" | ||
}, | ||
"include": [ | ||
"src", "test" | ||
] | ||
} |