yasuto2002 / SyncMemo

0 stars 0 forks source link

EsLint導入 #96

Closed yasuto2002 closed 1 year ago

yasuto2002 commented 1 year ago

コード制約を作成するためにESlintを導入

https://zenn.dev/rescuenow/articles/e39b8272439f1a

yasuto2002 commented 1 year ago

Prettier?

コードを整形してくれるらしい

https://maku.blog/p/au8iu6u/

yasuto2002 commented 1 year ago

修正修正不可能ぐらいエラー出た

extends: 
  - "@nuxtjs/eslint-config-typescript"
スクリーンショット 2023-03-03 15 52 59
yasuto2002 commented 1 year ago

ちょい修正しなく良くなった

スクリーンショット 2023-03-03 15 59 27

env:
  browser: true
  es2021: true
  node: true
extends:
  - eslint:recommended
  - plugin:vue/vue3-essential
  - plugin:@typescript-eslint/recommended
overrides: []
parser: '@typescript-eslint/parser'
parserOptions:
  ecmaVersion: latest
  sourceType: module
plugins:
  - vue
  - '@typescript-eslint'
rules: {}
yasuto2002 commented 1 year ago

extends

typescript-eslint/eslint-plugin

https://eslint.vuejs.org/rules/

eslint-plugin-vue

eslint-plugin-vue

yasuto2002 commented 1 year ago

結局これに

参考

yasuto2002 commented 1 year ago

prettierrcが余計なフォルダも整形している

スクリーンショット 2023-03-04 18 23 12

これで解決 .prettierignore

.nuxt/
.output/

https://qiita.com/sugasaki/items/0ccb272b03b5ef3aeb86