Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Imports should be sorted alphabetically sort-imports

/*eslint sort-imports: 2*/
import a from 'foo.js';
import b from 'bar.js';
import c from 'baz.js';

/*eslint sort-imports: 2*/
import 'foo.js'
import * from 'bar.js';
import {a, b} from 'baz.js';
import c from 'qux.js';

/*eslint sort-imports: 2*/
import {a, b, c} from 'foo.js'
Source by eslint.org #
 
PREVIOUS NEXT
Tagged: #Imports #sorted #alphabetically
ADD COMMENT
Topic
Name
3+2 =