Comments (8)
yes,sounds a bug to me. will take a look later.~
from eslint-plugin-n.
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.
as seen in the node.green:
- optional chaining was supported in node.js>=14.5.0 https://node.green/#ES2020-features-optional-chaining-operator-----
- logical assignment: node.js>=15.14.0 https://node.green/#ES2021-features-Logical-Assignment
ofc, you can safely disable the rule if using a transpiier like ts/babel/esbuild/...
from eslint-plugin-n.
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.
OK, but I had xo 0.50, and I had "n/", and it didn't seem to ignore those rules.
from eslint-plugin-n.
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.
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.
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)
- :broom: Remove deprecated rules HOT 6
- ๐งน ESLint v9 deprecations HOT 1
- ๐ Basic TypeScript types HOT 4
- Bug: Update context methods to source code methods HOT 2
- Bug: no-extraneous-import doesn't support import maps HOT 4
- Dependency Dashboard
- Bug: `n/no-restricted-require` does not work for relative imports (as opposed to `no-restricted-modules` from ESLint)
- Bug: The readme says this supports ESLint >=7.0.0, but ruleContext.physicalFilename doesn't exist in version 7.15.0 on my machine HOT 2
- v17 planned changes HOT 9
- Change Request: remove Nullish Coalescing Assignment Operator HOT 1
- Bug: `no-callback-literal` HOT 2
- New Rule: restricted use globals var `__dirname` `__filename` in esm mode HOT 4
- add docs migrating from eslint-plugin-node HOT 1
- Bug: `import-target` mutes resolution errors
- Bug: n/no-missing-imports doesn't work correctly for workspace modules HOT 2
- Change Request: Migrate to release please manifest releaser
- Old releases support HOT 3
- rule `shebang` naming HOT 3
- Support ESLint >=9.0.0-beta.1 in peer dependency HOT 6
- Add the option to allow experimental features in `n/no-unsupported-features/node-builtins` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-n.