Skip to content

ESLintify Part 2#841

Merged
yangshun merged 5 commits intofacebook:masterfrom
yangshun:eslint
Jul 11, 2018
Merged

ESLintify Part 2#841
yangshun merged 5 commits intofacebook:masterfrom
yangshun:eslint

Conversation

@yangshun
Copy link
Contributor

@yangshun yangshun commented Jul 8, 2018

Motivation

Enable some ESLint rules by making the code ESLint-compliant.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Local + Netlify.

Related PRs

#836

@yangshun yangshun requested a review from endiliey July 8, 2018 21:30
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jul 8, 2018
);

const clipboard = new ClipboardJS('.btnClipboard', {
/* eslint-disable object-shorthand */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not gonna use the shorthand as this is sent down to browsers without transpiling.

let MetadataBlog;
const readMetadata = require('./readMetadata.js');
const Metadata = require('../core/metadata.js');
const MetadataBlog = require('../core/MetadataBlog.js');
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to call

readMetadata.generateMetadataBlog();

Because metadatablog might not exist when requiring (test are failing as well)

Similarly to docs

@yangshun
Copy link
Contributor Author

yangshun commented Jul 8, 2018 via email

@docusaurus-bot
Copy link
Contributor

docusaurus-bot commented Jul 11, 2018

Deploy preview for docusaurus-preview ready!

Built with commit 268dcee

https://deploy-preview-841--docusaurus-preview.netlify.com

clearBuildFolder();
});

test('Generated HTML for each Markdown resource', function() {
Copy link
Contributor

@endiliey endiliey Jul 11, 2018

Choose a reason for hiding this comment

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

I think we've added this. (See line 78) Double add due to merge conflict ??

Copy link
Contributor

Choose a reason for hiding this comment

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

Copied assets from /docs/assets test as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, have fixed them 😓

"prettier:diff": "yarn nit:source && yarn nit:examples",
"test": "jest"
"test": "jest",
"start": "cd website && yarn start"
Copy link
Contributor

Choose a reason for hiding this comment

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

😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was too tired of switching directories. babel-website does this too.

@yangshun yangshun merged commit 5ac2cee into facebook:master Jul 11, 2018
@yangshun yangshun deleted the eslint branch July 11, 2018 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants