Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12895

Replace jshint with eslint in our tools + platforms

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: AllComponents
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              auso Audrey So
              Reporter:
              stevegill Steve Gill
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: