mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-28 08:17:54 +08:00
cleanup ignore lint format errors: no-padding, no-trailing-whitespace, semicolon, space-before-function-paren, typedef-whitespace
This commit is contained in:
@@ -32,14 +32,10 @@ const parser = new acorn.Parser({}, 'export default ""', 0);
|
||||
const node = new acorn.Node(parser, 1, 1);
|
||||
|
||||
class LooseParser {
|
||||
constructor(input: string, options = {}) {
|
||||
|
||||
}
|
||||
constructor(input: string, options = {}) {}
|
||||
|
||||
// this means you can extend LooseParser
|
||||
test() {
|
||||
|
||||
}
|
||||
test() {}
|
||||
}
|
||||
acorn.addLooseExports(() => {
|
||||
return {
|
||||
@@ -50,7 +46,7 @@ acorn.addLooseExports(() => {
|
||||
type: 'EmptyStatement'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
}, LooseParser, {});
|
||||
|
||||
acorn.parseExpressionAt('string', 2);
|
||||
@@ -63,8 +59,7 @@ acorn.isIdentifierChar(56);
|
||||
|
||||
acorn.getLineInfo('string', 56);
|
||||
|
||||
acorn.plugins['test'] = (p: acorn.Parser, config: any) => {
|
||||
}
|
||||
acorn.plugins['test'] = (p: acorn.Parser, config: any) => {};
|
||||
|
||||
acorn.tokenizer('console.log("hello world)', {locations: true}).getToken();
|
||||
acorn.tokenizer('console.log("hello world)', {locations: true})[Symbol.iterator]().next();
|
||||
|
||||
14
types/acorn/index.d.ts
vendored
14
types/acorn/index.d.ts
vendored
@@ -181,7 +181,7 @@ declare namespace acorn {
|
||||
_typeof: TokenType;
|
||||
_void: TokenType;
|
||||
_delete: TokenType;
|
||||
}
|
||||
};
|
||||
|
||||
class TokContext {
|
||||
constructor(token: string, isExpr: boolean, preserveSpace: boolean, override: (p: Parser) => void);
|
||||
@@ -239,10 +239,10 @@ declare namespace acorn {
|
||||
function parseExpressionAt(input: string, pos?: number, options?: Options): ESTree.Expression;
|
||||
|
||||
interface ITokenizer {
|
||||
getToken() : Token,
|
||||
[Symbol.iterator](): Iterator<Token>
|
||||
getToken(): Token;
|
||||
[Symbol.iterator](): Iterator<Token>;
|
||||
}
|
||||
|
||||
|
||||
function tokenizer(input: string, options: Options): ITokenizer;
|
||||
|
||||
let parse_dammit: IParse | undefined;
|
||||
@@ -250,12 +250,10 @@ declare namespace acorn {
|
||||
let pluginsLoose: PluginsObject | undefined;
|
||||
|
||||
interface ILooseParserClass {
|
||||
new (input: string, options?: Options): ILooseParser
|
||||
new (input: string, options?: Options): ILooseParser;
|
||||
}
|
||||
|
||||
interface ILooseParser {
|
||||
|
||||
}
|
||||
interface ILooseParser {}
|
||||
|
||||
function addLooseExports(parse: IParse, parser: ILooseParserClass, plugins: PluginsObject): void;
|
||||
}
|
||||
|
||||
@@ -6,13 +6,8 @@
|
||||
"export-just-namespace": false,
|
||||
"interface-name": false,
|
||||
"no-empty-interface": false,
|
||||
"no-padding": false,
|
||||
"no-reference-import": false,
|
||||
"no-unnecessary-class": false,
|
||||
"no-var-keyword": false,
|
||||
"no-trailing-whitespace": false,
|
||||
"semicolon": false,
|
||||
"space-before-function-paren": false,
|
||||
"typedef-whitespace": false
|
||||
"no-var-keyword": false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user