Skip to content
This repository was archived by the owner on Mar 25, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions src/configs/latest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,57 +18,6 @@
// tslint:disable object-literal-sort-keys
// tslint:disable:object-literal-key-quotes
export const rules = {
// added in v3.x
"no-invalid-this": false,
"no-angle-bracket-type-assertion": true,

// added in v4.1
"only-arrow-functions": {
options: [
"allow-declarations",
// the following option was added in 4.1
"allow-named-functions",
],
},
"prefer-const": true,

// added in v4.2
"callable-types": true,
"interface-over-type-literal": true,
"no-empty-interface": true,
"no-string-throw": true,

// added in v4.3
"import-spacing": true,
"space-before-function-paren": {
options: {
"anonymous": "never",
"asyncArrow": "always",
"constructor": "never",
"method": "never",
"named": "never",
},
},
"typeof-compare": true,
"unified-signatures": true,

// added in v4.4
"arrow-return-shorthand": true,
"no-unnecessary-initializer": true,
"no-misused-new": true,

// added in v4.5
"ban-types": {
options: [
["Object", "Avoid using the `Object` type. Did you mean `object`?"],
["Function", "Avoid using the `Function` type. Prefer a specific function type, like `() => void`."],
["Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?"],
["Number", "Avoid using the `Number` type. Did you mean `number`?"],
["String", "Avoid using the `String` type. Did you mean `string`?"],
["Symbol", "Avoid using the `Symbol` type. Did you mean `symbol`?"],
],
},
"no-duplicate-super": true,
};
// tslint:enable object-literal-sort-keys

Expand Down
52 changes: 49 additions & 3 deletions src/configs/recommended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ export const rules = {
options: ["array-simple"],
},
"arrow-parens": true,
"arrow-return-shorthand": true,
"ban-types": {
options: [
["Object", "Avoid using the `Object` type. Did you mean `object`?"],
["Function", "Avoid using the `Function` type. Prefer a specific function type, like `() => void`."],
["Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?"],
["Number", "Avoid using the `Number` type. Did you mean `number`?"],
["String", "Avoid using the `String` type. Did you mean `string`?"],
["Symbol", "Avoid using the `Symbol` type. Did you mean `symbol`?"],
],
},
"callable-types": true,
"class-name": true,
"comment-format": {
options: ["check-space"],
Expand All @@ -35,12 +47,14 @@ export const rules = {
"cyclomatic-complexity": false,
"eofline": true,
"forin": true,
"import-spacing": true,
"indent": {
options: ["spaces"],
},
"interface-name": {
options: ["always-prefix"],
},
"interface-over-type-literal": true,
"jsdoc-format": true,
"label-position": true,
"max-classes-per-file": {
Expand All @@ -56,6 +70,7 @@ export const rules = {
},
},
"new-parens": true,
"no-angle-bracket-type-assertion": true,
"no-any": false,
"no-arg": true,
"no-bitwise": true,
Expand All @@ -73,16 +88,22 @@ export const rules = {
},
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
"no-empty": true,
"no-empty-interface": true,
"no-eval": true,
"no-internal-module": true,
"no-invalid-this": false,
"no-misused-new": true,
"no-namespace": true,
"no-parameter-properties": false,
"no-reference": true,
"no-shadowed-variable": true,
"no-string-literal": true,
"no-string-throw": true,
"no-switch-case-fall-through": false,
"no-trailing-whitespace": true,
"no-unnecessary-initializer": true,
"no-unsafe-finally": true,
"no-unused-expression": true,
// disable this rule as it is very heavy performance-wise and not that useful
Expand All @@ -107,14 +128,18 @@ export const rules = {
options: ["ignore-for-loop"],
},
"only-arrow-functions": {
options: ["allow-declarations"],
options: [
"allow-declarations",
"allow-named-functions",
],
},
"ordered-imports": {
options: {
"import-sources-order": "case-insensitive",
"named-imports-order": "case-insensitive",
},
},
"prefer-const": true,
"prefer-for-of": true,
"quotemark": {
options: [
Expand All @@ -126,7 +151,15 @@ export const rules = {
"semicolon": {
options: ["always"],
},
"switch-default": true,
"space-before-function-paren": {
options: {
anonymous: "never",
asyncArrow: "always",
constructor: "never",
method: "never",
named: "never",
},
},
"trailing-comma": {
options: {
multiline: "always",
Expand All @@ -152,6 +185,8 @@ export const rules = {
"variable-declaration": "onespace",
}],
},
"typeof-compare": true,
"unified-signatures": true,
"use-isnan": true,
"variable-name": {
options: [
Expand Down Expand Up @@ -182,6 +217,7 @@ export const jsRules = {
"curly": true,
"eofline": true,
"forin": true,
"import-spacing": true,
"indent": {
options: ["spaces"],
},
Expand All @@ -207,12 +243,14 @@ export const jsRules = {
},
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
"no-duplicate-variable": true,
"no-empty": true,
"no-eval": true,
"no-reference": true,
"no-shadowed-variable": true,
"no-string-literal": true,
"no-string-throw": true,
"no-switch-case-fall-through": false,
"no-trailing-whitespace": true,
"no-unused-expression": true,
Expand Down Expand Up @@ -241,7 +279,15 @@ export const jsRules = {
"semicolon": {
options: ["always"],
},
"switch-default": true,
"space-before-function-paren": {
options: {
anonymous: "never",
asyncArrow: "always",
constructor: "never",
method: "never",
named: "never",
},
},
"trailing-comma": {
options: {
multiline: "always",
Expand Down