Closed ramako closed 4 years ago
import
identifiers have to be unique., so this is a syntax error. ESLint can only run rules after a successful parse, so ESLint isn't even running in the rule in this case.
Thank you for the PR. Now that @babel/eslint-parser
has been released, we are making this repository read-only. If this is a change you would still like to advocate for, please reopen this in the babel/babel monorepo.
Hello, using : "@babel/cli": "^7.8.4", "@babel/core": "^7.8.6", "@babel/polyfill": "^7.8.3", "@babel/preset-env": "^7.8.6", "babel-eslint": "^10.1.0", "babel-loader": "^8.0.0", "eslint": "6.8.0",
, I am getting this error: 6:25 error Parsing error: Identifier 'Platform' has already been declared.
I am basically doing this, using webpack preprocessor
/ eslint-disable no-redeclare / / #!if PLATFORM === 'test / import { test Platform } from './js/libs/platforms'; // #!elseif PLATFORM === 'test2' import { test2 as Platform } from './js/libs/platforms'; // #!elseif PLATFORM === 'test3' import { test3 as Platform } from './js/libs/platforms'; // #!else import { test4 as Platform } from './js/libs/platforms'; / #!endif / / eslint-enable no-redeclare /
This used to work in previous version (babel 6.X ). nothing has been modified in this file. This has happened as I updated babel to the newest version.
If I add the file to the eslintignore, it works. I am not sure what is going on, I have spent hours checking the web, but can't seem to find the solution.