File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed
Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ const sortedImports = require('./sorted-imports');
22
33module . exports = {
44 rules : {
5- 'sorted-imports' : {
6- create : sortedImports ,
7- } ,
5+ 'sorted-imports' : sortedImports ,
86 } ,
97} ;
Original file line number Diff line number Diff line change 11function isBlankLineBefore ( context , node ) {
2- return node . range [ 0 ] > 0 && ! context . getSourceCode ( ) . getLocFromIndex ( node . range [ 0 ] - 1 ) . column ;
2+ return node . range [ 0 ] > 0 && ! context . sourceCode . getLocFromIndex ( node . range [ 0 ] - 1 ) . column ;
33}
44
55function getText ( context , node ) {
6- return context . getSourceCode ( ) . getText ( node ) ;
6+ return context . sourceCode . getText ( node ) ;
77}
88
9- module . exports = context => {
10- let previousImport = null ;
11- let previousLocalImport = null ;
9+ module . exports = {
10+ meta : {
11+ type : 'layout' ,
12+ fixable : 'whitespace' ,
13+ } ,
14+ create ( context ) {
15+ let previousImport = null ;
16+ let previousLocalImport = null ;
1217
13- return {
14- meta : {
15- type : 'layout' ,
16- fixable : 'whitespace' ,
17- } ,
18- ImportDeclaration ( node ) {
18+ return {
19+ ImportDeclaration ( node ) {
1920 const sourceValue = node . source . value ;
2021
2122 if ( sourceValue . startsWith ( '.' ) || sourceValue . startsWith ( '/' ) ) {
@@ -120,4 +121,5 @@ module.exports = context => {
120121 }
121122 } ,
122123 } ;
124+ } ,
123125} ;
You can’t perform that action at this time.
0 commit comments