Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

280
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!