Skip to content

Commit

Permalink
🔧 chore: 升级相关配置
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Apr 21, 2023
1 parent 7b63894 commit 6c803c9
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 82 deletions.
26 changes: 1 addition & 25 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1 @@
module.exports = {
extends: [require.resolve('@umijs/fabric/dist/eslint')],
globals: {
page: true,
},
rules: {
'import/no-extraneous-dependencies': 0,
'import/default': 0,
'import/no-named-default': 0,
'import/no-unresolved': 0,
'import/no-named-as-default-member': 0,
'import/named': 0,
'no-param-reassign': 0,
'consistent-return': 0,
'no-useless-return': 0,
'no-restricted-globals': 0,
'no-continue': 0,
'no-shadow': 'warn',
'no-console': 0,
'no-underscore-dangle': 0,
'@typescript-eslint/consistent-type-definitions': 0,
'@typescript-eslint/no-shadow': 0,
},
ignorePatterns: ['*.js'],
};
module.exports = require('@umijs/lint/dist/config/eslint');
13 changes: 0 additions & 13 deletions jest.config.base.js

This file was deleted.

9 changes: 0 additions & 9 deletions jest.config.js

This file was deleted.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"docs:dev": "dumi dev",
"docs:build": "dumi build",
"--------- ": "",
"test": "lerna run test",
"test:update": "lerna run test:update",
"test:coverage": "jest --coverage",
"test": "vitest",
"test:update": "vitest -u",
"test:coverage": "vitest run --coverage",
"--------- ": "",
"check": "npm run check:lint && npm run check:circular && npm run check:types",
"check:lint": "npm run lint-eslint",
Expand Down Expand Up @@ -58,25 +58,26 @@
"@testing-library/react-hooks": "^3.2.1",
"@types/classnames": "^2.2.7",
"@types/fs-extra": "^9.0.1",
"@types/jest": "^26.0.0",
"@umijs/lint": "^4",
"@types/jsdom": "^16.2.3",
"@types/node": "^14.14.10",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/uuid": "^8.3.0",
"@vitest/coverage-c8": "latest",
"commitlint": "^17",
"commitlint-config-gitmoji": "^2",
"conventional-changelog-gitmoji-config": "^1.4.0",
"concurrently": "^7",
"cross-env": "^7",
"dumi": "^2.1.21",
"dumi": "^2",
"jsdom": "^21",
"dumi-theme-antd-style": "latest",
"dumi-assets-types": "^1",
"dpdm": "^3",
"eslint": "^8",
"father": "^4",
"husky": "^8",
"jsdom": "^21",
"lint-staged": "^13",
"onchange": "^7",
"prettier": "^2",
Expand Down
13 changes: 0 additions & 13 deletions packages/bar/jest.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/bar/tests/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Bar 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion packages/bar/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import config from '../../vitest.config.base';
import config from '../../vitest.config';

export default config;
13 changes: 0 additions & 13 deletions packages/foo/jest.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/foo/tests/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Foo 1`] = `
<div>
Expand Down
3 changes: 3 additions & 0 deletions packages/foo/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '../../vitest.config';

export default config;
4 changes: 4 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ export default defineConfig({
'@arvinxu/foo': join(__dirname, '/packages/foo/src'),
'@arvinxu/bar': join(__dirname, '/packages/bar/src'),
},
coverage: {
provider: 'c8',
reporter: ['text', 'json', 'lcov', 'text-summary'],
},
},
});

0 comments on commit 6c803c9

Please sign in to comment.