ampcpmgp / parcel-riot-mocktimes-starter

parcel & riot & mocktimes starter kit
0 stars 0 forks source link

Add prettier #3

Closed ampcpmgp closed 6 years ago

ampcpmgp commented 6 years ago

叩いたコマンド

npx prettier --write **/*.tag.html

エラー内容

[error] src\app\parts\header.tag.html: SyntaxError: Unexpected token, expected "," (3:7)
[error]   1 | import riot from 'riot'
[error]   2 |
[error] > 3 | <parts-header>
[error]     |       ^
[error]   4 |   <span onclick={addCount}>menu</span>
[error]   5 |   <span>{clickCount} / {clickHistory.length}</span>
[error]   6 |   <style type="less">
src\app\root.tag.html
[error] src\app\root.tag.html: SyntaxError: Unexpected token, expected "," (3:5)
[error]   1 | import riot from 'riot'
[error]   2 |
[error] > 3 | <app-root>
[error]     |     ^
[error]   4 |   <parts-header></parts-header>
[error]   5 |   <h2>{title}</h2>
[error]   6 |   <div>

他に試したこと

参考リンク

https://qiita.com/kiida/items/405bb07c4b52bfee0219 (主にここ) https://prettier.io/docs/en/precommit.html

ampcpmgp commented 6 years ago

📝 *.tag.html から jsを分離し、そのjsにprettierを書ける仕組みに変更することを試してみる。

ampcpmgp commented 6 years ago

https://github.com/ampcpmgp/parcel-riot-mocktimes-starter/pull/4

↑で別対応したのでクローズ