1
0
Fork 0

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

This commit is contained in:
ssube 2020-07-29 08:23:37 -05:00 committed by Sean Sube
parent bb34f7924c
commit 4a58c20ba5
2 changed files with 52 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,51 @@
]
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": [
"camelCase"
],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "variable",
"format": [
"camelCase",
"UPPER_CASE"
],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
},
{
"selector": "enumMember",
"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",
@ -386,4 +429,4 @@
}
]
}
}
}

View File

@ -2,7 +2,11 @@ import { InvalidArgumentError, NotFoundError } from '@apextoaster/js-utils';
import { SAFE_SCHEMA, safeLoad, Schema, Type as YamlType } from 'js-yaml';
import { join } from 'path';
export type IncludeReader = (path: string, options: { encoding: string }) => string;
export interface IncludeOptions {
encoding: string;
}
export type IncludeReader = (path: string, options: IncludeOptions) => string;
export interface IncludeSchema {
exists: (path: string) => boolean;
@ -16,7 +20,7 @@ export interface IncludeSchema {
*/
export const includeSchema: IncludeSchema = {
exists: (path: string) => false,
read: (path: string, encoding: object) => {
read: (path: string, encoding: IncludeOptions) => {
throw new Error('read stub');
},
resolve: (path: string) => {