prettier / prettier-vscode

Visual Studio Code extension for Prettier
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
MIT License
5.04k stars 446 forks source link

Indent not aligned #3311

Closed xf11075 closed 1 month ago

xf11075 commented 2 months ago

VSCode Version:1.86.2

Prettier Version:10.1.0

My Code (filename: app.js):

import "./App.css"
import React, { useState, useEffect } from "react"
import { StyleProvider, legacyLogicalPropertiesTransformer } from "@ant-design/cssinjs"
import { Table, ConfigProvider, Space, Switch } from "antd"

const App = () => {
    const [summary, setSummary] = useState(false)
    return (
        <ConfigProvider theme={{ hashed: false }}>
            <Table
                summary={
                    summary
                        ? () => (
                              <Table.Summary fixed>
                                  <Table.Summary.Row>
                                      <Table.Summary.Cell index={0} align="center">
                                          总结
                                      </Table.Summary.Cell>
                                      <Table.Summary.Cell index={1} colSpan={4}>
                                          This is a summary content
                                      </Table.Summary.Cell>
                                  </Table.Summary.Row>
                              </Table.Summary>
                          )
                        : null
                }
            />
        </ConfigProvider>
    )
}
export default App

My indentation size: 4

My Question

after my code is handled by Prettier, summary={summary... Indent abnormal, the parentheses are not aligned

xf11075 commented 2 months ago

1

ntotten commented 2 months ago

Does this happen when running the prettier cli directly?