"Cannot read property 'range' of null" with import syntax #815
Comments
I had the same issue. As a workaround, downgrade babel-eslint to 8.2.6. |
I have the same problem, but it occurs when in my .eslintrc I have the rule set
when I remove it, it doesn't give this problem |
I am also having this issue, seems to be related to using template literals. I can confirm that locking down to 8.2.6 works as a temporary workaround, however not an ideal solution. |
I solved it this way in the package.json
|
Not sure where I got it from, but tweaking the rules in your eslint config ( "rules": {
"template-curly-spacing" : "off",
"indent" : "off"
} Fits the @grovertb observation that indent is causing the issue. Not sure you even have to turn off |
Also experiencing this issue with 10.0.3. Reverting to 8.2.6 (as mentioned earlier) solves the problem. Turning off the template-curly-spacing and indent rules also solves the problem. Obviously neither of these workarounds is ideal. Is there anybody available to investigate this bug? |
Please search for existing issue before posting: Workaround:
Actual bug: |
just upgrade yarn upgrade babel-eslint |
Here it happened because I upgraded |
I had 2 projects with the same setup. Only difference being they used different versions of the packages. After spending 3 days debugging this same issue I looked through my package.json and package-lock.json file, spotting I used @babel/core 7.8.7 (in the project I got this error) in one and 7.7.5 in the other (where I don't have the error.) Going through all the comments here and on the other issues talking about installing @babel/parser 7.7.5 and setting it in "resolution" gave me a hint to check my package-lock.json. @babel/core references @babel/parser: 7.8.7 in its "requires" prop in package-lock. By downgrading to @babel/core 7.7.5 again resolved it for me; because this version has @babel/parser 7.7.5 in its "requires" prop. If you have installed @babel/parser 7.7.5 in your project and set "resolution" and it still doesn't work, try downgrading like I did. |
work around issue babel/babel-eslint#815
Triggers the error: const {
id = uniqueId(`${CSS_CLASS}_i`),
...otherAttributes
} = props Using a pre-class, eslint does not complains anymore: const NO_ESLINT_COMPLAIN = `${CSS_CLASS}_i`
const {
id = uniqueId(NO_ESLINT_COMPLAIN),
...otherAttributes
} = props |
Same issue and downgrade babel-eslint to 8.2.6 replace of the newest(^10.0.2) |
* update babel * update eslint force old version of babel-eslint babel/babel-eslint#815 (comment) due to import and curly strings * downgrade previously upgraded Iron that has a breaking change
* update babel * update eslint force old version of babel-eslint babel/babel-eslint#815 (comment) due to import and curly strings * downgrade previously upgraded Iron that has a breaking change
also downgrade babel-eslint because it fails to parse syntax see: babel/babel-eslint#815
Upgrade to |
Greetings @vramana, i delete |
Thank you for the PR. Now that |
Here's my code:
and get error in vscode eslint
my eslint config
versions
The text was updated successfully, but these errors were encountered: