@@ -28,6 +28,13 @@ npm install eslint-plugin-vue-fsd --save-dev
2828
2929## Usage
3030
31+ We provide two predefined configurations to help enforce FSD principles in your Vue.js projects.
32+
33+ - recommended - enables the rules that recommended best practices for FSD and Vue.js development.
34+ - all - enables all of the rules shipped with eslint-plugin-vue-fsd.
35+
36+ Eslint v9+ configuration (Recommended):
37+
3138``` javascript
3239import vueFsdPlugin from ' eslint-plugin-vue-fsd'
3340
@@ -37,12 +44,44 @@ module.exports = {
3744}
3845```
3946
47+ Legacy Eslint v8 configuration:
48+
49+ ``` javascript
50+ import vueFsdPlugin from ' eslint-plugin-vue-fsd'
51+
52+ // .eslintrc.js
53+ module .exports = {
54+ extends: [' plugin:vue-fsd/legacy/recommended' ],
55+ }
56+ ```
57+
4058## Rules
4159
60+ The plugin provides the rules to enforce [ Feature-Sliced Design] ( https://feature-sliced.design/ ) principles in [ Vue.js] ( https://vuejs.org/ ) projects.
61+
4262| Rule | Description |
4363| -------------------------------------------------------- | ---------------------------------------------- |
4464| [ no-processes-layer] ( ./docs/rules/no-processes-layer.md ) | Ensure deprecated processes layer is not used. |
4565
66+ ## Roadmap
67+
68+ As the plugin evolves, we plan to implement the following rules:
69+
70+ - no-higher-level-imports: Forbid imports from higher layers.
71+ - no-cross-slice-imports: Forbid cross-imports between slices on the same layer.
72+ - no-layer-public-api: Forbid exposing public APIs from a layer.
73+ - no-segments-without-slices: Forbid segments without slices.
74+ - public-api: Enforce consistent public API on slices.
75+ - no-ui-in-app: Forbid using UI segment in the app layer.
76+ - no-direct-imports: Forbid direct imports from outside the slice.
77+ - enforce-slice-relative-path: Imports within one slice should be relative.
78+ - slice-naming: Enforce consistent naming conventions for slices.
79+ - composables-naming: Enforce consistent naming conventions for composables.
80+ - components-naming: Enforce consistent naming conventions for components.
81+ - sfc-sections-order: Enforce consistent order of top-level sections in single-file components.
82+
83+ We are always open to suggestions and contributions for new rules and improvements.
84+
4685## Contribution
4786
4887Pull requests and issues are welcome! Please follow the code style and add tests for new rules.
0 commit comments