Skip to content

no-cycle rule not working with babel-eslint parser #1166

Closed

Description

Here is a simple repro:

package.json

{
  "dependencies": {
    "babel-eslint": "^9.0.0",
    "eslint": "^5.4.0",
    "eslint-plugin-import": "^2.14.0"
  }
}

.eslintrc

{
	parser: "babel-eslint",
	parserOptions: {
		sourceType: 'module',
	},
	plugins: ['import'],
	rules: { 'import/no-cycle': 'error' },
}

a.js

import B from './b';
export default "A" + B;

b.js

import A from './a';
export default A + "B";

No error is found by eslint but if default parser is used (by removing line parser: "babel-eslint",) then no-cycle errors are found in each file.

Is it the expected behaviour ? An issue with eslint-plugin-import ? An issue with babel-eslint ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions