Skip to content

Commit

Permalink
Merge pull request #1009 from silvenon/extensions
Browse files Browse the repository at this point in the history
Add test case for import/resolve extensions order
  • Loading branch information
ljharb authored Feb 2, 2018
2 parents 7852cd7 + 364e841 commit bc50394
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/src/rules/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,22 @@ ruleTester.run('extensions', rule, {
},
],
}),
// extension resolve order (#965)
test({
code: [
'import component from "./bar.jsx"',
'import data from "./bar.json"',
].join('\n'),
options: [ { json: 'always', js: 'never', jsx: 'never' } ],
settings: { 'import/resolve': { 'extensions': [ '.jsx', '.json', '.js' ] } },
errors: [
{
message: 'Unexpected use of file extension "jsx" for "./bar.jsx"',
line: 1,
column: 23,
},
],
}),

test({
code: [
Expand Down

0 comments on commit bc50394

Please sign in to comment.