feat: enable prefer-node-protocol

This commit is contained in:
Anthony Fu 2023-03-04 15:23:51 +01:00
parent 6c0f76e229
commit 447d326997
3 changed files with 5 additions and 3 deletions

View File

@ -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'

View File

@ -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',

View File

@ -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'