1 个不稳定版本
| 0.1.0 | 2020年6月2日 |
|---|
#1122 在 HTTP服务器
140KB
5K SLoC
Deno代码检查器
注意 非常是工作在进行中
支持规则
banTsIgnorebanUntaggedTodoconstructorSuperdefaultParamLasteqeqeqexplicitFunctionReturnTypeforDirectiongetterReturnnoAsyncPromiseExecutornoCaseDeclarationsnoCompareNegZeronoCondAssignnoDebuggernoDeleteVarnoDupeArgsnoDupeKeysnoDuplicateCasenoEmptynoEmptyFunctionnoEmptyInterfacenoEvalnoExplicitAnynoNewSymbolnoPrototypeBuiltinsnoSetterReturnnoSparseArraynoThrowLiteralnoUnsafeFinallynoVarnoWithrequireYieldsingleVarDeclaratoruseIsNaNvalidTypeof
忽略
仅支持单行忽略
// deno-lint-ignore noExplicitAny
function foo(): any {
// ...
}
// deno-lint-ignore noExplicitAny explicitFunctionReturnType
function bar(a: any) {
// ...
}
示例输出
$ ▶ target/debug/dlint ../deno/std/http/server.ts ../deno/std/http/file_server.ts
(noEmpty) Empty block statement
--> ../deno/std/http/server.ts:93:14
|
93 | } catch {}
| ^^
|
(noEmpty) Empty block statement
--> ../deno/std/http/server.ts:111:44
|
111 | while ((await body.read(buf)) !== null) {}
| ^^
|
(noEmpty) Empty block statement
--> ../deno/std/http/server.ts:120:41
|
120 | constructor(public listener: Listener) {}
| ^^
|
(banUntaggedTodo) TODO should be tagged with (@username) or (#issue)
--> ../deno/std/http/file_server.ts:5:0
|
5 | // TODO Stream responses instead of reading them into memory.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
(banUntaggedTodo) TODO should be tagged with (@username) or (#issue)
--> ../deno/std/http/file_server.ts:6:0
|
6 | // TODO Add tests like these:
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
(banUntaggedTodo) TODO should be tagged with (@username) or (#issue)
--> ../deno/std/http/file_server.ts:137:0
|
137 | // TODO: simplify this after deno.stat and deno.readDir are fixed
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
(noEmpty) Empty block statement
--> ../deno/std/http/file_server.ts:155:16
|
155 | } catch (e) {}
| ^^
|
Found 7 problems
依赖
~15–25MB
~437K SLoC