Skip to content

Commit

Permalink
feat: wherever possible, apply rules to JavaScript as well as TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
djcsdy committed Mar 18, 2020
1 parent 74742d6 commit 53a92ca
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const jsRules = {
"align": {
options: ["parameters", "statements"]
},
"arrow-parens": false,
"arrow-return-shorthand": true,
"comment-format": {
options: "check-space"
Expand All @@ -12,6 +13,7 @@ const jsRules = {
"function-constructor": true,
"import-spacing": true,
"indent": false,
"max-classes-per-file": false,
"max-line-length": {
options: [120]
},
Expand All @@ -26,21 +28,34 @@ const jsRules = {
options: [2]
},
"no-console": false,
"no-duplicate-imports": true,
"no-duplicate-switch-case": true,
"no-duplicate-variable": true,
"no-empty": false,
"no-empty-character-class": true,
"no-for-in-array": true,
"no-implicit-dependencies": [true, ["ava"]],
"no-invalid-regexp": true,
"no-irregular-whitespace": true,
"no-multi-spaces": true,
"no-return-await": true,
"no-shadowed-variable": false,
"no-switch-case-fall-through": true,
"no-this-assignment": true,
"no-trailing-whitespace": true,
"no-unbound-method": {
options: ["ignore-static"]
},
"no-unexpected-multiline": true,
"no-unnecessary-callback-wrapper": true,
"no-unnecessary-class": {
options: ["allow-constructor-only"]
},
"no-unsafe-finally": true,
"no-var-keyword": true,
"no-void-expression": {
options: ["ignore-arrow-function-shorthand"]
},
"object-literal-key-quotes": {
options: ["consistent-as-needed"]
},
Expand All @@ -65,6 +80,7 @@ const jsRules = {
options: ["allow-public", "allow-protected"]
},
"prefer-for-of": false,
"prefer-object-spread": true,
"prefer-while": true,
"promise-function-async": true,
"quotemark": {
Expand All @@ -82,6 +98,9 @@ const jsRules = {
named: "never"
}
},
"space-within-parens": {
options: [0]
},
"ter-indent": {
options: [4, {
CallExpression: {
Expand Down Expand Up @@ -137,35 +156,15 @@ const rules = {
"array-type": {
options: ["array-simple"]
},
"arrow-parens": false,
"await-promise": true,
"interface-name": false,
"interface-over-type-literal": false,
"max-classes-per-file": false,
"no-boolean-literal-compare": true,
"no-duplicate-imports": true,
"no-duplicate-switch-case": true,
"no-floating-promises": true,
"no-for-in-array": true,
"no-inferred-empty-object-type": true,
"no-mergeable-namespace": true,
"no-redundant-jsdoc": true,
"no-this-assignment": true,
"no-unbound-method": {
options: ["ignore-static"]
},
"no-unnecessary-class": {
options: ["allow-constructor-only"]
},
"no-unnecessary-type-assertion": true,
"no-var-keyword": true,
"no-void-expression": {
options: ["ignore-arrow-function-shorthand"]
},
"prefer-object-spread": true,
"space-within-parens": {
options: [0]
},
"typedef": {
options: [
"call-signature"
Expand Down

0 comments on commit 53a92ca

Please sign in to comment.