chore: reverse target/from in eslint rule (#3280)

This commit is contained in:
Daniel Roe 2022-02-17 12:01:24 +00:00 committed by GitHub
parent 467ab693b9
commit 65d16a58c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 25 deletions

View File

@ -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", {
"import/no-restricted-paths": [
"error",
{
"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."
},
{
"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."
},
{
"target": "packages/nitro",
"from": "packages/!(nitro)/**/*",
"from": "packages/nitro",
"target": "packages/!(nitro)/**/*",
"message": "nitro should not directly import other packages."
}
]
}],
"@typescript-eslint/no-unused-vars": ["error", {
}
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}]
}
]
},
"settings": {
"jsdoc": {

View File

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