Follow-up 950577662: Put developer-focussed notes in DEVELOPERS.md

Much more likely to be found than inline comments in Gruntfile.js.

Change-Id: I51f8b56d490fb72dba111d80140b4f3c6e87db18
This commit is contained in:
James D. Forrester 2020-02-24 12:08:52 -08:00
parent 950577662e
commit f7681dc537
2 changed files with 9 additions and 4 deletions

9
DEVELOPERS.md Normal file
View file

@ -0,0 +1,9 @@
# Developer tooling
CI will test your patches for code style and quality issues.
You can run this locally with `npm lint`, or `grunt lint` if you have `grunt` installed globally.
If you wish, you can have the linting code try to auto-fix trivial style errors by passing the `fix` option in: `grunt lint --fix`.
For an extensive series of fixes in this area, you may wish to add shell aliases like `alias lintfix='grunt lint --fix' ; alias jsfix='grunt eslint --fix' ; alias cssfix='grunt stylelint --fix'` to your `~/.bashrc` file or its equivalent, which will add three shorter commands to fix everything, just JavaScript, and just style files respectively. You could also use shorted custom commands if you wish.

View file

@ -66,10 +66,6 @@ module.exports = function ( grunt ) {
}
} );
// Use `grunt lint --fix` to quickly fix trivial style errors.
// Add `alias lintfix='grunt lint --fix' ; alias jsfix='grunt eslint --fix' ; alias cssfix='grunt stylelint --fix'` to ~/.bashrc
// to use the short commands 1) lintfix, 2) jsfix, 3) cssfix for fixing lint errors in 1) all, 2) js, 3) css files.
// Alternatively choose shorter aliases ex. lf, jf, cf.
grunt.registerTask( 'lint', [ 'eslint', 'stylelint', 'banana' ] );
grunt.registerTask( 'minify', 'svgmin' );