ESLintify Part 2#841
Merged
yangshun merged 5 commits intofacebook:masterfrom Jul 11, 2018
yangshun:eslint
Merged
Conversation
yangshun
commented
Jul 8, 2018
| ); | ||
|
|
||
| const clipboard = new ClipboardJS('.btnClipboard', { | ||
| /* eslint-disable object-shorthand */ |
Contributor
Author
There was a problem hiding this comment.
Not gonna use the shorthand as this is sent down to browsers without transpiling.
endiliey
suggested changes
Jul 8, 2018
lib/server/sitemap.js
Outdated
| let MetadataBlog; | ||
| const readMetadata = require('./readMetadata.js'); | ||
| const Metadata = require('../core/metadata.js'); | ||
| const MetadataBlog = require('../core/MetadataBlog.js'); |
Contributor
There was a problem hiding this comment.
Need to call
readMetadata.generateMetadataBlog();Because metadatablog might not exist when requiring (test are failing as well)
Similarly to docs
Contributor
Author
|
Thanks, I couldn't figure out in time why it was failing. Will fix when I
get back (:
…On Sun, Jul 8, 2018, 3:32 PM Endilie Yacop Sucipto ***@***.***> wrote:
***@***.**** requested changes on this pull request.
------------------------------
In lib/server/sitemap.js
<#841 (comment)>:
> const CWD = process.cwd();
const sitemap = require('sitemap');
const utils = require('../core/utils');
const siteConfig = require(CWD + '/siteConfig.js');
-/****************************************************************************/
-
-let readMetadata;
-let Metadata;
-let MetadataBlog;
+const readMetadata = require('./readMetadata.js');
+const Metadata = require('../core/metadata.js');
+const MetadataBlog = require('../core/MetadataBlog.js');
Need to call
readMetadata.generateMetadataBlog();
Because metadatablog might not exist when requiring (test are failing as
well)
Similarly to docs
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#841 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQRHXZ181iUaIC8wOpUIxiIjac9dksPks5uEoiCgaJpZM4VG4Wi>
.
|
Contributor
|
Deploy preview for docusaurus-preview ready! Built with commit 268dcee |
endiliey
suggested changes
Jul 11, 2018
lib/__tests__/build-files.test.js
Outdated
| clearBuildFolder(); | ||
| }); | ||
|
|
||
| test('Generated HTML for each Markdown resource', function() { |
Contributor
There was a problem hiding this comment.
I think we've added this. (See line 78) Double add due to merge conflict ??
Contributor
There was a problem hiding this comment.
Copied assets from /docs/assets test as well
Contributor
Author
There was a problem hiding this comment.
Thanks, have fixed them 😓
endiliey
approved these changes
Jul 11, 2018
| "prettier:diff": "yarn nit:source && yarn nit:examples", | ||
| "test": "jest" | ||
| "test": "jest", | ||
| "start": "cd website && yarn start" |
Contributor
Author
There was a problem hiding this comment.
I was too tired of switching directories. babel-website does this too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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