Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:prettier/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier/@typescript-eslint'
],
globals: {
Expand All @@ -19,7 +21,16 @@ module.exports = {
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: ['@typescript-eslint'],
rules: {},
ignorePatterns: ['dist/', 'node_modules/']
plugins: ['@typescript-eslint', 'import'],
rules: {
"import/order": [2, { "alphabetize": { "order": "asc" } }]
},
Comment on lines +24 to +27
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

importのソートに関する設定

ignorePatterns: ['dist/', 'node_modules/'],
settings: {
"import/resolver": {
typescript: {
alwaysTryTypes: true
}
}
}
}
5 changes: 4 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
preset: 'ts-jest'
preset: 'ts-jest',
moduleNameMapper: {
'~/(.*)': '<rootDir>/src/$1'
}
Comment on lines +3 to +5
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

テストフレームワークのjestのモジュール解決の設定。 '~/version' のように ~/(.*) にマッチするモジュールを '<rootDir>/src/$1 に置換する

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほど

}
Loading