From 1e9c8e295257783e132c118ae0c8bf195b3b51b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E7=BA=AF?= Date: Tue, 2 Feb 2021 12:04:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20eslint=E5=8E=BB=E6=8E=89files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fes-plugin-unit-jest/src/index.js | 4 ++-- packages/fes-template/.eslintrc.js | 4 ---- packages/fes-template/__tests__/add.js | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/fes-plugin-unit-jest/src/index.js b/packages/fes-plugin-unit-jest/src/index.js index 27d79816..e5b80b8d 100644 --- a/packages/fes-plugin-unit-jest/src/index.js +++ b/packages/fes-plugin-unit-jest/src/index.js @@ -6,7 +6,7 @@ import { Logger } from '@webank/fes-compiler'; import { options as CliOptions } from 'jest-cli/build/cli/args'; import createDefaultConfig from './createDefaultConfig'; -const logger = new Logger('fes:plugin-built-in'); +const logger = new Logger('fes:plugin-unit-jest'); export default function (api) { const { utils: { mergeConfig }, cwd } = api; @@ -16,7 +16,7 @@ export default function (api) { description: 'run unit tests with jest', options: { '--watch': 'run tests in watch mode', - '--debug': 'debug' + '--debug': 'print debug logs' }, async fn({ args }) { process.env.NODE_ENV = 'test'; diff --git a/packages/fes-template/.eslintrc.js b/packages/fes-template/.eslintrc.js index 57c7f909..7d04898c 100644 --- a/packages/fes-template/.eslintrc.js +++ b/packages/fes-template/.eslintrc.js @@ -1,9 +1,5 @@ module.exports = { extends: [require.resolve('@webank/eslint-config-webank')], - files: [ - '**/__tests__/*.{j,t}s?(x)', - '**/tests/unit/**/*.spec.{j,t}s?(x)' - ], env: { jest: true } diff --git a/packages/fes-template/__tests__/add.js b/packages/fes-template/__tests__/add.js index 5eaa2245..d5c874a0 100644 --- a/packages/fes-template/__tests__/add.js +++ b/packages/fes-template/__tests__/add.js @@ -1,4 +1,4 @@ -import sum from "@/utils/sum" +import sum from '@/utils/sum'; test('adds 1 + 2 to equal 3', () => { expect(sum(1, 2)).toBe(3);