From 0ec9f2352a8b040f107cf19fe3c0c68e000b82ef Mon Sep 17 00:00:00 2001 From: Justin Anastos Date: Thu, 12 Jul 2018 16:54:35 -0400 Subject: [PATCH] test(order): Add failing test for typescript-eslint-parser --- tests/src/rules/order.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/src/rules/order.js b/tests/src/rules/order.js index fb3b788448..23487dac91 100644 --- a/tests/src/rules/order.js +++ b/tests/src/rules/order.js @@ -1260,5 +1260,21 @@ ruleTester.run('order', rule, { message: '`fs` import should occur before import of `async`', }], })), + // fix incorrect order with typescript-eslint-parser + test({ + code: ` + var async = require('async'); + var fs = require('fs'); + `, + output: ` + var fs = require('fs'); + var async = require('async'); + `, + parser: 'typescript-eslint-parser', + errors: [{ + ruleId: 'order', + message: '`fs` import should occur before import of `async`', + }], + }), ], })