@@ -175,65 +175,65 @@ ruleTester.run('extensions', rule, {
175
175
invalid : [
176
176
tInvalid ( {
177
177
name : 'extensions should autofix by default' ,
178
- code : 'import a from "a /foo.js"' ,
178
+ code : 'import a from ". /foo.js"' ,
179
179
options : [ 'never' ] ,
180
180
errors : [
181
181
{
182
182
messageId : 'unexpected' ,
183
- data : { extension : 'js' , importPath : 'a /foo.js' } ,
183
+ data : { extension : 'js' , importPath : '. /foo.js' } ,
184
184
line : 1 ,
185
185
column : 15 ,
186
186
} ,
187
187
] ,
188
- output : 'import a from "a /foo"' ,
188
+ output : 'import a from ". /foo"' ,
189
189
} ) ,
190
190
tInvalid ( {
191
191
name : 'extensions should autofix when fix is set to true' ,
192
- code : 'import a from "a /foo.js"' ,
192
+ code : 'import a from ". /foo.js"' ,
193
193
options : [ 'never' , { fix : true } ] ,
194
194
errors : [
195
195
{
196
196
messageId : 'unexpected' ,
197
- data : { extension : 'js' , importPath : 'a /foo.js' } ,
197
+ data : { extension : 'js' , importPath : '. /foo.js' } ,
198
198
line : 1 ,
199
199
column : 15 ,
200
200
} ,
201
201
] ,
202
- output : 'import a from "a /foo"' ,
202
+ output : 'import a from ". /foo"' ,
203
203
} ) ,
204
204
tInvalid ( {
205
205
name : 'extensions should autofix when fix is set to true and a pattern object is provided' ,
206
- code : 'import a from "a /foo.js"' ,
206
+ code : 'import a from ". /foo.js"' ,
207
207
options : [ 'never' , { fix : true , pattern : { } } ] ,
208
208
errors : [
209
209
{
210
210
messageId : 'unexpected' ,
211
- data : { extension : 'js' , importPath : 'a /foo.js' } ,
211
+ data : { extension : 'js' , importPath : '. /foo.js' } ,
212
212
line : 1 ,
213
213
column : 15 ,
214
214
} ,
215
215
] ,
216
- output : 'import a from "a /foo"' ,
216
+ output : 'import a from ". /foo"' ,
217
217
} ) ,
218
218
tInvalid ( {
219
219
name : 'extensions should not autofix when fix is set to false' ,
220
- code : 'import a from "a /foo.js"' ,
220
+ code : 'import a from ". /foo.js"' ,
221
221
options : [ 'never' , { fix : false } ] ,
222
222
errors : [
223
223
{
224
224
messageId : 'unexpected' ,
225
- data : { extension : 'js' , importPath : 'a /foo.js' } ,
225
+ data : { extension : 'js' , importPath : '. /foo.js' } ,
226
226
line : 1 ,
227
227
column : 15 ,
228
228
suggestions : [
229
229
{
230
230
messageId : 'removeUnexpected' ,
231
231
data : {
232
232
extension : 'js' ,
233
- importPath : 'a /foo.js' ,
234
- fixedImportPath : 'a /foo' ,
233
+ importPath : '. /foo.js' ,
234
+ fixedImportPath : '. /foo' ,
235
235
} ,
236
- output : 'import a from "a /foo"' ,
236
+ output : 'import a from ". /foo"' ,
237
237
} ,
238
238
] ,
239
239
} ,
0 commit comments