Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Tibfib/eslint-plugin-import-helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Honey authored and Will Honey committed Jul 10, 2020
2 parents e8cdede + ab6ba30 commit 70f5f39
Show file tree
Hide file tree
Showing 4 changed files with 411 additions and 323 deletions.
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@
"author": "Will Honey",
"license": "MIT",
"peerDependencies": {
"eslint": "2.x - 6.x"
"eslint": "5.x - 7.x"
},
"devDependencies": {
"@types/node": "^11.12.2",
"@typescript-eslint/parser": "^1.5.0",
"eslint": "^5.15.3",
"@typescript-eslint/parser": "^3.6.0",
"eslint": "^7.4.0",
"gulp": "^3.9.0",
"gulp-typescript": "^5.0.1",
"mocha": "^6.1.2",
"nyc": "^13.3.0",
"rimraf": "2.5.2",
"typescript": "^3.4.1"
},
"dependencies": {}
"dependencies": {},
"resolutions": {
"graceful-fs": "4.2.3"
}
}
27 changes: 25 additions & 2 deletions test/rules/order-imports-2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const RuleTester = require('eslint/lib/testers/rule-tester');
const RuleTester = require('eslint').RuleTester;

const { test } = require('../utils');

Expand Down Expand Up @@ -123,10 +123,33 @@ ruleTester.run('order', rule, {
],
errors: [
{
ruleID: 'order',
message: '`Baz` import should occur before import of `bar`',
},
],
}),

// // Multiple errors

// TODO FAILING TEST
// test({
// code: `
// var sibling = require('./sibling');
// var parent = require('../parent');
// var fs = require('fs');
// `,
// output: `
// var fs = require('fs');
// var parent = require('../parent');
// var sibling = require('./sibling');
// `,
// errors: [
// {
// message: '`../parent` import should occur before import of `./sibling`',
// },
// {
// message: '`fs` import should occur before import of `./sibling`',
// },
// ],
// }),
],
});
Loading

0 comments on commit 70f5f39

Please sign in to comment.