Skip to content

Support Node 8.X #63

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

🚀 Feature Request

Node 8 is still in LTS through the end of 2019 (though Node 6 is not anymore, hooray!). tslint-eslint-config should explicitly support it.

Existing Behavior

Instead, tslint-eslint-config crashes silently when run in Node 8. Darn.

Change Proposal

Usage of the new .promises APIs, e.g. fs.promises (https://nodejs.org/dist/latest-v10.x/docs/api/fs.html#fs_fs_promises_api), is experimental in Node 10 and not available in Node 8. Any usage of this:

import * as fs from "fs";

// ...

await fs.promises.readFile("...");

...should be replaced by something like:

import * as fs from "fs";
import { promisify } from "utils";

const readFile = promisify(fs.readFile);

// ...

await readFile("...");

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions