mirror of
https://github.com/denoland/deno.git
synced 2025-10-01 06:31:15 +00:00
Eslint fixes (denoland/deno_std#356)
Make warnings fail
Original: 4543b563a9
This commit is contained in:
parent
e1f7a60bb3
commit
dcd01dd025
88 changed files with 948 additions and 806 deletions
|
@ -9,7 +9,7 @@ import { ensureDirSync } from "./ensure_dir.ts";
|
|||
|
||||
const testdataDir = path.resolve("fs", "testdata");
|
||||
|
||||
test(function _isSubdir() {
|
||||
test(function _isSubdir(): void {
|
||||
const pairs = [
|
||||
["", "", false, path.posix.sep],
|
||||
["/first/second", "/first", false, path.posix.sep],
|
||||
|
@ -21,7 +21,7 @@ test(function _isSubdir() {
|
|||
["c:\\first", "c:\\first\\second", true, path.win32.sep]
|
||||
];
|
||||
|
||||
pairs.forEach(function(p) {
|
||||
pairs.forEach(function(p): void {
|
||||
const src = p[0] as string;
|
||||
const dest = p[1] as string;
|
||||
const expected = p[2] as boolean;
|
||||
|
@ -34,13 +34,13 @@ test(function _isSubdir() {
|
|||
});
|
||||
});
|
||||
|
||||
test(function _getFileInfoType() {
|
||||
test(function _getFileInfoType(): void {
|
||||
const pairs = [
|
||||
[path.join(testdataDir, "file_type_1"), "file"],
|
||||
[path.join(testdataDir, "file_type_dir_1"), "dir"]
|
||||
];
|
||||
|
||||
pairs.forEach(function(p) {
|
||||
pairs.forEach(function(p): void {
|
||||
const filePath = p[0] as string;
|
||||
const type = p[1] as PathType;
|
||||
switch (type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue