-
-
Notifications
You must be signed in to change notification settings - Fork 209
This experimental syntax requires enabling the parser plugin: xxxxx #543
Comments
It has been fixed in c66ec51. (babel-eslint 8) Which version of babel-eslint are you using? |
The one that is in my package.json I guess so "babel-eslint": "^8.0.2". |
Oh sorry, I was wrong. Lines 395 to 418 in a0fbd50
nullishCoaleshingOperator to that list?
|
Sure! I'll do a PR a soon as possible ! thanks |
I'm also facing this issue, is this any way to solve this yet? |
For anyone else encountering the issue, you should check your eslintrc and verify that you've got
as one of the top level options. Based on the eslint documentation, the eslintrc in the original description of @titouancreach won't work. |
I wished to use : https://github.com/vuejs/eslint-plugin-vue. The F.A.Q state:
|
Ah, thanks for the info. It might be worth trying to lint at least one of the files that has errors currently with just babel-eslint directly to determine if the issue is with babel-eslint or with the vue plugin. |
This bug still occurs with:
I use the same file as above. |
Would't be more flexible solution to move Now every new plugin requires code change and publishing it under new version. |
@zdychacek yeah something like that could work and i think that is what #523 is? I think we should probably just look into reading babelrc and querying the plugins from that (make a babel-core method to do it) #523 should fix the plugins in the meanwhile (next release) |
I'm seeing
Is there something we can do right now to enable feature support in Are there tickets we should be tracking? (Hey @sartaj! 👋) Oops, sorry
Thank you 👋 |
logicalAssignment is still missing |
|
It would be better to provide a way to customize the list of plugins (or even all babel parser options). |
@finom v11 loads your babel.config.js and parses out all plugins
Because you also need the eslint-plugin-babel and if you use prettier the babel config for it: |
@valoricDe to enable some of the plugins babel needs to know what and how to parse. See https://babeljs.io/docs/en/babel-parser |
@finom I resolved my partialApplication problem with version 11 of babel-eslint and the aforementionend .eslintrc. Because it reads your babel.config.js so it knows what and how to parse. Just try it out. |
@valoricDe is correct - v11 reads your Babel config file and enables parser plugins using the same logic Babel itself does when compiling. |
Good to know, TY 🎉 |
same error. .babelrc.js: module.exports = {
presets: ['@babel/env', '@babel/typescript'],
plugins: [
['@babel/plugin-proposal-pipeline-operator', { proposal: 'minimal' }]
]
}; .eslintrc.yml: root: true
parser: babel-eslint
extends:
- '@shiwangme'
- plugin:@typescript-eslint/recommended-requiring-type-checking
plugins:
- babel
parserOptions:
project: ./tsconfig.json packs: "@babel/cli": "^7.7.4",
"@babel/core": "^7.7.4",
"@babel/plugin-proposal-pipeline-operator": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@babel/preset-typescript": "^7.7.4",
"@shiwangme/eslint-config": "*",
"@types/node": "*",
"babel-eslint": "^11.0.0-beta.1",
"eslint": "*",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "*",
"prettier": "*",
"typescript": "*" source.ts: let person = { score: 25 };
let newScore = person.score
|> double
|> add(7, ?)
|> boundScore(0, 100, ?); Error:
|
Since the documentation: "babel-eslint allows you to lint ALL valid Babel code with the fantastic ESLint."
In theory, a code that works with babel should work with "babel-eslint".
I try to use 3 experimental plugins in my code:
And I made a test file to test these 3 plugins:
If I compile this file with babel-cli, I've:
That's look OK at first glance.
When I try to lint this file I have:
But nothing from @babel/plugin-proposal-nullish-coalescing-operator.
The plugins are enabled on the .babelrc:
Here is the version of relevant package:
And the relevant part of my .eslintrc.js
I don't understand why babel can transpile and not lint since the parser is babel-eslint.
Is it a bug or do I missed something ?
Thanks
The text was updated successfully, but these errors were encountered: