Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 add linter/prettier and fix errors #98

Merged
merged 2 commits into from
Oct 8, 2019
Merged

Conversation

howel52
Copy link
Collaborator

@howel52 howel52 commented Sep 29, 2019

Checklist
  • npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change
  • linter @umijs/fabric
  • prettier @umijs/fabric
  • formatted code / fix errors

@howel52 howel52 requested a review from kuitos September 29, 2019 11:46
src/index.ts Outdated
@@ -120,15 +133,15 @@ export function registerMicroApps<T extends object = {}>(apps: Array<Registrable
async () => render({ appContent, loading: false }),
async () => execHooksChain(toArray(afterMount), app),
// initialize the unmount defer after app mounted and resolve the defer after it unmounted
async () => await validateSingularMode(singularMode, app) ? prevAppUnmountedDeferred = new Deferred<void>() : void 0,
// eslint-disable-next-line no-return-assign
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no-return-assign 这个规则直接从 lint 里移除吧

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

src/sandbox.ts Outdated
@@ -108,14 +102,15 @@ export function genSandbox(appName: string) {

const boundValue = value.bind(target);
// some callable function has custom fields, we need to copy the enumerable props to boundValue. such as moment function.
Object.keys(value).forEach(key => boundValue[key] = value[key]);
Object.keys(value).forEach(key => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no-return-assign 规则去了后这个也回滚吧

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@howel52 howel52 requested a review from kuitos September 30, 2019 06:11
@kuitos kuitos merged commit e9885af into umijs:master Oct 8, 2019
@howel52 howel52 deleted the chore/fabric branch October 8, 2019 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants