Skip to content

Commit

Permalink
style(.eslintrc.json): ignore args in no-unused-vars
Browse files Browse the repository at this point in the history
  • Loading branch information
bhsd-harry committed Nov 21, 2023
1 parent 0eee3b6 commit 9d7ab06
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 9 deletions.
6 changes: 2 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@
"no-unused-vars": [
2,
{
"args": "all",
"argsIgnorePattern": "^(?:_+|acceptable|omit|halfParsed)$",
"args": "none",
"caughtErrors": "all",
"ignoreRestSiblings": true
}
Expand Down Expand Up @@ -854,8 +853,7 @@
"@typescript-eslint/no-unused-vars": [
2,
{
"args": "all",
"argsIgnorePattern": "^(?:_+|acceptable|omit|halfParsed)$",
"args": "none",
"caughtErrors": "all",
"ignoreRestSiblings": true
}
Expand Down
1 change: 0 additions & 1 deletion lib/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ export abstract class AstNode {
}

/** @private */
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
protected getGaps(i: number): number {
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion src/link/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ export class FileToken extends LinkBaseToken {
* @param keys 接受的参数名
* @param type 类型名
*/
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
#getTypedArgs(keys: Set<string>, type: string): ImageParameterToken[] {
const args = this.getAllArgs().filter(({name}) => keys.has(name));
return args;
Expand Down
1 change: 0 additions & 1 deletion src/nested.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export class NestedToken extends Token {
constructor(
wikitext: string | undefined,
regex: RegExp,
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
tags: string[],
config = Parser.getConfig(),
accum: Token[] = [],
Expand Down
1 change: 0 additions & 1 deletion src/syntax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export class SyntaxToken extends Token {
*/
constructor(
wikitext: string | undefined,
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
pattern: RegExp,
type: SyntaxTypes = 'plain',
config = Parser.getConfig(),
Expand Down
1 change: 0 additions & 1 deletion src/transclude.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ export class TranscludeToken extends Token {
* @param exact 是否匹配匿名性
* @param copy 是否返回一个备份
*/
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
getArgs(key: string | number, exact = false, copy = true): Set<ParameterToken> {
const keyStr = String(key).replace(/^[ \t\n\0\v]+|(?<=[^ \t\n\0\v])[ \t\n\0\v]+$/gu, '');
let args: Set<ParameterToken>;
Expand Down

0 comments on commit 9d7ab06

Please sign in to comment.