Skip to content

Commit

Permalink
Add import extension rule
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Feb 11, 2022
1 parent 6be9f26 commit 2d212b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Expand Up @@ -111,5 +111,10 @@ module.exports = {
}],
// require object literal shorthand syntax
'object-shorthand': ['error', 'always'],
// Warn when file extensions are not used in import paths
'import/extensions': ['warn', 'ignorePackages', {
// Require file extension for json imports
json: 'always',
}],
},
}

0 comments on commit 2d212b8

Please sign in to comment.