Last active
August 30, 2021 11:33
-
-
Save AlexZeitler/dbd4c5648d18df321accfcaa9f1c3465 to your computer and use it in GitHub Desktop.
TypeScript + Node + VS Code Project settings
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
root = false | |
[**/**.yml] | |
indent_style = space | |
indent_size = 2 | |
insert_final_newline = true | |
[**/**.ts] | |
indent_style = space | |
indent_size = 2 | |
insert_final_newline = true | |
[**/**.js] | |
indent_style = space | |
indent_size = 2 | |
insert_final_newline = true | |
[**/**.html] | |
indent_style = space | |
indent_size = 2 | |
insert_final_newline = true | |
[**/**.json] | |
indent_style = space | |
indent_size = 2 | |
insert_final_newline = true |
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
module.exports = { | |
extends: [ | |
'eslint:recommended', | |
'plugin:@typescript-eslint/recommended', | |
'plugin:prettier/recommended' | |
], | |
env: { | |
node: true, | |
mocha: true, | |
es6: true | |
}, | |
plugins: ['@typescript-eslint', 'prettier'], | |
parserOptions: { | |
parser: '@typescript-eslint/parser' | |
} | |
} |
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
module.exports = { | |
printWidth: 80, | |
tabWidth: 2, | |
singleQuote: true, | |
quoteProps: 'as-needed', | |
trailingComma: 'none', | |
bracketSpacing: true, | |
semi: false, | |
useTabs: false, | |
jsxBracketSameLine: false, | |
proseWrap: 'never' | |
} |
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
module.exports = { extends: ['@commitlint/config-conventional'] } |
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
#!/usr/bin/env bash | |
npx husky-init && yarn | |
npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"' | |
yarn add --dev typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-import eslint-plugin-prettier prettier eslint-watch @commitlint/cli @commitlint/config-conventional @types/node@10 nodemon mocha ts-mocha @types/mocha should |
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
{ | |
"watch": ["src"], | |
"ext": "ts", | |
"ignore": ["src/**/*.spec.ts"], | |
"exec": "yarn start" | |
} |
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
{ | |
"scripts": { | |
"build": "tsc", | |
"start": "yarn build && node src/server.js", | |
"test": "ts-mocha test/**/*.ts --exit", | |
"watch": "nodemon" | |
}, | |
"husky": { | |
"hooks": { | |
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | |
} | |
}, | |
"commitlint": { | |
"extends": [ | |
"@commitlint/config-angular" | |
] | |
} | |
} |
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
{ | |
"mochaExplorer.files": "test/**/*.ts", | |
"mochaExplorer.require": "ts-mocha", | |
"mochaExplorer.exit": true, | |
"mochaExplorer.timeout": 5000, | |
"editor.formatOnSave": true, | |
"editor.formatOnPaste": true, | |
"[typescript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[json]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[javascript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
} | |
} |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es6", | |
"module": "commonjs", | |
"esModuleInterop": true, | |
"moduleResolution": "node", | |
/* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | |
"allowJs": false, | |
/* Allow javascript files to be compiled. */ | |
"checkJs": false, | |
/* Report errors in .js files. */ | |
"sourceMap": true, | |
/* Generates corresponding '.map' file. */ | |
"strict": true, | |
/* Allow implicit any */ | |
"noImplicitAny": false, | |
/* Raise error on expressions and declarations with an implied 'any' type. */ | |
"strictFunctionTypes": true, | |
/* Enable strict checking of function types. */ | |
"allowSyntheticDefaultImports": true, | |
/* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ | |
"typeRoots": ["node_modules/@types"] | |
}, | |
"include": ["types","src/**/*.ts", "test"], | |
"exclude": ["node_modules",] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment