Skip to content

Instantly share code, notes, and snippets.

@agniswarm
Created June 11, 2019 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agniswarm/d3e185f6d5be97cc6c51b1e89c22565f to your computer and use it in GitHub Desktop.
Save agniswarm/d3e185f6d5be97cc6c51b1e89c22565f to your computer and use it in GitHub Desktop.
Linting with prettier and TSLint and husky
{
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 100,
"proseWrap": "always",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"trailingComma": "all",
"useTabs": false
}
{
"name": "node-js-server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "tsc --removeComments",
"pretty": "prettier --write ./**/*.ts",
"lint": "tslint --fix -c tslint.json --project ./"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
},
"devDependencies": {
"husky": "^2.4.0",
"prettier": "^1.18.2",
"tslint": "^5.17.0",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"typescript": "^3.4.1"
},
"husky": {
"hooks": {
"pre-commit": "npm run pretty && npm run lint"
}
}
}
{
"defaultSeverity": "error",
"extends": [
"tslint:latest",
"tslint-config-prettier",
"tslint-plugin-prettier"
],
"jsRules": {},
"rules": {
"no-console": false,
"no-any": true,
"array-type": [
true,
"generic"
],
"arrow-return-shorthand": true,
"object-literal-sort-keys": false
},
"rulesDirectory": [],
"linterOptions": {
"exclude": [
"node_modules/**"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment