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

質問編集履歴

1

.eslint.jsファイルの記述を追加

2020/09/28 07:03

投稿

pontarou3
pontarou3

スコア18

title CHANGED
@@ -1,1 +1,1 @@
1
- Firebaseでデプロイ時にプラグインの一意エラーが発生してしまう。
1
+ Firebaseでデプロイ時に@typescript-eslintが一意ではないというエラーが発生してしまう。
body CHANGED
@@ -1,4 +1,4 @@
1
- # 「@typescript-eslintというプラグインが重複しているようです」といわれておりますが、どこのどのコードを削除すればいいかわかりません。
1
+ # 「@typescript-eslintというプラグインが重複している」といわれておりますが、どこのどのコードを削除すればいいかわかりません。
2
2
 
3
3
  現在、初めてFirebaseにてReactのアプリケーション構築を学習しています。
4
4
  以下のエラー文の解決ができず、先にすすめていない状況です。
@@ -35,6 +35,84 @@
35
35
 
36
36
  ```
37
37
 
38
+
39
+ **.eslint.jsファイル↓**
40
+ ```
41
+ module.exports = {
42
+ env: {
43
+ browser: true,
44
+ es6: true,
45
+ node: true,
46
+ },
47
+ extends: [
48
+ "plugin:import/errors",
49
+ "plugin:import/warnings",
50
+ ],
51
+ parser: "@typescript-eslint/parser",
52
+ parserOptions: {
53
+ project: "tsconfig.json",
54
+ sourceType: "module",
55
+ },
56
+ plugins: [
57
+ "@typescript-eslint",
58
+ "import",
59
+ ],
60
+ rules: {
61
+ "@typescript-eslint/adjacent-overload-signatures": "error",
62
+ "@typescript-eslint/no-empty-function": "error",
63
+ "@typescript-eslint/no-empty-interface": "warn",
64
+ "@typescript-eslint/no-floating-promises": "error",
65
+ "@typescript-eslint/no-namespace": "error",
66
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
67
+ "@typescript-eslint/prefer-for-of": "warn",
68
+ "@typescript-eslint/triple-slash-reference": "error",
69
+ "@typescript-eslint/unified-signatures": "warn",
70
+ "comma-dangle": "warn",
71
+ "constructor-super": "error",
72
+ eqeqeq: ["warn", "always"],
73
+ "import/no-deprecated": "warn",
74
+ "import/no-extraneous-dependencies": "error",
75
+ "import/no-unassigned-import": "warn",
76
+ "no-cond-assign": "error",
77
+ "no-duplicate-case": "error",
78
+ "no-duplicate-imports": "error",
79
+ "no-empty": [
80
+ "error",
81
+ {
82
+ allowEmptyCatch: true,
83
+ },
84
+ ],
85
+ "no-invalid-this": "error",
86
+ "no-new-wrappers": "error",
87
+ "no-param-reassign": "error",
88
+ "no-redeclare": "error",
89
+ "no-sequences": "error",
90
+ "no-shadow": [
91
+ "error",
92
+ {
93
+ hoist: "all",
94
+ },
95
+ ],
96
+ "no-throw-literal": "error",
97
+ "no-unsafe-finally": "error",
98
+ "no-unused-labels": "error",
99
+ "no-var": "warn",
100
+ "no-void": "error",
101
+ "prefer-const": "warn",
102
+ },
103
+ settings: {
104
+ jsdoc: {
105
+ tagNamePreference: {
106
+ returns: "return",
107
+ },
108
+ },
109
+ },
110
+ };
111
+
112
+ ```
113
+
114
+
115
+
38
116
  ググっても同じような事例をみつけられず、、、迷走してしまっています。
39
117
 
40
118
  # 仮設と試したこと