File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 11import * as path from 'path' ;
22import { test as testUtil , getNonDefaultParsers , parsers } from '../utils' ;
3+ import jsxConfig from '../../../config/react' ;
34
45import { RuleTester } from 'eslint' ;
56import eslintPkg from 'eslint/package.json' ;
@@ -412,6 +413,44 @@ import {x,y} from './foo'
412413 output : "import Bar, { Foo } from './foo';\nexport const value = {}" ,
413414 errors : [ '\'./foo\' imported multiple times.' , '\'./foo\' imported multiple times.' ] ,
414415 } ) ,
416+
417+ test ( {
418+ code : `
419+ import {
420+ DEFAULT_FILTER_KEYS,
421+ BULK_DISABLED,
422+ } from '../constants';
423+ import React from 'react';
424+ import {
425+ BULK_ACTIONS_ENABLED
426+ } from '../constants';
427+
428+ const TestComponent = () => {
429+ return <div>
430+ </div>;
431+ }
432+
433+ export default TestComponent;
434+ ` ,
435+ output : `
436+ import {
437+ DEFAULT_FILTER_KEYS,
438+ BULK_DISABLED,
439+
440+ BULK_ACTIONS_ENABLED
441+ } from '../constants';
442+ import React from 'react';
443+
444+ const TestComponent = () => {
445+ return <div>
446+ </div>;
447+ }
448+
449+ export default TestComponent;
450+ ` ,
451+ errors : [ "'../constants' imported multiple times." , "'../constants' imported multiple times." ] ,
452+ ...jsxConfig ,
453+ } ) ,
415454 ] ,
416455} ) ;
417456
You can’t perform that action at this time.
0 commit comments