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