[ 
https://issues.apache.org/jira/browse/CB-12895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16068927#comment-16068927
 ] 

ASF GitHub Bot commented on CB-12895:
-------------------------------------

Github user purplecabbage commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/386#discussion_r124902965
  
    --- Diff: bin/templates/cordova/Api.js ---
    @@ -112,16 +110,13 @@ Api.createPlatform = function (destination, config, 
options, events) {
         events = setupEvents(events);
         var result;
         try {
    -        result = require('../../lib/create')
    -        .create(destination, config, options, events)
    -        .then(function (destination) {
    +        result = require('../../lib/create').create(destination, config, 
options, events).then(function (destination) {
    --- End diff --
    
    This is an unfortunate workaround for eslint-ing.  I would much prefer this 
be broken up, ala ...
    
        var libCreate = require('../../lib/create');
        var result = libCreate.create(destination, config, options, events);
        result.then(function (destination) {
            // ...
        });
        ...
        return result;



> Replace jshint with eslint in our tools + platforms
> ---------------------------------------------------
>
>                 Key: CB-12895
>                 URL: https://issues.apache.org/jira/browse/CB-12895
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: AllComponents
>            Reporter: Steve Gill
>            Assignee: Audrey So
>            Priority: Minor
>              Labels: cordova-next
>
> Based on this proposal
> https://github.com/cordova/cordova-discuss/pull/70#issuecomment-306649308
> JSHint does minimal checks and JSCS has been deprecated in favor of ESLint.
>  +
>  +I suggest to replace the current style checkers with ESLint. This allows to 
> set much more strict styling rules than at at this moment.
>  +
>  +I recommend using a popular preset, such as 
> [airbnb-base](https://www.npmjs.com/package/eslint-config-airbnb-base). 
> Example configuration:
>  +
>  +```yaml
>  +root: true
>  +
>  +extends: airbnb-base
>  +```
>  +
>  +Many styling issues could be fixed by simply running:
>  +
>  +```
>  +./node_modules/.bin/eslint --fix .
>  +```
>  +
>  +
>  +
>  +Optionally the indent could be set to 4 instead of 2, because that's used 
> in the current code base.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to