From 7c375f149a04438e5193e475749ae2aa67af9163 Mon Sep 17 00:00:00 2001 From: umanoto Date: Tue, 7 Feb 2023 00:03:13 +0900 Subject: [PATCH 01/10] eslint --- .eslintignore | 6 + .eslintrc.js | 33 + .idea/workspace.xml | 4 +- .prettierrc.js | 5 + package-lock.json | 220 +- package.json | 20 +- src/App.test.tsx | 14 +- src/App.tsx | 17 +- src/components/CharacterList.tsx | 13 +- src/domain/entity.ts | 31 +- src/index.tsx | 18 +- src/reportWebVitals.ts | 20 +- src/repository/repository.ts | 3 +- src/setupTests.ts | 2 +- yarn.lock | 9342 ++++++++++++++++++++++++++++++ 15 files changed, 9679 insertions(+), 69 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.js create mode 100644 .prettierrc.js create mode 100644 yarn.lock diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..be317e7 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,6 @@ +build/ +public/ +**/node_modules/ +*.config.js +.*lintrc.js +/*.* \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..466d116 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,33 @@ +module.exports = { + env: { + browser: true, + es2021: true + }, + extends: [ + 'plugin:react/recommended', + 'standard-with-typescript', + 'prettier' + ], + overrides: [], + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + tsconfigRootDir: __dirname, + project: ['./tsconfig.json'] + }, + ignorePatterns: [ + ".eslintrc.js" + ], + plugins: [ + 'react' + ], + rules: {}, + settings: { + 'import/resolver': { + node: { + paths: ['src'], + extensions: ['.js', '.jsx', '.ts', '.tsx'] + }, + }, + }, +} diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 34b4236..0ba924e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,7 +6,8 @@ - + +