Skip to content

Commit

Permalink
chore: disable import/extensions rule for get-it middleware import (#…
Browse files Browse the repository at this point in the history
…6127)

This is done to unblock us, more investigation needed, but seems to work just fine without it.
  • Loading branch information
rexxars authored Mar 26, 2024
1 parent f568e14 commit aca88e9
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {absolutify, pathIsEmpty} from '@sanity/util/fs'
import decompress from 'decompress'
import fs from 'fs/promises'
import {getIt} from 'get-it'
// eslint-disable-next-line import/extensions
import {promise} from 'get-it/middleware'
import path from 'path'
import resolveFrom from 'resolve-from'
Expand Down
1 change: 1 addition & 0 deletions packages/@sanity/cli/test/shared/request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {getIt} from 'get-it'
// eslint-disable-next-line import/extensions
import {promise} from 'get-it/middleware'

const requester = getIt([promise()])
Expand Down
1 change: 1 addition & 0 deletions packages/@sanity/export/src/requestStream.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const {getIt} = require('get-it')
// eslint-disable-next-line import/extensions
const {keepAlive, promise} = require('get-it/middleware')
const debug = require('./debug')

Expand Down
1 change: 1 addition & 0 deletions packages/@sanity/import-cli/src/sanity-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const path = require('path')
const {createClient} = require('@sanity/client')
const sanityImport = require('@sanity/import')
const {getIt} = require('get-it')
// eslint-disable-next-line import/extensions
const {promise} = require('get-it/middleware')
const meow = require('meow')
const ora = require('ora')
Expand Down
1 change: 1 addition & 0 deletions packages/@sanity/import/src/util/getHashedBufferForUri.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const crypto = require('crypto')
const {URL} = require('url')
const {getIt} = require('get-it')
// eslint-disable-next-line import/extensions
const {promise} = require('get-it/middleware')
const getUri = require('get-uri')
const miss = require('mississippi')
Expand Down
1 change: 1 addition & 0 deletions packages/@sanity/import/test/helpers/helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const {createClient, requester: defaultRequester} = require('@sanity/client')
// eslint-disable-next-line import/extensions
const {injectResponse} = require('get-it/middleware')
const noop = require('lodash/noop')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import path from 'node:path'
import {pipeline} from 'node:stream/promises'

import {getIt} from 'get-it'
// eslint-disable-next-line import/extensions
import {keepAlive, promise} from 'get-it/middleware'

import debug from './debug'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {getIt, type MiddlewareResponse} from 'get-it'
// eslint-disable-next-line import/extensions
import {keepAlive, promise} from 'get-it/middleware'

import debug from './debug'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import sanityImport from '@sanity/import'
import {createReadStream} from 'fs'
import fs from 'fs/promises'
import {getIt} from 'get-it'
// eslint-disable-next-line import/extensions
import {promise} from 'get-it/middleware'
import padStart from 'lodash/padStart'
import path from 'path'
Expand Down
1 change: 1 addition & 0 deletions packages/sanity/src/_internal/cli/util/getUrlHeaders.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {getIt} from 'get-it'
// eslint-disable-next-line import/extensions
import {promise} from 'get-it/middleware'

const request = getIt([promise()])
Expand Down

0 comments on commit aca88e9

Please sign in to comment.