Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

[Error] Global Node Objects '__dirname' and '__filename' #145

Closed
@andrewjtorres

Description

@andrewjtorres

What version of TypeScript are you using?
2.0.3

What version of typescript-eslint-parser are you using?
1.0.2

What code were you trying to parse?

export const sequelizeData = new Umzug({

  migrations: {
    params: [sequelize.getQueryInterface(), Sequelize],
    path: path.resolve(__dirname, './seeders'),
    pattern: /^[A-Z]+\.js$/i,
  },

  storage: 'sequelize',

  storageOptions: {
    modelName: 'SequelizeData',
    sequelize,
    tableName: 'sequelize_data',
  },

});

What did you expect to happen?
This project was originally pure JavaScript, my team and I are currently in the process of migrating it to TypeScript. Prior to the migration, the line: path: path.resolve(__dirname, './seeders'),, would pass our linting rules.

What happened?
After implementing 'typescript-eslint-parser', the line: path: path.resolve(__dirname, './seeders'),, results in a 'no-undef' error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions