質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.47%
Vue.js

Vue.jsは、Webアプリケーションのインターフェースを構築するためのオープンソースJavaScriptフレームワークです。

ESLint

ESLintは、JavaScriptのための構文チェックツール。全検証ルールを自由に on/offでき、独自のプロジェクトに合わせたカスタムルールを容易に設定することが可能。公開されている様々なプラグインを組み込んで使用することもできます。

Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

Nuxt.js

Nuxt.jsは、ユニバーサルなSPAが開発可能なVue.jsベースのフレームワーク。UIの描画サポートに特化しており、SSRにおけるサーバーサイドとクライアントサイドのUIレンダリングなどさまざまな機能を持ちます。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

Q&A

解決済

1回答

3612閲覧

ESLintエラーです

riki01

総合スコア10

Vue.js

Vue.jsは、Webアプリケーションのインターフェースを構築するためのオープンソースJavaScriptフレームワークです。

ESLint

ESLintは、JavaScriptのための構文チェックツール。全検証ルールを自由に on/offでき、独自のプロジェクトに合わせたカスタムルールを容易に設定することが可能。公開されている様々なプラグインを組み込んで使用することもできます。

Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

Nuxt.js

Nuxt.jsは、ユニバーサルなSPAが開発可能なVue.jsベースのフレームワーク。UIの描画サポートに特化しており、SSRにおけるサーバーサイドとクライアントサイドのUIレンダリングなどさまざまな機能を持ちます。

JavaScript

JavaScriptは、プログラミング言語のひとつです。ネットスケープコミュニケーションズで開発されました。 開発当初はLiveScriptと呼ばれていましたが、業務提携していたサン・マイクロシステムズが開発したJavaが脚光を浴びていたことから、JavaScriptと改名されました。 動きのあるWebページを作ることを目的に開発されたもので、主要なWebブラウザのほとんどに搭載されています。

0グッド

0クリップ

投稿2021/01/24 16:12

##今の状況
現在開発環境をDocker、フロントをVue.js、バックエンドをFirebaseで構築しています。
また、コード整形ツールとしてESLint,Prettierを導入しているのですが、yarn lintで起動させると以下の様なエラーが出てしまいます。

ERROR in ./pages/register.vue Module Error (from ./node_modules/eslint-loader/dist/cjs.js): /app/pages/register.vue 139:1 error Expected indentation of 6 spaces but found 8 indent 140:1 error Expected indentation of 8 spaces but found 10 indent 141:1 error Expected indentation of 10 spaces but found 12 indent 142:1 error Expected indentation of 10 spaces but found 12 indent 143:1 error Expected indentation of 8 spaces but found 10 indent 144:1 error Expected indentation of 6 spaces but found 8 indent 145:1 error Expected indentation of 8 spaces but found 10 indent 146:1 error Expected indentation of 10 spaces but found 12 indent 147:1 error Expected indentation of 10 spaces but found 12 indent 148:1 error Expected indentation of 8 spaces but found 10 indent 149:1 error Expected indentation of 6 spaces but found 8 indent 150:1 error Expected indentation of 8 spaces but found 10 indent 151:1 error Expected indentation of 10 spaces but found 12 indent 152:1 error Expected indentation of 10 spaces but found 12 indent 153:1 error Expected indentation of 8 spaces but found 10 indent 154:1 error Expected indentation of 6 spaces but found 8 indent 155:1 error Expected indentation of 8 spaces but found 10 indent 156:1 error Expected indentation of 10 spaces but found 12 indent 157:1 error Expected indentation of 10 spaces but found 12 indent 158:1 error Expected indentation of 8 spaces but found 10 indent 159:1 error Expected indentation of 6 spaces but found 8 indent 160:1 error Expected indentation of 8 spaces but found 10 indent 161:1 error Expected indentation of 10 spaces but found 12 indent 162:1 error Expected indentation of 10 spaces but found 12 indent 163:1 error Expected indentation of 8 spaces but found 10 indent 168:19 error Expected error to be handled node/handle-callback-err ✖ 26 problems (26 errors, 0 warnings) 25 errors and 0 warnings potentially fixable with the `--fix` option.

##試したこと
PrettierとESLintのspaceの広さを合わせました。

.prettierファイル

{ "printWidth": 120, "tabWidth": 2, "semi": false, "singleQuote": true, "trailingComma": "none", "bracketSpacing": true, "arrowParens": "avoid" }

.eslintrc.js

module.exports = { root: true, env: { node: true, es6: true }, parser: 'vue-eslint-parser', parserOptions: { sourceType: 'module', parser: 'babel-eslint' }, extends: [ '@nuxtjs', 'eslint:recommended', 'plugin:vue/recommended', 'plugin:vue-types/recommended', 'prettier', 'prettier/vue', 'plugin:nuxt/recommended', 'plugin:prettier/recommended' ], plugins: ['vue'], rules: { 'prettier/prettier': 0, 'vue/html-closing-bracket-newline': [ 'error', { multiline: 'always' } ], indent: [2, 'tab'],⇦追加(ESLintのdefaultは4) 'no-console': 'off', 'vue/require-prop-types': 0, 'vue/max-attributes-per-line': 'off', 'vue/html-self-closing': 'off', 'no-unused-vars': 'off', 'no-extra-parens': 1, 'no-multi-spaces': 2, 'vue/singleline-html-element-content-newline': 'off', 'vue/multiline-html-element-content-newline': 'off' } }

###結果
エラーは解消されませんでした。

理由が分からず困っておりますので、是非どなたかご教示頂けますと嬉しいです。
宜しくお願い致します。

GitHubはこちら

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

試したことが的外れに思えるんですが、まず見る所ってここじゃないかと思います。
/app/pages/register.vue

エラーの理由もESlintがメッセージで
このファイルのインテンドがおかしいって言っているし。

もし動的生成するものだったり、配布ライブラリの絡む問題であれば手出しできないかもしれませんが、
その場合は無視する等の対策があると思います。

投稿2021/01/24 16:39

退会済みユーザー

退会済みユーザー

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

riki01

2021/01/24 17:24

mahnyさん ご返信ありがとうございます! すみません説明不足でした。そちらも確認をしたのですが特にエラーも出ておらず、そいった状況でご質問させて頂きました。 ひとまず無視するといった手段は考えておりませんでしたので試してみます! ありがとうございます!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.47%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問