Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

282
Visualizações
How to configure eslint-plugin-flowtype with @babel/eslint-parser?

My .eslintrc.js file looks like

module.exports = {
  parser: '@babel/eslint-parser',
  extends: ['eslint:recommended', 'plugin:flowtype/recommended', 'plugin:react/recommended'],
  plugins: ['flowtype', 'react'],
  settings: {
    react: {
      version: 'detect'
    },
    flowtype: {
      onlyFilesWithFlowAnnotation: false
    },
    import: {
      node: {
        extensions: ['.js', '.jsx', '.ts', '.tsx']
      }
    }
  },
  env: {
    es6: true,
    mocha: true,
    node: true
  },
  rules: {
    eqeqeq: ['error', 'always'],
    'no-console': 'off',
    'no-var': 'off',
    'prefer-const': 'off',
    'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
    'flowtype/space-after-type-colon': [2, 'always', { allowLineBreak: true }],
    'flowtype/generic-spacing': 'off',
    'flowtype/no-types-missing-file-annotation': 'off',
    'react/no-deprecated': 'off'
  }
};

But flowtype is not working with eslint. I am getting following error when I import flowtype types:

ESLint: Parsing error: Unexpected token (2:12)

Any help or suggestion would be appreciated.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda