Skip to content

Commit

Permalink
build: configure eslint for typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
oldskytree committed Sep 12, 2022
1 parent 182037c commit fda2f4b
Show file tree
Hide file tree
Showing 5 changed files with 885 additions and 726 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
extends: 'gemini-testing',
extends: ['gemini-testing', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
root: true
};
4 changes: 3 additions & 1 deletion lib/types/option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ interface MetaInfo {
isSetByUser: boolean;
}

export interface OptionParserConfig<Value, MappedValue, Result> {
/* eslint-disable @typescript-eslint/no-explicit-any */
export interface OptionParserConfig<Value, MappedValue, Result = any> {
defaultValue?: Value | ((config: Result, currNode: any) => Value);
parseCli?: (input?: string) => Value | undefined;
parseEnv?: (input?: string) => Value | undefined;
validate?: (value: unknown, config: Result, currNode: any, meta: MetaInfo) => asserts value is Value;
map?(value: Value, config: Result, currNode: any, meta: MetaInfo): MappedValue;
isDeprecated?: boolean;
}
/* eslint-enable @typescript-eslint/no-explicit-any */

export interface OptionParser<Value, Result> {
(locator: Locator<Value>, config: Rooted<Result>): Value;
Expand Down
Loading

0 comments on commit fda2f4b

Please sign in to comment.