Created
June 11, 2019 16:17
-
-
Save agniswarm/d3e185f6d5be97cc6c51b1e89c22565f to your computer and use it in GitHub Desktop.
Linting with prettier and TSLint and husky
This file contains hidden or 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
{ | |
"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 | |
} |
This file contains hidden or 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
{ | |
"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" | |
} | |
} | |
} |
This file contains hidden or 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
{ | |
"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