You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2019/05/23 18:26:04 UTC

[incubator-annotator] 02/05: Require extensions for non-package imports

This is an automated email from the ASF dual-hosted git repository.

randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git

commit 5b1262be621649e987635dd9ab20a721fcf4dc42
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Thu May 23 12:20:18 2019 -0400

    Require extensions for non-package imports
---
 .eslintrc.js                              | 1 +
 packages/fragment-identifier/src/index.js | 2 +-
 packages/range/src/index.js               | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.eslintrc.js b/.eslintrc.js
index 414bb5c..1c99acd 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -14,6 +14,7 @@ module.exports = {
   },
   plugins: ['import', 'prettier'],
   rules: {
+    'import/extensions': ['error', 'always', { ignorePackages: true }],
     'import/no-default-export': 'error',
     'import/order': 'error',
     'import/unambiguous': 'error',
diff --git a/packages/fragment-identifier/src/index.js b/packages/fragment-identifier/src/index.js
index fd4f317..c7d85ea 100644
--- a/packages/fragment-identifier/src/index.js
+++ b/packages/fragment-identifier/src/index.js
@@ -13,7 +13,7 @@
  * the License.
  */
 
-export { SyntaxError, parse } from './fragment';
+export { SyntaxError, parse } from './fragment.js';
 
 /**
  * Convert a Selector or State into a fragment identifier string.
diff --git a/packages/range/src/index.js b/packages/range/src/index.js
index f2af25d..f1fc4d7 100644
--- a/packages/range/src/index.js
+++ b/packages/range/src/index.js
@@ -13,7 +13,7 @@
  * the License.
  */
 
-import { product } from './cartesian';
+import { product } from './cartesian.js';
 
 export function createRangeSelector({ createAnySelector }) {
   const startSelector = createAnySelector();