diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 12ba258..0000000 --- a/.babelrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "presets": [ - [ - "@babel/preset-env", - { - "loose": true, - "modules": false - } - ], - "@babel/preset-react", - "@babel/typescript" - ], - "plugins": [ - "@babel/proposal-class-properties", - "@babel/proposal-object-rest-spread", - "@babel/plugin-transform-runtime" - ] -} diff --git a/.gitignore b/.gitignore index 3324dbe..215f97b 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,6 @@ example/src/.umi example/src/.umi-production example/src/.umi-test example/.env.local + +# eslint +.eslint-error.log \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index 06f7aff..22ca6dc 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,10 +1,7 @@ { "endOfLine": "lf", "semi": true, - "singleQuote": true, "tabWidth": 2, - "printWidth": 100, - "trailingComma": "es5", "singleQuote": true, "trailingComma": "all", "printWidth": 80, diff --git a/package.json b/package.json index c756b72..9980a17 100644 --- a/package.json +++ b/package.json @@ -18,56 +18,33 @@ ] }, "devDependencies": { - "@babel/core": "^7.9.0", - "@babel/plugin-external-helpers": "^7.8.3", - "@babel/plugin-proposal-class-properties": "^7.8.3", - "@babel/plugin-proposal-object-rest-spread": "^7.9.5", - "@babel/plugin-transform-runtime": "^7.9.0", - "@babel/preset-env": "^7.9.5", - "@babel/preset-react": "^7.9.4", - "@babel/preset-typescript": "^7.9.0", "@rollup/plugin-commonjs": "^11.0.2", "@rollup/plugin-json": "^4.0.3", "@rollup/plugin-node-resolve": "^7.1.3", "@rollup/plugin-strip": "^1.3.2", "@rollup/plugin-url": "^4.0.2", - "@svgr/rollup": "^5.3.1", "@types/jest": "^26.0.16", "@typescript-eslint/eslint-plugin": "^2.29.0", "@typescript-eslint/parser": "^2.29.0", "concurrently": "^5.3.0", - "cypress": "^6.0.0", + "cypress": "^6.2.0", + "dumi": "^1.0.38", "eslint": "^6.8.0", - "eslint-config-prettier": "^6.10.1", "eslint-config-standard": "^14.1.1", - "eslint-plugin-import": "^2.20.2", - "eslint-plugin-jsx-a11y": "^6.2.3", - "eslint-plugin-prettier": "^3.1.3", - "eslint-plugin-react": "^7.19.0", - "eslint-plugin-react-hooks": "^3.0.0", + "eslint-plugin-prettier": "^3.3.0", "eslint-plugin-standard": "^5.0.0", "lerna": "^3.22.1", - "lowdb": "^1.0.0", - "prettier": "^2.0.4", + "ora": "^4.1.1", "rollup": "^2.6.1", - "rollup-plugin-babel": "^4.4.0", "rollup-plugin-size-snapshot": "^0.11.0", "snazzy": "^9.0.0", "standard": "^16.0.3", "ts-jest": "^26.4.4", - "typescript": "^3.8.3" + "typescript": "^4.1.3" }, "dependencies": { - "@babel/runtime": "^7.9.2", - "@babel/runtime-corejs3": "^7.9.2", - "@umijs/preset-react": "1.x", - "@umijs/test": "^3.2.2", - "antd": "^4.4.3", - "dumi": "^1.0.37", - "lint-staged": "^10.0.7", - "ora": "^4.0.3", - "react": "^16.13.1", - "react-dom": "^16.13.1", + "@imove/core": "^0.3.6", + "lowdb": "^1.0.0", "umi": "^3.2.2" } } diff --git a/packages/compile-code/.babelrc b/packages/compile-code/.babelrc deleted file mode 100644 index 633f93f..0000000 --- a/packages/compile-code/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.babelrc" -} diff --git a/packages/compile-code/package.json b/packages/compile-code/package.json index 6f6a6e7..02a8c4a 100644 --- a/packages/compile-code/package.json +++ b/packages/compile-code/package.json @@ -36,6 +36,7 @@ }, "devDependencies": { "rollup": "^2.7.3", + "rollup-plugin-typescript": "^1.0.1", "watch": "^1.0.2" } } diff --git a/packages/compile-code/rollup.config.js b/packages/compile-code/rollup.config.js index 95d7542..1ce751c 100644 --- a/packages/compile-code/rollup.config.js +++ b/packages/compile-code/rollup.config.js @@ -1,5 +1,6 @@ import path from 'path'; import rollupBaseConfig from '../../rollup.config'; +import typescript from 'rollup-plugin-typescript'; import pkg from './package.json'; export default Object.assign(rollupBaseConfig, { @@ -13,5 +14,8 @@ export default Object.assign(rollupBaseConfig, { file: pkg.module, format: 'es', }, + ], + plugins: [ + typescript(), ] }); diff --git a/packages/core/.babelrc b/packages/core/.babelrc deleted file mode 100644 index 633f93f..0000000 --- a/packages/core/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.babelrc" -} diff --git a/packages/plugin-store/.babelrc b/packages/plugin-store/.babelrc deleted file mode 100644 index 633f93f..0000000 --- a/packages/plugin-store/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../.babelrc" -} diff --git a/packages/plugin-store/package.json b/packages/plugin-store/package.json index e3ad12d..67342ec 100644 --- a/packages/plugin-store/package.json +++ b/packages/plugin-store/package.json @@ -38,8 +38,8 @@ }, "devDependencies": { "rollup": "^2.7.3", + "rollup-plugin-typescript": "^1.0.1", "watch": "^1.0.2" }, - "dependencies": { - } + "dependencies": {} } diff --git a/packages/plugin-store/rollup.config.js b/packages/plugin-store/rollup.config.js index 95d7542..1ce751c 100644 --- a/packages/plugin-store/rollup.config.js +++ b/packages/plugin-store/rollup.config.js @@ -1,5 +1,6 @@ import path from 'path'; import rollupBaseConfig from '../../rollup.config'; +import typescript from 'rollup-plugin-typescript'; import pkg from './package.json'; export default Object.assign(rollupBaseConfig, { @@ -13,5 +14,8 @@ export default Object.assign(rollupBaseConfig, { file: pkg.module, format: 'es', }, + ], + plugins: [ + typescript(), ] }); diff --git a/rollup.config.js b/rollup.config.js index 3b370df..80873f2 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -3,8 +3,6 @@ import commonjs from '@rollup/plugin-commonjs'; import strip from '@rollup/plugin-strip'; import url from '@rollup/plugin-url'; import json from '@rollup/plugin-json'; -import babel from 'rollup-plugin-babel'; -import svgr from '@svgr/rollup'; import { sizeSnapshot } from 'rollup-plugin-size-snapshot'; const input = './src/index.tsx'; @@ -16,15 +14,9 @@ export default { resolve({ extensions, preferBuiltins: true }), commonjs(), json(), - babel({ - extensions, - exclude: 'node_modules/**', - runtimeHelpers: true, - }), url({ limit: 10 * 1024, }), - svgr(), strip({ debugger: true }), sizeSnapshot({ printInfo: false }), ],