Kir*_*oss 15 javascript lint eslint vue.js prettier
有没有办法配置 ESLint w/ Prettier 以强制执行 max-len / printWidth 规则但不要求它?也就是说,允许您根据需要添加换行符?
// eslintrc.js
"max-len": [0, 160, 2, { ignoreUrls: true }],
// prettier.config.js
module.exports = {
trailingComma: "all",
tabWidth: 2,
semi: true,
singleQuote: false,
printWidth: 160,
};
Run Code Online (Sandbox Code Playgroud)
Dav*_*haw 11
在 prettier 中设置print-width为 999 将其关闭,然后将 eslintmax-len规则设置为在您首选值时发出警告。
| 归档时间: |
|
| 查看次数: |
33432 次 |
| 最近记录: |