Docsify: Eslint fixes for the project

Created on 23 Dec 2019  路  3Comments  路  Source: docsifyjs/docsify

After adding eslint, if your run npx eslint . it will show huge number of errors and warning.

This issue is to fix those errors and warning and remove/add eslint rules if required after discussing here.

Also, eslint script and .eslintignore should be configured as follows.

package.json

"lint": "eslint . --fix",

.eslintrc

{
  "extends": "xo-space/browser",
  "rules": {
    "semi": [2, "never"],
    "no-return-assign": "off",
    "no-unused-expressions": "off",
    "no-new-func": "off",
    "no-multi-assign": "off",
    "no-mixed-operators": "off",
    "max-params": "off",
    "no-script-url": "off",
    "camelcase": "off",
    "object-curly-spacing": "off",
    "no-warning-comments": "off",
    "no-negated-condition": "off",
    "eqeqeq": "warn",
    "no-eq-null": "warn",
    "max-statements-per-line": "warn"
  },
  "globals": {
    "Docsify": true,
    "$docsify": true,
    "process": true
  },
  "env": {
    "browser": true,
    "amd": true,
    "node": true
  }
}
  • [ ] Npm script fix
  • [ ] .eslintrc refactore
  • [ ] Errors fix
  • [ ] Warning fix
  • [ ] add the linting to travis

Contributions are welcome

PR Welcome good first Issue help wanted

Most helpful comment

Hi @anikethsaha @IvanFrescas I've just opened a PR for this issue https://github.com/docsifyjs/docsify/pull/989

All 3 comments

Hi, is anyone working on this issue?

no, feel free to pick this 馃憤

Hi @anikethsaha @IvanFrescas I've just opened a PR for this issue https://github.com/docsifyjs/docsify/pull/989

Was this page helpful?
0 / 5 - 0 ratings