mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
chore: reverse target/from in eslint rule (#3280)
This commit is contained in:
parent
467ab693b9
commit
65d16a58c0
58
.eslintrc
58
.eslintrc
@ -3,7 +3,9 @@
|
||||
"NodeJS": true,
|
||||
"$fetch": true
|
||||
},
|
||||
"plugins": ["jsdoc"],
|
||||
"plugins": [
|
||||
"jsdoc"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:jsdoc/recommended",
|
||||
"@nuxtjs/eslint-config-typescript",
|
||||
@ -17,30 +19,36 @@
|
||||
"jsdoc/require-param": "off",
|
||||
"jsdoc/require-returns": "off",
|
||||
"jsdoc/require-param-type": "off",
|
||||
"import/no-restricted-paths": ["error", {
|
||||
"zones": [
|
||||
{
|
||||
"target": "packages/nuxt3/src/!(core)/**/*",
|
||||
"from": "packages/nuxt3/src/core",
|
||||
"message": "core should not directly import from modules."
|
||||
},
|
||||
{
|
||||
"target": "packages/nuxt3/src/!(app)/**/*",
|
||||
"from": "packages/nuxt3/src/app",
|
||||
"message": "app should not directly import from modules."
|
||||
},
|
||||
{
|
||||
"target": "packages/nitro",
|
||||
"from": "packages/!(nitro)/**/*",
|
||||
"message": "nitro should not directly import other packages."
|
||||
}
|
||||
]
|
||||
}],
|
||||
"@typescript-eslint/no-unused-vars": ["error", {
|
||||
"argsIgnorePattern": "^_",
|
||||
"varsIgnorePattern": "^_",
|
||||
"ignoreRestSiblings": true
|
||||
}]
|
||||
"import/no-restricted-paths": [
|
||||
"error",
|
||||
{
|
||||
"zones": [
|
||||
{
|
||||
"from": "packages/nuxt3/src/!(core)/**/*",
|
||||
"target": "packages/nuxt3/src/core",
|
||||
"message": "core should not directly import from modules."
|
||||
},
|
||||
{
|
||||
"from": "packages/nuxt3/src/!(app)/**/*",
|
||||
"target": "packages/nuxt3/src/app",
|
||||
"message": "app should not directly import from modules."
|
||||
},
|
||||
{
|
||||
"from": "packages/nitro",
|
||||
"target": "packages/!(nitro)/**/*",
|
||||
"message": "nitro should not directly import other packages."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"argsIgnorePattern": "^_",
|
||||
"varsIgnorePattern": "^_",
|
||||
"ignoreRestSiblings": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"jsdoc": {
|
||||
|
@ -2,10 +2,13 @@ import { resolve } from 'pathe'
|
||||
import { createHooks } from 'hookable'
|
||||
import type { Nuxt, NuxtOptions, NuxtConfig, ModuleContainer, NuxtHooks } from '@nuxt/schema'
|
||||
import { loadNuxtConfig, LoadNuxtOptions, nuxtCtx, installModule, addComponent, addVitePlugin, addWebpackPlugin } from '@nuxt/kit'
|
||||
// Temporary until finding better placement
|
||||
/* eslint-disable import/no-restricted-paths */
|
||||
import pagesModule from '../pages/module'
|
||||
import metaModule from '../meta/module'
|
||||
import componentsModule from '../components/module'
|
||||
import autoImportsModule from '../auto-imports/module'
|
||||
/* eslint-enable */
|
||||
import { distDir, pkgDir } from '../dirs'
|
||||
import { version } from '../../package.json'
|
||||
import { ImportProtectionPlugin, vueAppPatterns } from './plugins/import-protection'
|
||||
|
Loading…
Reference in New Issue
Block a user