antfu-collective / vitesse

🏕 Opinionated Vite + Vue Starter Template

Home Page:https://vitesse.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a plan to support jsx?

whoooami opened this issue · comments

Clear and concise description of the problem

.

Suggested solution

.

Alternative

No response

Additional context

No response

Validations

No, it's a template after all, feel free to install it yourself.

No, it's a template after all, feel free to install it yourself.

got it, thx.

Sorry to both again, After I changed [...all].vue to [...all].jsx, eslint kept reporting errors. Below are the corresponding results for 404.jsx and the corresponding pnpm lint.

[...all].jsx

import { defineComponent } from 'vue'

export default defineComponent({
  // name: '404Page',
  setup() {
    // your setup code here
    const { t } = useI18n()
    // eslint-disable-next-line unused-imports/no-unused-vars
    const { route } = useRoute()

    return () => (
      <>
        <div>
          { t('not-found') }
        </div>
        <route lang="yaml">
        meta:
          layout: 404
        </route>
      </>
    )
  },
})

pnpm lint result

  16:28  error  Expected indentation of 10 space characters but found 8   style/jsx-indent
  16:28  error  Expected indentation of 10 space characters but found 10  style/jsx-indent

if use --fix. the layout not work anymore.

<route lang="yaml">
  meta:
  layout: 404
</route>

I tried for half a day and couldn't find a solution that use eslint ignored the problem. If it's convenient for you, please help me take a look. Thanks again.