javascript - Eslint 对象属性换行不起作用
问题描述
我有"object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
并且"max-len": "off",
在我的.eslintrc
但对象中
const something = {a: 5, ffsdfasdasdsddddd: 'asdasdasdddddddddddssssssddddddddd'};
如果它们超过 80 个字符,仍然会分成多行,我该如何阻止它?
解决方案
检查:的值
"printWidth": 140,
并在此处调整最大值。每行字符数
推荐阅读
- javascript - 将数据写入其帐户后重定向用户
- c++ - 当 C++ 中涉及继承时,模板有何特别之处?
- typescript - 用于推断递归类型的打字稿提示?
- c# - Xamarin 表单为标签/列表视图创建创建条件
- spring-boot - Spring Boot 2.5 SocketTimeoutException 仅在 Github 操作中
- python-3.x - Python3 循环:超出时间限制,代码优化
- laravel - 如何让 vue 组件在任何地方渲染?
- android - 如何根据特定用户 kotlin 显示内容
- vue.js - 如何选择选择中的第一个选项作为Vue3中的默认选项?
- chart.js - Chartjs刻度颜色在零处不同