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

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

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

    https://github.com/apache/cordova-js/pull/149#discussion_r141135727
  
    --- Diff: package.json ---
    @@ -15,6 +15,7 @@
         "url": "https://issues.apache.org/jira/browse/CB";
       },
       "scripts": {
    +    "eslint": "eslint src test",
    --- End diff --
    
    If I do `npm run eslint pkg/`, it will reveal all of the pkg/ errors. I can 
reduce some errors using --fix (mostly indenting errors) but the rest would 
have to be fixed manually. I won't be able to change/fix anything, however, 
unless I can check in the pkg/ directory though. If I run `npm run eslint` 
without specifying pkg, it will just ignore it. Hmm...


> 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to