Static GitHub Issues

[1588] flowtype support

prev: List of siblingPages, parentPage, etc
next: after click nuxt-link ,route doesn't change.

I'm trying to include flowtype support in my app, but its throwing error and so far i have been unable to solve the issue. P.S. I do have a vue.js project with this exact same config and it works.

.babelrc
{
  "presets": [
    ["env", { "modules": false }],
    "stage-2",
    ["es2015", {"modules": false }],
    "flow-vue"
  ],
  "plugins": [
    "transform-runtime",
    "babel-plugin-transform-class-properties",
    "syntax-flow",
    "babel-plugin-transform-flow-strip-types"
  ],
  "comments": false
}
.eslintrc.js
// http://eslint.org/docs/user-guide/configuring

module.exports = {
  root: true,
  parserOptions: {
    parser: 'babel-eslint',
    sourceType: 'module'
  },
  env: {
    browser: true,
    node: true
  },
  // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
  extends: [
    'standard',
    'plugin:flowtype/recommended'
  ],
  // required to lint *.vue files
  plugins: [
    'html',
    'flowtype-errors',
    'flowtype'
  ],
  // add your custom rules here
  'rules': {
    'flowtype-errors/show-errors': 2,
    // allow paren-less arrow functions
    'arrow-parens': 0,
    'semi': ["error", "always"],
    // allow async-await
    'generator-star-spacing': 0,
    // allow debugger during development
    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
  }
}
.flowconfig
[include]
pages/**/.*
components/**/.*
plugins/.*

[ignore]
.*/build/.*
.*/config/.*
.*/dist/.*
.*/node_modules/.*
.*/static/.*
.*/test/.*
.*/ssl/.*

[libs]
./flow/

[options]
emoji=true
module.file_ext=.vue
module.file_ext=.js
server.max_workers=3
log.file=./flow.log
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe
unsafe.enable_getters_and_setters=true
module.system.node.resolve_dirname=node_modules
module.name_mapper='^.*\.css$' -> 'empty/object'
module.name_mapper='^.*\.js$' -> 'empty/object'
pages/index.vue
methods: {
    testing(param: Object) {

    }
  }

On running npm run dev flow-error

this is the error i get.

Also, if i run node_modules/.bin/flow check it works properly. And if i remove the flowtypes, eslint throws error to add flowtype annotations.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This bug report is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1417">#c1417</a>)</em></sub></div>