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
Run linter on build-system #11325
Run linter on build-system #11325
Conversation
/to @choumx @erwinmombay |
/to @cramforce |
@@ -19,9 +19,11 @@ | |||
var argv = require('minimist')(process.argv.slice(2)); | |||
var config = require('../config'); | |||
var eslint = require('gulp-eslint'); | |||
var getStdout = require('../exec.js').getStdout; |
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.
remove .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.
Done.
* @return {!Stream} Readable stream | ||
* Initializes the linter stream based on globs | ||
* @param {!object} globs | ||
* @param {!object} streamOptions |
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.
!Object
instead
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.
Done.
* Runs the linter on the given stream using the given options. | ||
* @param {!string} path | ||
* @param {!ReadableStream} stream | ||
* @param {!object} options |
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.
!Object
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.
Done.
@erwinmombay Fixes coming in a follow up PR. If only we had a linter to catch these ;) |
most of these wouldnt have been caught by the linter as they are bad type annotations. (we don't run the type checker on the build system either, probly not worth it but still good to have the correct annotations) |
All your comments are addressed in the follow up PRs listed here. |
This PR adds ES5 compatible linter rules for the
build-system
directory, and ensures that any file in that directory that is touched by a PR is also linted. For now, we do this in warning mode, until a first round of fixes is checked in.To run this locally, use:
Coming up: A follow up PR with slightly more sane lint rules, and an initial round of fixes for the
build-system
files.Partial fix for #11273.