Skip to content

Commit

Permalink
fix: reinstate settings that were removed from tslint:recommended in …
Browse files Browse the repository at this point in the history
…tslint v6
  • Loading branch information
djcsdy committed Mar 18, 2020
1 parent 2515669 commit 74742d6
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
1 change: 1 addition & 0 deletions .idea/dictionaries/djc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 68 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
const jsRules = {
"align": {
options: ["parameters", "statements"]
},
"arrow-return-shorthand": true,
"comment-format": {
options: "check-space"
},
"curly": true,
"encoding": true,
"eofline": false,
"function-constructor": true,
"import-spacing": true,
"indent": false,
"max-line-length": {
options: [120]
},
"member-access": true,
"member-ordering": {
options: {
order: "statics-first"
}
},
"no-bitwise": false,
"no-consecutive-blank-lines": {
options: [2]
Expand All @@ -22,19 +37,51 @@ const jsRules = {
"no-return-await": true,
"no-shadowed-variable": false,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unexpected-multiline": true,
"no-unnecessary-callback-wrapper": true,
"no-unsafe-finally": true,
"object-literal-key-quotes": {
options: ["consistent-as-needed"]
},
"object-literal-sort-keys": false,
"one-line": {
options: [
"check-catch",
"check-else",
"check-finally",
"check-open-brace",
"check-whitespace"
]
},
"ordered-imports": {
options: {
"import-sources-order": "case-insensitive",
"module-source-path": "full",
"named-imports-order": "case-insensitive"
}
},
"prefer-function-over-method": {
options: ["allow-public", "allow-protected"]
},
"prefer-for-of": false,
"prefer-while": true,
"promise-function-async": true,
"quotemark": {
options: ["double", "avoid-escape"]
},
"semicolon": {
options: ["always"]
},
"space-before-function-paren": {
options: {
anonymous: "never",
asyncArrow: "always",
constructor: "never",
method: "never",
named: "never"
}
},
"ter-indent": {
options: [4, {
CallExpression: {
Expand Down Expand Up @@ -87,6 +134,9 @@ const jsRules = {

const rules = {
...jsRules,
"array-type": {
options: ["array-simple"]
},
"arrow-parens": false,
"await-promise": true,
"interface-name": false,
Expand Down Expand Up @@ -120,6 +170,24 @@ const rules = {
options: [
"call-signature"
]
},
"typedef-whitespace": {
options: [
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
},
{
"call-signature": "onespace",
"index-signature": "onespace",
"parameter": "onespace",
"property-declaration": "onespace",
"variable-declaration": "onespace"
}
]
}
};

Expand Down

0 comments on commit 74742d6

Please sign in to comment.