Closed CLDXiang closed 3 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/cldxiang/today-frontend/3kw93BoguMcjdd4r9xzbvkKW5cfy
✅ Preview: https://today-frontend-git-build-eslint-max-len-cldxiang.vercel.app
✨ 工作描述
由于 TailwindCSS 类名和 SVG path
d
attribute 的字符串难免较长,很容易超出 ESLintmax-len
的限制,故使用max-len
的ignorePattern
配置忽略这两种情况的 ESLint 检查添加的正则 pattern 为:
^\\s*(class|d)="[^"]+"
,即忽略<若干空白符>class="<非 " 字符>"
或<若干空白符>d="<非 " 字符>"
的行顺便将此前用数组方式打散的类名改回了 plain
class
的写法🍀 给 Reviewer 的辅助信息
max-len
在其他开发者本地是否正常工作,可以稍微测试一下不同情况class
写法的地方有没有粘贴错或者忘了加空格之类的情况🛠️ 对项目配置的改动
✅ 检查清单
public/changeLog.json
(若有必要)