teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

6

質問の解答

2021/06/01 01:25

投稿

aiai8976
aiai8976

スコア112

title CHANGED
File without changes
body CHANGED
@@ -224,4 +224,11 @@
224
224
  }
225
225
  }
226
226
 
227
+ ```
228
+
229
+ 例えばvalueをvalue_にすると以下のようにエラーが出力されます。
230
+ SuggestionsFetchRequestedParamsを自分で定義していない(@type/react-autosuggestで定義している?)ので、どのように対応したらいいのかわかりません。
231
+
232
+ ```
233
+ プロパティ 'value_' は型 'SuggestionsFetchRequestedParams' に存在しません。
227
234
  ```

5

質問の解答

2021/06/01 01:24

投稿

aiai8976
aiai8976

スコア112

title CHANGED
File without changes
body CHANGED
@@ -150,4 +150,78 @@
150
150
  },
151
151
  }
152
152
 
153
+ ```
154
+
155
+ ###コメントに対して
156
+
157
+ package.json
158
+
159
+ ```
160
+ {
161
+ "name": "catwiki_front",
162
+ "version": "0.1.0",
163
+ "private": true,
164
+ "dependencies": {
165
+ "@chakra-ui/icons": "^1.0.13",
166
+ "@chakra-ui/react": "^1.6.0",
167
+ "@emotion/react": "^11.1.5",
168
+ "@emotion/styled": "^11.3.0",
169
+ "@testing-library/jest-dom": "^5.12.0",
170
+ "@testing-library/react": "^11.2.6",
171
+ "@testing-library/user-event": "^12.8.3",
172
+ "@types/jest": "^26.0.23",
173
+ "@types/node": "^12.20.10",
174
+ "@types/react": "^17.0.4",
175
+ "@types/react-autosuggest": "^10.1.4",
176
+ "@types/react-dom": "^17.0.3",
177
+ "@types/react-router-dom": "^5.1.7",
178
+ "framer-motion": "^4.1.11",
179
+ "react": "^17.0.2",
180
+ "react-autosuggest": "^10.1.0",
181
+ "react-dom": "^17.0.2",
182
+ "react-masonry-css": "^1.0.16",
183
+ "react-router-dom": "^5.2.0",
184
+ "react-scripts": "4.0.3",
185
+ "typescript": "^4.2.4",
186
+ "web-vitals": "^1.1.1"
187
+ },
188
+ "scripts": {
189
+ "start": "react-scripts start",
190
+ "build": "react-scripts build",
191
+ "test": "react-scripts test",
192
+ "eject": "react-scripts eject"
193
+ },
194
+ "eslintConfig": {
195
+ "extends": [
196
+ "react-app",
197
+ "react-app/jest"
198
+ ]
199
+ },
200
+ "browserslist": {
201
+ "production": [
202
+ ">0.2%",
203
+ "not dead",
204
+ "not op_mini all"
205
+ ],
206
+ "development": [
207
+ "last 1 chrome version",
208
+ "last 1 firefox version",
209
+ "last 1 safari version"
210
+ ]
211
+ },
212
+ "devDependencies": {
213
+ "@typescript-eslint/eslint-plugin": "^4.22.0",
214
+ "@typescript-eslint/parser": "^4.22.0",
215
+ "eslint": "^7.25.0",
216
+ "eslint-config-airbnb": "^18.2.1",
217
+ "eslint-config-prettier": "^8.3.0",
218
+ "eslint-plugin-import": "^2.22.1",
219
+ "eslint-plugin-jsx-a11y": "^6.4.1",
220
+ "eslint-plugin-prettier": "^3.4.0",
221
+ "eslint-plugin-react": "^7.23.2",
222
+ "eslint-plugin-react-hooks": "^4.2.0",
223
+ "prettier": "^2.2.1"
224
+ }
225
+ }
226
+
153
227
  ```

4

修正

2021/06/01 01:22

投稿

aiai8976
aiai8976

スコア112

title CHANGED
File without changes
body CHANGED
@@ -3,6 +3,7 @@
3
3
  react-autosuggetionsを導入したいと思っています。
4
4
  自分の環境はtypescriptなので書き換えたものを利用したいのですが、
5
5
  以下のようなエラーが出て困っています。
6
+ valueの変数名を変えるとそのようなtypeはないと言われるので、ルールをoffにしようかなと思い、
6
7
  調べてみたところ、.eslintrc.jsにルールを追加すればいけるらしいのですが、うまくいきませんでした。
7
8
  わかる方がいましたら、コメントお願いします。
8
9
 

3

修正

2021/05/31 08:05

投稿

aiai8976
aiai8976

スコア112

title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,6 @@
1
1
  ### 前提・実現したいこと
2
2
 
3
- react-sutosuggetionsを導入したいと思っています。
3
+ react-autosuggetionsを導入したいと思っています。
4
4
  自分の環境はtypescriptなので書き換えたものを利用したいのですが、
5
5
  以下のようなエラーが出て困っています。
6
6
  調べてみたところ、.eslintrc.jsにルールを追加すればいけるらしいのですが、うまくいきませんでした。

2

修正

2021/05/31 08:03

投稿

aiai8976
aiai8976

スコア112

title CHANGED
File without changes
body CHANGED
@@ -6,6 +6,9 @@
6
6
  調べてみたところ、.eslintrc.jsにルールを追加すればいけるらしいのですが、うまくいきませんでした。
7
7
  わかる方がいましたら、コメントお願いします。
8
8
 
9
+ ####参考
10
+ [https://codesandbox.io/s/zx4ht?file=/src/index.tsx:0-1517](https://codesandbox.io/s/zx4ht?file=/src/index.tsx:0-1517)
11
+
9
12
  ### 発生している問題・エラーメッセージ
10
13
 
11
14
  ```

1

修正

2021/05/31 07:53

投稿

aiai8976
aiai8976

スコア112

title CHANGED
File without changes
body CHANGED
@@ -146,8 +146,4 @@
146
146
  },
147
147
  }
148
148
 
149
- ```
149
+ ```
150
-
151
- ### 補足情報(FW/ツールのバージョンなど)
152
-
153
- ここにより詳細な情報を記載してください。