Reactjs 如何禁用“断开线”更漂亮

Reactjs 如何禁用“断开线”更漂亮,reactjs,typescript,jsx,eslint,prettier,Reactjs,Typescript,Jsx,Eslint,Prettier,我的printWidth值是200,例如每次都会断开 <Form.Item label="xxx"><Input /></Form.Item> <Form.Item label="yyy"><Select /></Form.Item> <Form.Item label="zzzz"><Input /></Form.Item> 更

我的printWidth值是200,例如每次都会断开

<Form.Item label="xxx"><Input /></Form.Item>
<Form.Item label="yyy"><Select /></Form.Item>
<Form.Item label="zzzz"><Input /></Form.Item>
更漂亮的规则。

module.exports = {
  extends: ['airbnb-typescript-prettier'],
  parser: '@typescript-eslint/parser',
  "ignorePatterns": ["**/components/global/context_menu/*"],
  rules: {
    "radix": 'off',
    '@typescript-eslint/explicit-module-boundary-types': 'off',
    '@typescript-eslint/no-explicit-any': 'off',
    'react/button-has-type': 'off',
    'no-use-before-define': 'off',
    'react/jsx-filename-extension': 'off',
    'react/prop-types': 'off',
    'jsx-a11y/alt-text': 'off',
    'react/jsx-props-no-spreading': 'off',
    'comma-dangle': 'off',
    'consistent-this': [0, 'component'],
    '@typescript-eslint/no-this-alias': 'off',
    'react/forbid-prop-types': 'off',
    'no-self-compare': 'off',
    'react/require-default-props': 'off',
    'no-return-assign': 'off',
    'react/destructuring-assignment': 'off',
    camelcase: 'off',
    "jsx-a11y/label-has-associated-control":"off",
    'prefer-destructuring': 'off',
    'react-hooks/exhaustive-deps':'off',
    'jsx-a11y/click-events-have-key-events':'off',
    'jsx-a11y/no-static-element-interactions':'off',
    'no-throw-literal': 'off',
    'no-mixed-spaces-and-tabs': 'off',
    'no-tabs': 'off',
    'react/no-unescaped-entities': 'off',
    'no-underscore-dangle': 'off',
    'import/no-cycle': 'off',
    'max-len': [2, 150, 2],
  },
};
module.exports = {
    singleQuote: true,
    trailingComma: 'all',
    printWidth: 200,
    arrowParens:"always"
  };

如果你不想让更漂亮的人设计你代码的一部分,你只需要这样做:(那个更漂亮的人忽略注释)

{/*prettier ignore*/}
这是基于以下文档:


希望这有助于我不能把这个代码块放在任何地方。事实上,漂亮的文档建议不要以你想要的方式使用它。看,他们说:换句话说,不要试图使用printWidth,就好像它是ESLint的max len一样——它们不一样。max len只是说明允许的最大行长度,而不是通常首选的长度,这是printWidth指定的长度。
module.exports = {
    singleQuote: true,
    trailingComma: 'all',
    printWidth: 200,
    arrowParens:"always"
  };
{/* prettier-ignore */}
<Form.Item label="xxx"><Input /></Form.Item>