Skip to content

Commit

Permalink
Merge pull request #69 from planetlabs/import-extensions
Browse files Browse the repository at this point in the history
Require file extensions in import specifiers
  • Loading branch information
tschaub authored May 16, 2024
2 parents 5e39d04 + 5d32888 commit e3eb9ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/es6/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import foo from './local-module';
import foo from './local-module.js';
import fs from 'fs';
import path from 'path';

Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = {
'dot-notation': ['error', {allowPattern: '^[a-z]+(_[a-z]+)+$'}],
eqeqeq: 'error',
'import/default': 'error',
'import/extensions': ['error', 'always'],
'import/first': 'error',
'import/named': 'error',
'import/no-duplicates': 'error',
Expand Down
2 changes: 2 additions & 0 deletions react.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module.exports = {
extends: ['./index.js'],
plugins: ['react', 'react-hooks'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
Expand Down

0 comments on commit e3eb9ab

Please sign in to comment.