Skip to content

Commit

Permalink
chore(deps): replace dependency eslint-plugin-node with eslint-plugin…
Browse files Browse the repository at this point in the history
…-n ^14.0.0 (#378)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: 三咲智子 Kevin Deng <[email protected]>
  • Loading branch information
renovate[bot] and sxzz authored Mar 25, 2024
1 parent 2050ad3 commit 997f9bb
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 32 deletions.
36 changes: 18 additions & 18 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = defineConfig({
root: true,
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:n/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
'plugin:regexp/recommended',
Expand All @@ -21,7 +21,6 @@ module.exports = defineConfig({
eqeqeq: ['warn', 'always', { null: 'never' }],
'no-debugger': ['error'],
'no-empty': ['warn', { allowEmptyCatch: true }],
'no-process-exit': 'off',
'no-useless-escape': 'off',
'prefer-const': [
'warn',
Expand All @@ -30,37 +29,38 @@ module.exports = defineConfig({
},
],

'node/no-missing-import': [
'n/no-process-exit': 'off',
'n/no-missing-import': [
'error',
{
allowModules: ['types', 'estree', 'less', 'sass', 'stylus'],
tryExtensions: ['.ts', '.js', '.jsx', '.tsx', '.d.ts'],
},
],
'node/no-missing-require': [
'n/no-missing-require': [
'error',
{
// for try-catching yarn pnp
allowModules: ['pnpapi', 'vite'],
tryExtensions: ['.ts', '.js', '.jsx', '.tsx', '.d.ts'],
},
],
'node/no-extraneous-import': [
'n/no-extraneous-import': [
'error',
{
allowModules: ['vite', 'less', 'sass', 'vitest'],
},
],
'node/no-extraneous-require': [
'n/no-extraneous-require': [
'error',
{
allowModules: ['vite'],
},
],
'node/no-deprecated-api': 'off',
'node/no-unpublished-import': 'off',
'node/no-unpublished-require': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'n/no-deprecated-api': 'off',
'n/no-unpublished-import': 'off',
'n/no-unpublished-require': 'off',
'n/no-unsupported-features/es-syntax': 'off',

'@typescript-eslint/ban-ts-comment': 'off', // TODO: we should turn this on in a new PR
'@typescript-eslint/ban-types': 'off', // TODO: we should turn this on in a new PR
Expand Down Expand Up @@ -119,32 +119,32 @@ module.exports = defineConfig({
{
files: ['*.spec.ts'],
rules: {
'node/no-extraneous-import': 'off',
'n/no-extraneous-import': 'off',
},
},
{
files: ['**/build.config.ts'],
rules: {
'no-undef': 'off',
'node/no-missing-import': 'off',
'n/no-missing-import': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
},
},
{
files: ['playground/**'],
rules: {
'node/no-extraneous-import': 'off',
'node/no-extraneous-require': 'off',
'node/no-missing-import': 'off',
'node/no-missing-require': 'off',
'n/no-extraneous-import': 'off',
'n/no-extraneous-require': 'off',
'n/no-missing-import': 'off',
'n/no-missing-require': 'off',
// engine field doesn't exist in playgrounds
'node/no-unsupported-features/es-builtins': [
'n/no-unsupported-features/es-builtins': [
'error',
{
version: '^18.0.0 || >=20.0.0',
},
],
'node/no-unsupported-features/node-builtins': [
'n/no-unsupported-features/node-builtins': [
'error',
{
version: '^18.0.0 || >=20.0.0',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"eslint": "^8.57.0",
"eslint-define-config": "^2.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-n": "^14.0.0",
"eslint-plugin-regexp": "^2.3.0",
"execa": "^8.0.1",
"fast-glob": "^3.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-vue-jsx/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import jsx from '@vue/babel-plugin-jsx'
import { createFilter, normalizePath } from 'vite'
import type { ComponentOptions } from 'vue'
import type { Plugin } from 'vite'
// eslint-disable-next-line node/no-extraneous-import
// eslint-disable-next-line n/no-extraneous-import
import type { CallExpression, Identifier } from '@babel/types'
import type { Options } from './types'

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-vue/src/handleHotUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { SFCBlock, SFCDescriptor } from 'vue/compiler-sfc'
import type { HmrContext, ModuleNode } from 'vite'
import { isCSSRequest } from 'vite'

// eslint-disable-next-line node/no-extraneous-import
// eslint-disable-next-line n/no-extraneous-import
import type * as t from '@babel/types'

import {
Expand Down
38 changes: 27 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 997f9bb

Please sign in to comment.