-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix a bunch of ESLint and HTMLLint errors #104
Conversation
|
||
it('Should pass when the file is successfully uploaded and no bitly key', function() { | ||
conf.bitly_key = null; | ||
const buf = new Buffer(10); | ||
const buf = Buffer.alloc(10); |
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.
Note that new Buffer(<size>)
seems to be deprecated: https://nodejs.org/api/buffer.html#buffer_new_buffer_size
security/detect-non-literal-require: warn | ||
security/detect-possible-timing-attacks: warn | ||
security/detect-pseudoRandomBytes: warn | ||
security/detect-unsafe-regex: warn |
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.
These are now all in the extended "plugin:security/recommended"
ruleset.
@@ -44,7 +45,7 @@ | |||
"repository": "mozilla/something-awesome", | |||
"scripts": { | |||
"dev": "watchify frontend/src/main.js -o public/bundle.js -d | node server/portal_server.js", | |||
"format": "prettier 'frontend/src/*.js' 'server/*.js' 'public/*.css' --single-quote --write", | |||
"format": "prettier 'frontend/src/*.js' 'public/*.css' 'server/*.js' 'test/*.js' --single-quote --write", |
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.
npm run format
will now format all the mocha test files in test/*.js
.
}) | ||
return storage | ||
.delete('file_id', 'delete_token') | ||
.then(_reply => assert(1), err => assert.fail()); |
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.
Wasn't sure how we felt about the .then(yay, boo)
syntax versus converting it to .then(yay).catch(boo)
style, so I left these as-is.
views/index.handlebars
Outdated
<div id="upload-img"><img src="/resources/upload.svg" alt="Upload" /></div> | ||
<!-- htmllint tag-bans="$previous" --> |
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.
This should "fix" #82 by having htmllint ignore that rule for that block. Although refactoring to use classes or redoing the UI will also fix it for reals.
@pdehaan I gave you 'write' to the repo so you can push branches here so we can help fix conflicts easier. |
6dcb8f8
to
db80244
Compare
@dannycoates Any ideas on why my PRs don't seem to be running on Circle-CI? |
Builds from forks were disabled. I've enabled it |
Yay! I failed! |
Also, try linting code on Circle-CI.
Fixes #82