Skip to content

Commit

Permalink
fix(lint): correct setup to require extension (#381)
Browse files Browse the repository at this point in the history
Apparently the "ignorePackages" option also ignores some relative imports, where it shouldn't. The flag however works as expected.
  • Loading branch information
Haroenv committed Aug 6, 2019
1 parent 0580052 commit 29afbd5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Expand Up @@ -2,6 +2,6 @@ module.exports = {
extends: ['algolia', 'algolia/jest'],
rules: {
'valid-jsdoc': 'off',
'import/extensions': ['error', 'ignorePackages'],
'import/extensions': ['error', 'always', { ignorePackages: true }],
},
};
2 changes: 1 addition & 1 deletion src/__tests__/changelog.test.js
@@ -1,4 +1,4 @@
import { getChangelogs, __RewireAPI__ } from '../changelog'; // eslint-disable-line import/named
import { getChangelogs, __RewireAPI__ } from '../changelog.js'; // eslint-disable-line import/named

const gotSnapshotUrls = new Set([
'https://gitlab.com/janslow/gitlab-fetch/raw/master/CHANGELOG.md',
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/config.test.js
@@ -1,4 +1,4 @@
import config from '../config';
import config from '../config.js';

it('gets the correct keys from env variables', () => {
// from mocked .env
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/formatPkg.test.js
@@ -1,6 +1,6 @@
import formatPkg from '../formatPkg';
import formatPkg from '../formatPkg.js';
import rawPackages from './rawPackages.json';
import isISO8601 from 'validator/lib/isISO8601';
import isISO8601 from 'validator/lib/isISO8601.js';

it('transforms correctly', () => {
rawPackages
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/typescript.test.js
@@ -1,6 +1,6 @@
import { getTypeScriptSupport } from '../typescriptSupport';
jest.mock('../npm');
jest.mock('../unpkg');
import { getTypeScriptSupport } from '../typescriptSupport.js';
import * as npm from '../npm/index.js';
import { fileExistsInUnpkg } from '../unpkg.js';

Expand Down

0 comments on commit 29afbd5

Please sign in to comment.