Coder Social home page Coder Social logo

Comments (11)

rizowski avatar rizowski commented on June 6, 2024

Cool. So Good news is I found the problem. Bad news is eslint changed their help text format so the help parser is broken.

This commit broke the help parser: eslint/eslint@cfbd428
screenshot 2015-09-13 14 06 23

from eslint-watch.

rizowski avatar rizowski commented on June 6, 2024

I have a fix out for this, however I am going to wait until this issue is resolved eslint/eslint#3792. Then I will push out a fix.

from eslint-watch.

jasonblanchard avatar jasonblanchard commented on June 6, 2024

👍

from eslint-watch.

rizowski avatar rizowski commented on June 6, 2024

The only thing holding this up is failing tests on windows for the watcher. Later tonight I will pick this up again. At the latest I should be able to get this out you guys by the end of the day tomorrow.

from eslint-watch.

jasonblanchard avatar jasonblanchard commented on June 6, 2024

👍 Thanks a lot for fixing this

from eslint-watch.

rizowski avatar rizowski commented on June 6, 2024

Yeah no problem. Let me know if you see anything else.

from eslint-watch.

jacorachan avatar jacorachan commented on June 6, 2024

@rizowski I think that there are at least two new rules (second one is not new, but contains some extra settings on 1.4.0) that seems not to be working when using ews:

"require-jsdoc": [ 1 ]
Error: Definition for rule 'require-jsdoc' was not found.

http://eslint.org/docs/rules/require-jsdoc

"quote-props": [2, "as-needed", { "keywords": true, "unnecessary": false }],
 Configuration for rule "quote-props" is invalid:
        Value "2,as-needed,[object Object]" has more items than allowed.

http://eslint.org/docs/rules/quote-props

from eslint-watch.

rizowski avatar rizowski commented on June 6, 2024

@jacorachan Does this only happen when it runs through eslint-watch? Eslint-watch shouldn't be keeping any lint rules from coming through. The only thing Eslint-watch should be changing is the options in the cli help context and adding a few things like the watch command and a few other small things.

Second question: If the above is true, what version of eslint, and eslint-watch are you using?

from eslint-watch.

jacorachan avatar jacorachan commented on June 6, 2024

This is the command I run:

c:\myApp>esw -f compact -c ./eslint-packages.json --ignore-path ./eslint-packages-ignore.conf  ./../packages/
C:\Program Files (x86)\nodejs\node_modules\eslint\lib\config.js:129
                    throw e;
                    ^

Error: c:\myApp\eslint.json:
        Configuration for rule "quote-props" is invalid:
        Value "2,as-needed,[object Object]" has more items than allowed.

Referenced from: c:\myApp\eslint-packages.json

My versions are:

c:\myApp>esw --v
v0.23.0
c:\myApp>eslint --v
v1.5.0

And this is part of my rules configuration file. Last line is the one that is throwing the error:

{
    "env": {
        "browser": true
    },
    "plugins": [
        "smells"
    ],
    "rules": {

        // TODO: Adding this as error will have problems
        //       with BOM marker in some files.
        //       BOM marker should be removed before enabling this setting
        "no-irregular-whitespace": [ 0 ],

        //
        // Code smells
        // ===== ===== ===== ===== ===== ===== ===== ===== =====
        //
        "smells/no-switch": 1,
        "smells/no-complex-switch-case": 1,
        "smells/no-setinterval": 1,
        "smells/no-this-assign": 1,

        //
        // Code style based on idiomatic.js
        // ===== ===== ===== ===== ===== ===== ===== ===== =====
        //


        // JSDoc Valid:
        "valid-jsdoc": [ 1 ],

        // Variable definition options
        "no-catch-shadow": [ 2 ],
        "no-delete-var": [ 2 ],
        "no-label-var": [ 2 ],
        "no-shadow-restricted-names": [ 2 ],
        "no-shadow": [ 2 ],
        "no-undef": [ 2 ],
        "no-undef-init": [ 2 ],
        "no-undefined": [ 2 ],
        "no-unused-vars": [ 1, { "vars": "all", "args": "after-used" } ],
        "no-use-before-define": [ 2 ],
        "vars-on-top": [ 2 ],
        "block-scoped-var": [ 2 ],
        "no-redeclare": [ 2 ],
        "no-proto": [ 2 ],
        "quote-props": [2, "as-needed", { "keywords": true, "unnecessary": false }],

Running this eslint with the same parameters works:

c:\myApp>eslint -f compact -c ./eslint-packages.json --ignore-path ./eslint-packages-ignore.conf  ./../packages/

from eslint-watch.

rizowski avatar rizowski commented on June 6, 2024

So the -v for eslint-watch will report the version of eslint it is using. If it returned 0.23.0, then esw is finding an earlier eslint version. If you were an early adopter, esw used to pull in eslint as a dependency. Later versions I made it a peer dependency. I will add an issue for addressing that. In the meantime, what version does it say you are using in either your package.json or npm list -g --depth=0

from eslint-watch.

jacorachan avatar jacorachan commented on June 6, 2024

I had an old version of eslint, some zero point something, so it makes sense that it says 0.23... As I have just updated to the latest stable, that can be the reason.

C:\Users\user>npm list -g --depth=0
C:\Users\user\AppData\Roaming\npm
└── [email protected]

I will try to cleanup my NPM, and download both eslint, and eslint-watch from scratch. That could be the cause of the problem, maybe for some reason eslint-watch is using my old version that somehow is "cached" in my hard drive... I will try to find myself some more information about and post here my discoveries.

Thanks for the help!

from eslint-watch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.