GithubHelp home page GithubHelp logo

Comments (8)

aladdin-add avatar aladdin-add commented on September 21, 2024 1

yes,sounds a bug to me. will take a look later.~

from eslint-plugin-n.

AndrewMSHowe avatar AndrewMSHowe commented on September 21, 2024

More info: I downgraded XO back to 0.49, and I got a bunch of errors about "Definition for rule n/no-unsupported-features/es-syntax was not found." That was what I added to my config file. And removing that made it the errors go away. So It is somehow hooking up with eslint-plugin-n, but the ignores thing is not working I think?

from eslint-plugin-n.

aladdin-add avatar aladdin-add commented on September 21, 2024

as seen in the node.green:

ofc, you can safely disable the rule if using a transpiier like ts/babel/esbuild/...

from eslint-plugin-n.

aladdin-add avatar aladdin-add commented on September 21, 2024

if using xo v0.49 => the rule is node/no-unsupported-features/es-syntax.
xo v0.50 => n/no-unsupported-features/es-syntax. (a breaking change)

from eslint-plugin-n.

AndrewMSHowe avatar AndrewMSHowe commented on September 21, 2024

OK, but I had xo 0.50, and I had "n/", and it didn't seem to ignore those rules.

from eslint-plugin-n.

AndrewMSHowe avatar AndrewMSHowe commented on September 21, 2024

In theory, should this have worked? Or is there an issue with what I have written?
"n/no-unsupported-features/es-syntax": ["error", { "ignores": [ "optionalChaining", "nullishCoalescingOperator" ] }]

from eslint-plugin-n.

aladdin-add avatar aladdin-add commented on September 21, 2024

I tried with the provided config, it output a config errror:

ESLint: 8.15.0

Error: .eslintrc.js:
        Configuration for rule "n/no-unsupported-features/es-syntax" is invalid:
        Value "nullishCoalescingOperator" should be equal to one of the allowed values.

turns out it should be named "nullishCoalescingOperators" ๐Ÿ˜‚. Not sure you didn't see it, maybe an issue in xo?

from eslint-plugin-n.

AndrewMSHowe avatar AndrewMSHowe commented on September 21, 2024

I'm not sure where I got those strings from, but anyway changing it to "nullishCoalescingOperators" didn't fix anything. And it doesn't explain why "optionalChaining" doesn't work. Well, it does seem that maybe xo is not forwarding these or returning the above error. Someone on the eslint discord channel was sure it was a problem with the n module, but I was not so sure. I guess I'll try reporting it to xo and see if they want to punt it somewhere else :) Thanks for looking into it, anyway.

from eslint-plugin-n.

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.