npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

eslint-plugin-vue-fsd

v1.9.0

Published

ESLint plugin for checking and maintaining architecture boundaries in Vue FSD applications.

Downloads

51

Readme

eslint-plugin-vue-fsd

Build Status Codacy Grade Codacy Coverage Issues NPM downloads semantic-release: conventional

A custom ESLint plugin for enforcing FSD patterns in Vue projects.

[!NOTE] The project is in active development and may have breaking changes in minor versions, but we will strive to keep changes minimal and well-documented.

FSD Pattern

Features

  • FSD Architecture Enforcement: Validates Feature-Sliced Design patterns in Vue.js projects with comprehensive rule coverage.
  • Layer Structure Validation: Enforces proper layer hierarchy and prevents usage of deprecated layers.
  • Import Control: Prevents higher-level imports and cross-slice imports to maintain architectural boundaries.
  • Vue.js Integration: Provides specialized rules for Vue Single File Components, including section ordering.
  • Flexible Configuration: Includes predefined configurations (recommended/all) with customizable options for different project setups.
  • High Quality Assurance: Maintains 100% test coverage across all rules and utilities for reliability.
  • Performance Optimized: Efficient rule execution with minimal impact on linting performance.

Installation

npm install eslint-plugin-vue-fsd --save-dev

Usage

We provide two predefined configurations to help enforce FSD principles in your Vue.js projects:

  • recommended - enables the rules that follow best practices for FSD and Vue.js development.
  • all - enables all of the rules shipped with eslint-plugin-vue-fsd.

ESLint v9+ Configuration (Recommended)

import vueFsdPlugin from 'eslint-plugin-vue-fsd'

export default [...vueFsdPlugin.configs.recommended]

Legacy ESLint v8 Configuration

// .eslintrc.js
module.exports = {
  extends: ['plugin:vue-fsd/legacy/recommended'],
}

Quick Start

  1. Install the plugin: npm install eslint-plugin-vue-fsd --save-dev
  2. Add the recommended configuration to your ESLint config
  3. Run: npx eslint src/

The plugin will now enforce FSD patterns in your Vue.js project!

Rules

The plugin provides the rules to enforce Feature-Sliced Design principles in Vue.js projects.

| Rule | Description | | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | fsd-layers | Enforce consistent layer structure in feature-sliced design. | | no-processes-layer | Ensure deprecated processes layer is not used. | | public-api | Enforce consistent public API structure in FSD slices. | | sfc-sections-order | Enforce consistent order of top-level sections in single-file components. | | no-ui-in-app | Forbid placing ui segment directly inside the app layer. | | no-layer-public-api | Forbid placing a layer-level public API file (e.g. index.ts) at the root of a layer. | | no-higher-level-imports | Forbid importing from higher FSD layers. | | no-cross-slice-imports | Forbid cross-imports between slices on the same layer. |

Roadmap

As the plugin evolves, we plan to implement the following rules:

  • no-segments-without-slices: Forbid segments without slices.
  • no-direct-imports: Forbid direct imports from outside the slice.
  • slice-relative-path: Imports within one slice should be relative.
  • slice-naming: Enforce consistent naming conventions for slices.
  • composables-naming: Enforce consistent naming conventions for composables.
  • components-naming: Enforce consistent naming conventions for components.
  • no-orphaned-files: Forbid orphaned files that are not part of any slice.

We are always open to suggestions and contributions for new rules and improvements.

Contribution

Pull requests and issues are welcome! Please follow the code style and add tests for new rules.

Development Setup

  1. Clone the repository
  2. Install dependencies: npm install
  3. Run tests: npm test
  4. Run linting: npm run lint

Adding New Rules

  1. Create the rule file in src/rules/
  2. Add comprehensive tests in test/rules/
  3. Create documentation in docs/rules/
  4. Update the README and configurations
  5. Ensure 100% test coverage

License

MIT, see LICENSE for details.