Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • J js-stack-from-scratch
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 39
    • Issues 39
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Verekia
  • js-stack-from-scratch
  • Issues
  • #237
Closed
Open
Issue created Jul 05, 2017 by markandersonus@markandersonus

I got issues after adding flow

got a lot of issues on section 2 after adding flow.

also dog.js changed from

module.exports = Dog

to

export default Dog

is that correct

ERRORS node_modules/eslint-plugin-jsx-a11y/src/rules/media-has-caption.js:53 v-------------------------------------- 53: const trackChildren: Array = node.children.filter((child: Node) => { 54: if (child.type !== 'JSXElement') { 55: return false; ...: 60: }); -^ call of method filter. Function cannot be called on any member of intersection type 53: const trackChildren: Array = node.children.filter((child: Node) => { ^^^^^^^^^^^^^^^^^^^^ intersection Member 1: 245: filter(callbackfn: typeof Boolean): Array<$NonMaybeType>; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See lib: C:\Users\MARK1.AND\AppData\Local\Temp\flow\flowlib_3a00fe38\core.js:245 Error: v----------------- 53: const trackChildren: Array = node.children.filter((child: Node) => { 54: if (child.type !== 'JSXElement') { 55: return false; ...: 60: }); ^ statics of function. This type is incompatible with v----------------------- 106: declare class Boolean { 107: constructor(value?: mixed): void; 108: static (value:any):boolean; ...: 111: } ^ statics of Boolean. See lib: C:\Users\MARK1.AND\AppData\Local\Temp\flow\flowlib_3a00fe38\core.js:106 Member 2: 246: filter(callbackfn: (value: T, index: number, array: Array) => any, thisArg?: any): Array; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See lib: C:\Users\MARK~1.AND\AppData\Local\Temp\flow\flowlib_3a00fe38\core.js:246 Error: 4924: children: Array; ^^^^ object type. This type is incompatible with the expected param type of. See: node_modules/ast-types-flow/lib/types.js:4924 53: const trackChildren: Array = node.children.filter((child: Node) => { ^^^^ Node

node_modules/eslint-plugin-jsx-a11y/src/rules/media-has-caption.js:59 59: return isTrackType(context, elementType(child.openingElement)); ^^^^^^^^^^^^^^ property openingElement. Property not found in 59: return isTrackType(context, elementType(child.openingElement)); ^^^^^ Node

src/index.js:5 5: const toby = new Dog('Toby') ^^^^^^^^^^^^^^^ constructor call. Constructor cannot be called on 5: const toby = new Dog('Toby') ^^^ CommonJS exports of "./dog"

Found 3 errors

Assignee
Assign to
Time tracking