From c4bbfbe204c82c8628ae1588db7ec982ff4504f5 Mon Sep 17 00:00:00 2001 From: uiolee <22849383+uiolee@users.noreply.github.com> Date: Tue, 23 Jan 2024 23:49:46 +0800 Subject: [PATCH] style: fix eslint --- .eslintignore | 3 ++- test/.eslintrc.json | 5 +++-- test/index.js | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.eslintignore b/.eslintignore index f6b9638..f15eb05 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ node_modules/ coverage/ -tmp/ \ No newline at end of file +tmp/ +dist/ \ No newline at end of file diff --git a/test/.eslintrc.json b/test/.eslintrc.json index 82825e5..5625b43 100644 --- a/test/.eslintrc.json +++ b/test/.eslintrc.json @@ -1,3 +1,4 @@ { - "extends": "hexo/test" -} \ No newline at end of file + "extends": "hexo/test", + "rules": { "@typescript-eslint/no-var-requires": 0 } +} diff --git a/test/index.js b/test/index.js index 38725a2..517f375 100644 --- a/test/index.js +++ b/test/index.js @@ -5,7 +5,7 @@ should(); const { join, dirname } = require('path'); const Promise = require('bluebird'); -const fs = require('../lib/fs'); +const fs = require('../lib/fs.ts'); function createDummyFolder(path) { const filesMap = { @@ -31,7 +31,7 @@ function createDummyFolder(path) { function createAnotherDummyFolder(path) { const filesMap = { [join('folder', '.txt')]: 'txt', - [join('folder', '.js')]: 'js', + [join('folder', '.js')]: 'js' }; return Promise.map(Object.keys(filesMap), key => fs.writeFile(join(path, key), filesMap[key])); } @@ -604,7 +604,7 @@ describe('fs', () => { const checkExistsMap = { [join('folder', '.txt')]: true, - [join('folder', '.js')]: true, + [join('folder', '.js')]: true }; await createAnotherDummyFolder(target);