-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
ESLintify Part 2 #841
Conversation
@@ -31,6 +31,7 @@ window.addEventListener('load', function() { | |||
); | |||
|
|||
const clipboard = new ClipboardJS('.btnClipboard', { | |||
/* eslint-disable object-shorthand */ |
There was a problem hiding this comment.
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.
lib/server/sitemap.js
Outdated
let MetadataBlog; | ||
const readMetadata = require('./readMetadata.js'); | ||
const Metadata = require('../core/metadata.js'); | ||
const MetadataBlog = require('../core/MetadataBlog.js'); |
There was a problem hiding this comment.
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
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>
.
|
Deploy preview for docusaurus-preview ready! Built with commit 268dcee |
lib/__tests__/build-files.test.js
Outdated
@@ -60,14 +61,22 @@ describe('Build files', () => { | |||
clearBuildFolder(); | |||
}); | |||
|
|||
test('Generated HTML for each Markdown resource', function() { |
There was a problem hiding this comment.
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 ??
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆
There was a problem hiding this comment.
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.
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