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

ESLintify Part 2 #841

Merged
merged 5 commits into from
Jul 11, 2018
Merged

ESLintify Part 2 #841

merged 5 commits into from
Jul 11, 2018

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
@@ -31,6 +31,7 @@ window.addEventListener('load', function() {
);

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

@@ -60,14 +61,22 @@ describe('Build files', () => {
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 😓

@@ -23,7 +23,8 @@
"precommit": "lint-staged",
"prettier": "yarn format:source && yarn format:examples",
"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