Skip to content

Instantly share code, notes, and snippets.

@elnygren
Created December 3, 2018 15:48
Show Gist options
  • Save elnygren/7d575cab6da1c5067bfa1d5c371c49f1 to your computer and use it in GitHub Desktop.
Save elnygren/7d575cab6da1c5067bfa1d5c371c49f1 to your computer and use it in GitHub Desktop.
TSLINT + Prettier
{
"extends": [
"tslint:recommended",
"tslint-config-prettier"
],
"rulesDirectory": [
"tslint-plugin-prettier"
],
"rules": {
"no-console": false,
"interface-name": false,
"max-classes-per-file": false,
"no-reference": false,
"no-var-requires": false,
"object-literal-sort-keys": false,
"semicolon": [true, "never"],
"indent": [true, "spaces", 2],
"quotemark": [
true,
"single",
"avoid-escape",
"avoid-template"
],
"variable-name": [
true,
"ban-keywords",
"check-format",
"allow-leading-underscore",
"allow-pascal-case"
],
"prettier": [true, {
"printWidth": 120,
"semi": false,
"singleQuote": true,
"jsxSingleQuote": false,
"trailingComma": "all",
"tabWidth": 2,
"useTabs": false,
"parser": "typescript"
}]
},
"linterOptions": {
"exclude": [
"bin/**/*",
"docs/**/*",
"fixtures/**/*",
"node_modules/**/*.ts",
"test/**/*",
"src/**/*.js",
"build/**/*"
]
}
}
@elnygren
Copy link
Author

elnygren commented Dec 3, 2018

npm i -D tslint tslint-config-prettier tslint-plugin-prettier prettier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment