Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit 00978ec

Browse files
mysticateanot-an-aardvark
authored andcommitted
Chore: add test for #558
1 parent f78855b commit 00978ec

File tree

7 files changed

+237
-11
lines changed

7 files changed

+237
-11
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@
3939
"devDependencies": {
4040
"babel-eslint": "^8.0.0",
4141
"dedent": "^0.7.0",
42-
"eslint": "^4.12.1",
42+
"eslint": "^4.14.0",
4343
"eslint-config-babel": "^7.0.1",
4444
"eslint-plugin-flowtype": "^2.30.3",
45+
"eslint-plugin-import": "^2.8.0",
4546
"eslint-plugin-prettier": "^2.1.2",
4647
"espree": "^3.4.0",
4748
"husky": "^0.14.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root: true
2+
3+
# babel-eslint
4+
parser: ../../../lib/index.js
5+
6+
# use eslint-plugin-import
7+
plugins:
8+
- import
9+
rules:
10+
import/no-named-as-default: error
11+
no-unused-vars: error
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default function foo() { }
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import foo from './a.js';
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// @flow
2+
type Foo = {};
3+
4+
const FlowTypeButton = ({ }: Foo) => { };

test/z_eslint-plugin-import.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"use strict";
2+
3+
const eslint = require("eslint");
4+
5+
describe("https://github.com/babel/babel-eslint/issues/558", () => {
6+
it("don't crash with eslint-plugin-import", () => {
7+
const engine = new eslint.CLIEngine({ ignore: false });
8+
engine.executeOnFiles([
9+
"test/fixtures/eslint-plugin-import/a.js",
10+
"test/fixtures/eslint-plugin-import/b.js",
11+
"test/fixtures/eslint-plugin-import/c.js",
12+
]);
13+
});
14+
});

0 commit comments

Comments
 (0)