Skip to content
This repository was archived by the owner on May 22, 2024. It is now read-only.

Commit 96e9a95

Browse files
authoredFeb 8, 2022
fix: use .js and index.js in imports (#974)
1 parent 0a738b1 commit 96e9a95

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+216
-205
lines changed
 

‎.eslintrc.cjs

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ const { overrides } = require('@netlify/eslint-config-node')
33
module.exports = {
44
extends: '@netlify/eslint-config-node',
55
rules: {
6+
'import/extensions': ['error', 'ignorePackages'],
7+
'node/no-missing-import': 'off',
68
// This rule enforces using Buffers with `JSON.parse()`. However, TypeScript
79
// does not recognize yet that `JSON.parse()` accepts Buffers as argument.
810
'unicorn/prefer-json-parse-buffer': 'off',
@@ -12,6 +14,9 @@ module.exports = {
1214
{
1315
files: '*.ts',
1416
rules: {
17+
// Pure ES modules with TypeScript require using `.js` instead of `.ts`
18+
// in imports
19+
'import/extensions': 'off',
1520
'import/no-namespace': 'off',
1621
},
1722
},

‎src/bin.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { argv, exit } from 'process'
44
import yargs from 'yargs'
55
import { hideBin } from 'yargs/helpers'
66

7-
import type { ArchiveFormat } from './archive'
8-
import { zipFunctions } from './main'
7+
import type { ArchiveFormat } from './archive.js'
8+
import { zipFunctions } from './main.js'
99

1010
// CLI entry point
1111
const runCli = async function () {

1 commit comments

Comments
 (1)

github-actions[bot] commented on Feb 8, 2022

@github-actions[bot]
Contributor

⏱ Benchmark results

largeDepsEsbuild: 6.5s

largeDepsZisi: 51.1s

This repository has been archived.