Skip to content

Commit 7e56730

Browse files
committed
Enforce using the .json extension for JSON files in imports
1 parent a64ffc4 commit 7e56730

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

config/plugins.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ module.exports = {
5151
'error',
5252
{
5353
js: 'never',
54-
json: 'never',
55-
jsx: 'never'
54+
jsx: 'never',
55+
json: 'always'
5656
}
5757
],
5858
'import/first': 'error',

test/options-manager.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import path from 'path';
22
import test from 'ava';
33
import proxyquire from 'proxyquire';
44
import slash from 'slash';
5-
import parentConfig from './fixtures/nested/package';
6-
import childConfig from './fixtures/nested/child/package';
7-
import prettierConfig from './fixtures/prettier/package';
8-
import enginesConfig from './fixtures/engines/package';
5+
import parentConfig from './fixtures/nested/package.json';
6+
import childConfig from './fixtures/nested/child/package.json';
7+
import prettierConfig from './fixtures/prettier/package.json';
8+
import enginesConfig from './fixtures/engines/package.json';
99

1010
process.chdir(__dirname);
1111

0 commit comments

Comments
 (0)