Socket
Socket
Sign inDemoInstall

eslint-plugin-nuxt-middleware

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-plugin-nuxt-middleware

Checks for the presence of Nuxt.js middleware.


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Install size
9.00 kB
Created
Weekly downloads
 

Readme

Source

eslint-plugin-nuxt-middleware

Install

npm install -D eslint-plugin-nuxt-middleware
yarn add -D eslint-plugin-nuxt-middleware

Usage


module.exports = {
  plugins: ['nuxt-middleware'],
  rules: {
    'nuxt-middleware/no-unresolved-middleware': 'error',
  },
}

Rules

Rule IDDescription
nuxt/no-unresolved-middlewareChecks for the presence of Nuxt.js middleware.

Rule Details

nuxt/no-unresolved-middleware

This rule outputs an error if a file that does not exist in the middleware directory is specified.

Examples of incorrect code for this rule:

middleware
  └─ middleware-sample.js
// pages/home.vue
<script lang="ts">
export default defineComponent({
  middleware: 'sample', // sample is not found.
});
</script>

Examples of correct code for this rule:

middleware
  └─ middleware-sample.js
// pages/home.vue
<script lang="ts">
export default defineComponent({
  middleware: 'middleware-sample',
});
</script>

Options

srcDir: Define the source directory of your Nuxt application.

{
  "plugins": ["nuxt"],
  "rules": {
    "nuxt/no-unresolved-middleware": [
      "error",
      {
        "srcDir": "src"
      }
    ]
  }
}

Keywords

FAQs

Last updated on 10 Jan 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc