Skip to content

Commit 2512deb

Browse files
依存モジュールを並び替える
1 parent 6ec4d78 commit 2512deb

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.eslintrc.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ module.exports = {
6161
},
6262
],
6363
'import/no-unresolved': 'off',
64-
'import/order': 'off',
6564
'react/prop-types': ['off'],
6665
// windowやlocationを使えなくなるためoff
6766
'no-restricted-globals': 'off',
@@ -86,5 +85,16 @@ module.exports = {
8685
'no-use-before-define': 'off',
8786
// TypeScriptのconstructorのfieldは空でOK
8887
'no-useless-constructor': 'off',
88+
// 依存モジュールを並び替える
89+
'sort-imports': ['error', { ignoreDeclarationSort: true }],
90+
'import/order': [
91+
'error',
92+
{
93+
alphabetize: {
94+
order: 'asc',
95+
caseInsensitive: false,
96+
},
97+
},
98+
],
8999
},
90100
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"build": "next build",
77
"start": "next start",
88
"test": "jest",
9-
"fix": "prettier --write '/**/*.{js,jsx,ts,tsx}'",
9+
"fix": "prettier --write './**/*.{js,jsx,ts,tsx}'",
1010
"lint": "eslint . --cache --fix",
1111
"storybook": "start-storybook",
1212
"build-storybook": "build-storybook -p 6006"

src/components/__tests__/Greeting.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import '@testing-library/jest-dom'
2-
import React from 'react'
32
import { render, screen } from '@testing-library/react'
3+
import React from 'react'
4+
45
import Greeting from '../Greeting'
56

67
describe('Greeting', () => {

0 commit comments

Comments
 (0)