Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible errors & improvements. #8

Closed
ivan-nginx opened this issue Apr 30, 2018 · 3 comments
Closed

Possible errors & improvements. #8

ivan-nginx opened this issue Apr 30, 2018 · 3 comments

Comments

@ivan-nginx
Copy link

ivan-nginx commented Apr 30, 2018

  1. When i install config globally, plugin:node/recommended will install into eslint-config-hexo directory (under subdir). And plugin actually not work, because eslint must see node plugin in same level hierarchy. But then i install it locally, node plugin will placed in same level as eslint.

    node -v && npm -v
    v6.14.0
    3.10.10
    [root@localhost ivan-nginx]# npm i -g eslint-config-hexo
    /usr/lib
    ├── UNMET PEER DEPENDENCY eslint@>= 3.1.0
    └─┬ eslint-config-hexo@3.0.0
      ├── UNMET PEER DEPENDENCY eslint@>=3.1.0
      └─┬ eslint-plugin-node@5.2.1
        ├── ignore@3.3.8
        ├─┬ minimatch@3.0.4
        │ └─┬ brace-expansion@1.1.11
        │   ├── balanced-match@1.0.0
        │   └── concat-map@0.0.1
        ├─┬ resolve@1.7.1
        │ └── path-parse@1.0.5
        └── semver@5.3.0
    
    npm WARN eslint-config-hexo@3.0.0 requires a peer of eslint@>= 3.1.0 but none was installed.
    npm WARN eslint-plugin-node@5.2.1 requires a peer of eslint@>=3.1.0 but none was installed.

    Solution is — install eslint-plugin-node separately:

    npm i -g eslint-config-hexo eslint-plugin-node
  2. There are duplicate parameters in eslint.js: dot-notation and no-multi-str. And i also see other parameters which already by default in eslint:recommended settings. Fixed in Remove unnecessarily overwritten recommended config #6

  3. All 'error' strings can be sucessfully replaced by 2: https://eslint.org/docs/user-guide/configuring#configuring-rules

  4. No need to define parserOptions: { ecmaVersion: 6 } parameter if env: { es6: true } already defined: https://eslint.org/docs/user-guide/configuring#specifying-parser-options

  5. Deprecated parameter 'eqeqeq': ['error', 'allow-null']: https://eslint.org/docs/rules/eqeqeq#allow-null

  6. strict option not needed for ES6, because in ES6 this mode turned on by default.


About pull #6:

  1. no-extra-label now in Best Practices section.
  2. no-mixed-operators now in Stylistic Issues section.
  3. comma-dangle can be just error, never parameter is default for now.
  4. comma-spacing can be just error, before: false, after: true is default for now.
  5. comma-style can be just error, last is default for now.
  6. computed-property-spacing can be just error, never is default for now.
  7. key-spacing can be just error, beforeColon: false, afterColon: true is default for now.
    But i suggest to set {"align": "colon"} parameter.
  8. keyword-spacing can be just error, no needed to set empty ['error', {}] parameters.
  9. linebreak-style can be just error, unix is default for now.
  10. lines-around-comment can be just error, { beforeBlockComment: true } is default for now.
  11. semi can be just error, always is default for now.
  12. semi-spacing can be just error, before: false, after: true is default for now.
  13. space-before-blocks can be just error, always is default for now.
  14. space-before-function-paren can be just error, always is default for now.
  15. space-in-parens can be just error, never is default for now.
  16. spaced-comment can be just error, always is default for now.
  17. template-tag-spacing can be just error, never is default for now.
  18. unicode-bom can be just error, never is default for now.
  19. rest-spread-spacing can be just error, never is default for now.
  20. template-curly-spacing can be just error, never is default for now.
  21. yield-star-spacing can be just error, after is default for now.
  22. yoda can be just error, never is default for now.
@tcrowe
Copy link

tcrowe commented Jul 19, 2018

Thank you @theme-next. Those are good suggestions and it looks like @segayuu will incorporate this into his work.

@ivan-nginx
Copy link
Author

NP, dudes. 👌

JLHwung added a commit that referenced this issue Aug 4, 2018
@segayuu segayuu closed this as completed Aug 4, 2018
@segayuu
Copy link
Contributor

segayuu commented Aug 4, 2018

thank @JLHwung!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants