Skip to content

Commit

Permalink
feat: enable prefer-node-protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 4, 2023
1 parent 6c0f76e commit 447d326
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fixtures/vitesse/vite.config.ts
@@ -1,4 +1,4 @@
import path from 'path'
import path from 'node:path'
import { defineConfig } from 'vite'
import Vue from '@vitejs/plugin-vue'
import Pages from 'vite-plugin-pages'
Expand Down
2 changes: 2 additions & 0 deletions packages/basic/index.js
Expand Up @@ -337,6 +337,8 @@ module.exports = {
'unicorn/prefer-type-error': 'error',
// Use new when throwing error
'unicorn/throw-new-error': 'error',
// Prefer using the node: protocol
'unicorn/prefer-node-protocol': 'error',

'no-use-before-define': ['error', { functions: false, classes: false, variables: true }],
'eslint-comments/disable-enable-pair': 'off',
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript/index.js
@@ -1,5 +1,5 @@
const fs = require('fs')
const { join } = require('path')
const fs = require('node:fs')
const { join } = require('node:path')
const basic = require('@antfu/eslint-config-basic')

const tsconfig = process.env.ESLINT_TSCONFIG || 'tsconfig.eslint.json'
Expand Down

0 comments on commit 447d326

Please sign in to comment.