Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to ESLint 9 #26

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Adapt to ESLint 9 #26

wants to merge 2 commits into from

Conversation

diego3g
Copy link
Member

@diego3g diego3g commented Aug 8, 2024

BETA relase adapting to ESLint 9 (please read #21).

For now:

npm i eslint@9 typescript@5 @rocketseat/eslint-config@beta

React

Inside eslint.config.mjs

import config from '@rocketseat/eslint-config/react.mjs'

export default config

Node.js

Inside eslint.config.mjs

import config from '@rocketseat/eslint-config/node.mjs'

export default config

@diego3g diego3g added the help wanted Extra attention is needed label Aug 8, 2024
@diego3g diego3g self-assigned this Aug 8, 2024
@duhnunes
Copy link

duhnunes commented Aug 22, 2024

Hey @diego3g

Eu consegui chegar a algo mais próximo de antes, indentando uma prop por linha, porém o children ainda teria que indentar na mão e também ainda tem o problema dos 80 characters, no caso de tailwind:

      '@stylistic/jsx-closing-bracket-location': 'error',
      '@stylistic/jsx-closing-tag-location': 'error',
      '@stylistic/jsx-first-prop-new-line': ['error', 'multiprop'],
      '@stylistic/jsx-function-call-newline': ['error', 'always'],
      '@stylistic/jsx-max-props-per-line': ['error', {
        maximum: 1,
      }],

image

Testando também como eu falei aqui: #21 (comment), podemos usar o spread operator e importar a configuração de @rocketseat/eslint-config dentro do eslint.config.ts criado pelo próprio vite. Nos testes criando um novo projeto com vite, tem se saído bem o resultado.

espero que isso sirva pra alguma coisa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants