1
0
Fork 0

fix(config): update lint to naming-convention rule

This commit is contained in:
ssube 2020-07-29 07:36:15 -05:00 committed by Sean Sube
parent 7d525fc4cd
commit 8db6b436c7
2 changed files with 42 additions and 4 deletions

View File

@ -35,7 +35,6 @@
} }
} }
], ],
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/consistent-type-assertions": "error", "@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/explicit-member-accessibility": [ "@typescript-eslint/explicit-member-accessibility": [
@ -61,7 +60,6 @@
"SwitchCase": 1 "SwitchCase": 1
} }
], ],
"@typescript-eslint/interface-name-prefix": "error",
"@typescript-eslint/member-delimiter-style": [ "@typescript-eslint/member-delimiter-style": [
"error", "error",
{ {
@ -89,6 +87,45 @@
] ]
} }
], ],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": [
"camelCase"
],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "variable",
"format": [
"camelCase",
"UPPER_CASE"
],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "typeLike",
"format": [
"PascalCase"
],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "interface",
"format": [
"PascalCase"
],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid",
"prefix": [
"I"
]
}
],
"@typescript-eslint/no-empty-function": "error", "@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "error", "@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error", "@typescript-eslint/no-explicit-any": "error",
@ -154,6 +191,7 @@
"error", "error",
"any", "any",
"Number", "Number",
"String",
"Boolean", "Boolean",
"Undefined" "Undefined"
], ],

View File

@ -9,7 +9,7 @@ Reject after a set amount of time if the original promise has not yet resolved.
<b>Signature:</b> <b>Signature:</b>
```typescript ```typescript
export declare function timeout<T>(ms: number, oper: Promise<T>): Promise<T>; export declare function timeout<T>(ms: number, oper: Promise<T>): Promise<Optional<T>>;
``` ```
## Parameters ## Parameters
@ -21,5 +21,5 @@ export declare function timeout<T>(ms: number, oper: Promise<T>): Promise<T>;
<b>Returns:</b> <b>Returns:</b>
Promise&lt;T&gt; Promise&lt;[Optional](./js-utils.optional.md)<!-- -->&lt;T&gt;&gt;