mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-10 22:50:46 +02:00
[web] Add prefer-node-protocol ESLint rule (#21523)
* Add `unicorn/prefer-node-protocol` * Revert non-web changes * Run `npm run lint:fix` (prefer-node-protocol) GitOrigin-RevId: c3cdd88ff9e6b3de6a4397d45935c4d026c1c1ed
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import crypto from 'crypto'
|
||||
import fs from 'fs'
|
||||
import Path from 'path'
|
||||
import crypto from 'node:crypto'
|
||||
import fs from 'node:fs'
|
||||
import Path from 'node:path'
|
||||
import cheerio from 'cheerio'
|
||||
// checkSanitizeOptions is only used in dev env
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import prettier from 'prettier'
|
||||
import sanitizeHtml from 'sanitize-html'
|
||||
import { sanitizeOptions } from '../../../modules/learn/app/src/sanitizeOptions.js'
|
||||
import { fileURLToPath } from 'url'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = Path.dirname(fileURLToPath(import.meta.url))
|
||||
const EXTRACT_STYLE = process.env.EXTRACT_STYLES === 'true'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import checkSanitizeOptions from './checkSanitizeOptions.mjs'
|
||||
import Scrape from './scrape.mjs'
|
||||
import { fileURLToPath } from 'url'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const { getAllPagesAndCache, scrapeAndCachePage } = Scrape
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import Path from 'path'
|
||||
import fs from 'fs'
|
||||
import Path from 'node:path'
|
||||
import fs from 'node:fs'
|
||||
import {
|
||||
fetchString,
|
||||
fetchJson,
|
||||
RequestFailedError,
|
||||
} from '@overleaf/fetch-utils'
|
||||
import crypto from 'crypto'
|
||||
import { fileURLToPath } from 'url'
|
||||
import crypto from 'node:crypto'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __dirname = Path.dirname(fileURLToPath(import.meta.url))
|
||||
const CACHE_IN = Path.join(
|
||||
|
||||
Reference in New Issue
Block a user