Skip to content

Commit fda2f4b

Browse files
author
oldskytree
committed
build: configure eslint for typescript
1 parent 182037c commit fda2f4b

5 files changed

Lines changed: 885 additions & 726 deletions

File tree

.eslintrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
module.exports = {
2-
extends: 'gemini-testing',
2+
extends: ['gemini-testing', 'plugin:@typescript-eslint/recommended'],
3+
parser: '@typescript-eslint/parser',
4+
plugins: ['@typescript-eslint'],
35
root: true
46
};

lib/types/option.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ interface MetaInfo {
55
isSetByUser: boolean;
66
}
77

8-
export interface OptionParserConfig<Value, MappedValue, Result> {
8+
/* eslint-disable @typescript-eslint/no-explicit-any */
9+
export interface OptionParserConfig<Value, MappedValue, Result = any> {
910
defaultValue?: Value | ((config: Result, currNode: any) => Value);
1011
parseCli?: (input?: string) => Value | undefined;
1112
parseEnv?: (input?: string) => Value | undefined;
1213
validate?: (value: unknown, config: Result, currNode: any, meta: MetaInfo) => asserts value is Value;
1314
map?(value: Value, config: Result, currNode: any, meta: MetaInfo): MappedValue;
1415
isDeprecated?: boolean;
1516
}
17+
/* eslint-enable @typescript-eslint/no-explicit-any */
1618

1719
export interface OptionParser<Value, Result> {
1820
(locator: Locator<Value>, config: Rooted<Result>): Value;

0 commit comments

Comments
 (0)