首页 > 解决方案 > Eslint 对象属性换行不起作用

问题描述

我有"object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],并且"max-len": "off",在我的.eslintrc但对象中

const something = {a: 5, ffsdfasdasdsddddd: 'asdasdasdddddddddddssssssddddddddd'};

如果它们超过 80 个字符,仍然会分成多行,我该如何阻止它?

标签: javascripteslint

解决方案


检查:的值 "printWidth": 140,并在此处调整最大值。每行字符数


推荐阅读