1
0
Fork 0

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

This commit is contained in:
ssube 2020-07-29 08:07:05 -05:00 committed by Sean Sube
parent 79dc6de749
commit 6646c32704
2 changed files with 60 additions and 5 deletions

View File

@ -35,7 +35,6 @@
}
}
],
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/explicit-member-accessibility": [
@ -61,7 +60,6 @@
"SwitchCase": 1
}
],
"@typescript-eslint/interface-name-prefix": "error",
"@typescript-eslint/member-delimiter-style": [
"error",
{
@ -89,6 +87,42 @@
]
}
],
"@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"
}
],
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
@ -212,9 +246,29 @@
"error",
{
"ignore": [
-3,
-2,
-1,
0,
1,
10
2,
3,
4,
5,
6,
7,
8,
9,
10,
20,
30,
40,
50,
60,
70,
80,
90,
100
]
}
],
@ -324,6 +378,7 @@
true,
"check-multiline-start"
],
"no-boolean-literal-compare": true,
"no-dynamic-delete": true,
"no-inferred-empty-object-type": true,
"no-reference-import": true,

View File

@ -205,8 +205,8 @@ export async function resolveRules(rules: Array<Rule>, selector: RuleSelector):
active = active || selector.includeName.includes(r.name);
active = active || includedTags.length > 0;
active = active && (selector.excludeLevel.includes(r.level) === false);
active = active && (selector.excludeName.includes(r.name) === false);
active = active && !selector.excludeLevel.includes(r.level);
active = active && !selector.excludeName.includes(r.name);
const excludedTags = intersection(selector.excludeTag, r.tags);
active = active && (excludedTags.length === 0);