Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Igorkowalski94 committed Sep 2, 2024
1 parent 86a829f commit 2330445
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 24 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<h1 align="center">📁🦉eslint-plugin-project-structure</h1>
<h1 align="center"><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/File%20Folder.png" alt="Folder" width="60" height="60" /><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Owl.png" alt="Owl" width="60" height="60" /></br>eslint-plugin-project-structure</h1>

<p align="center">ESLint plugin with rules to help you achieve a scalable, consistent, and well-structured project.</p>
<p align="center">Create your own framework! Define your folder structure, advanced naming conventions, file composition, and create independent modules.</p>
<p align="center">Take your project to the next level and save time by automating the review of key principles of a healthy project!</p>
Expand All @@ -12,7 +13,7 @@

## 📋 General information

🕹️[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
🎮[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.

Become part of the community!<br>
Leave a ⭐ and share the link with your friends.<br>
Expand All @@ -28,7 +29,7 @@ If you have any questions or need help creating a configuration that meets your
<h2 align="center"><a href="https://github.com/Igorkowalski94/eslint-plugin-project-structure/blob/main/documentation/project-structure-folder-structure.md#project-structurefolder-structure">project-structure/folder-structure</a></h2>
<p align="center">Enforce rules on folder structure to keep your project consistent, orderly and well thought out.</p>

#### 🚀 Features:
<h4><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Rocket.png" alt="Folder" width="25" height="25" /> Features:</h4>

- Validation of folder structure. Any files/folders outside the structure will be considered an error.
- File/Folder name regex validation with features like wildcard `*` and treating `.` as a character, along with other conveniences.
Expand All @@ -47,7 +48,7 @@ If you have any questions or need help creating a configuration that meets your
where removing or editing one feature triggers a chain reaction that impacts the entire project.</p>
<p align="center">Create independent modules to keep your project scalable and easy to maintain. Get rid of dependencies between modules and create truly independent functionalities.</p>

#### 🚀 Features:
<h4><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Rocket.png" alt="Folder" width="25" height="25" /> Features:</h4>

- Creating independent modules in which you control what can be imported (e.g. types, functions, components of one functionality cannot be imported into another functionality).
- The ability to create very detailed rules, even for nested folder structures. Whether it's a large module, a sub-module, or a single file, there are no limitations.
Expand All @@ -62,7 +63,7 @@ where removing or editing one feature triggers a chain reaction that impacts the
<p align="center">Enforce advanced naming rules and prohibit the use of given selectors in a given file.</p>
<p align="center">Have full control over what your file can contain and the naming conventions it must follow.</p>

#### 🚀 Features:
<h4><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Rocket.png" alt="Folder" width="25" height="25" /> Features:</h4>

- Naming validation.
- Supported selectors: `class`, `variable`, `function`, `arrowFunction`, `type`, `interface`, `enum`.
Expand Down
8 changes: 4 additions & 4 deletions documentation/migration-to-2.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A minor configuration fix will be required for version <= 1.4.7.
- A shorter notation option for [structure](https://github.com/Igorkowalski94/eslint-plugin-project-structure/blob/main/documentation/project-structure-folder-structure.md#structure).
- New build-in {SNAKE_CASE} regexParameter.
- Improvements for {PascalCase} and {camelCase} regexParameters.
- The entire documentation has been rewritten for ESLint's new config system. Examples with the old ESLint configuration can be found in the 🕹️[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
- The entire documentation has been rewritten for ESLint's new config system. Examples with the old ESLint configuration can be found in the 🎮[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
- New option for creating a configuration file in an .mjs file with TypeScript support.
- [Enforcing the existence](https://github.com/Igorkowalski94/eslint-plugin-project-structure/blob/main/documentation/project-structure-folder-structure.md#enforce-existence) of a files/folders when a specific file/folder exists. For example, if `src/Component.tsx` exists, then `src/Component.test.tsx` and `src/stories/Component.stories.tsx` must also exist.
- You can now use comments in folderStructure.json, independentModules.json and namingRules.json files.
Expand Down Expand Up @@ -173,14 +173,14 @@ The added regex is `((([A-Z]|\d)+_)*([A-Z]|\d)+)`.

## New rules

🕹️[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
🎮[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.

<h2 align="center"><a href="https://github.com/Igorkowalski94/eslint-plugin-project-structure/blob/main/documentation/project-structure-independent-modules.md#project-structureindependent-modules"> project-structure/independent-modules</a></h2>
<p align="center">A key principle of a healthy project is to prevent the creation of a massive dependency tree,
where removing or editing one feature triggers a chain reaction that impacts the entire project.</p>
<p align="center">Create independent modules to keep your project scalable and easy to maintain. Get rid of dependencies between modules and create truly independent functionalities.</p>

#### 🚀 Features:
<h4><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Rocket.png" alt="Folder" width="25" height="25" /> Features:</h4>

- Creating independent modules in which you control what can be imported (e.g. types, functions, components of one functionality cannot be imported into another functionality).
- Disabling external imports (node_modules) for a given module (Option to add exceptions).
Expand All @@ -194,7 +194,7 @@ where removing or editing one feature triggers a chain reaction that impacts the
<p align="center">Enforce advanced naming rules and prohibit the use of given selectors in a given file.</p>
<p align="center">Have full control over what your file can contain and the naming conventions it must follow.</p>

#### 🚀 Features:
<h4><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Rocket.png" alt="Folder" width="25" height="25" /> Features:</h4>

- Naming validation.
- Supported selectors: `class`, `variable`, `function`, `arrowFunction`, `type`, `interface`, `enum`.
Expand Down
10 changes: 5 additions & 5 deletions documentation/project-structure-folder-structure.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">📁🦉project-structure/folder-structure</h1>
<h1 align="center"><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/File%20Folder.png" alt="Folder" width="60" height="60" /><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Owl.png" alt="Owl" width="60" height="60" /></br>project-structure/folder-structure</h1>
<p align="center">Enforce rules on folder structure to keep your project consistent, orderly and well thought out.</p>

#### 🚀 Features:
<h4><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Rocket.png" alt="Folder" width="25" height="25" /> Features:</h4>

- Validation of folder structure. Any files/folders outside the structure will be considered an error.
- File/Folder name regex validation with features like wildcard `*` and treating `.` as a character, along with other conveniences.
Expand All @@ -17,7 +17,7 @@

## 📋 General information

🕹️[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
🎮[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.

Become part of the community!<br>
Leave a ⭐ and share the link with your friends.<br>
Expand Down Expand Up @@ -70,7 +70,7 @@ pnpm add --save-dev eslint-plugin-project-structure
Add the following lines to `eslint.config.mjs`.

> [!NOTE]
> The examples in the documentation refer to ESLint's new config system. If you're interested in examples for the old ESLint config, you can find them in the 🕹️[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
> The examples in the documentation refer to ESLint's new config system. If you're interested in examples for the old ESLint config, you can find them in the 🎮[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
```mjs
// @ts-check
Expand Down Expand Up @@ -148,7 +148,7 @@ Create a `folderStructure.mjs` in the root of your project.<br>
> Remember to include `// @ts-check`, otherwise type checking won't be enabled.
> [!NOTE]
> `folderStructure.json` and `folderStructure.yaml` are also supported. See an example in the 🕹️[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
> `folderStructure.json` and `folderStructure.yaml` are also supported. See an example in the 🎮[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
#### Simple example for the structure below:

Expand Down
10 changes: 5 additions & 5 deletions documentation/project-structure-independent-modules.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<h1 align="center">📁🦉project-structure/independent-modules</h1>
<h1 align="center"><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/File%20Folder.png" alt="Folder" width="60" height="60" /><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Owl.png" alt="Owl" width="60" height="60" /></br>project-structure/independent-modules</h1>
<p align="center">A key principle of a healthy project is to prevent the creation of a massive dependency tree,
where removing or editing one feature triggers a chain reaction that impacts the entire project.</p>
<p align="center">Create independent modules to keep your project scalable and easy to maintain. Get rid of dependencies between modules and create truly independent functionalities.</p>

#### 🚀 Features:
<h4><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Rocket.png" alt="Folder" width="25" height="25" /> Features:</h4>

- Creating independent modules in which you control what can be imported (e.g. types, functions, components of one functionality cannot be imported into another functionality).
- The ability to create very detailed rules, even for nested folder structures. Whether it's a large module, a sub-module, or a single file, there are no limitations.
Expand All @@ -16,7 +16,7 @@ where removing or editing one feature triggers a chain reaction that impacts the

## 📋 General information

🕹️[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
🎮[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.

Become part of the community!<br>
Leave a ⭐ and share the link with your friends.<br>
Expand Down Expand Up @@ -70,7 +70,7 @@ pnpm add --save-dev eslint-plugin-project-structure
Add the following lines to `eslint.config.mjs`.

> [!NOTE]
> The examples in the documentation refer to ESLint's new config system. If you're interested in examples for the old ESLint config, you can find them in the 🕹️[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
> The examples in the documentation refer to ESLint's new config system. If you're interested in examples for the old ESLint config, you can find them in the 🎮[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
```mjs
// @ts-check
Expand Down Expand Up @@ -114,7 +114,7 @@ Create a `independentModules.mjs` in the root of your project.<br>
> Remember to include `// @ts-check`, otherwise type checking won't be enabled.
> [!NOTE]
> `independentModules.json` and `independentModules.yaml` are also supported. See an example in the 🕹️[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
> `independentModules.json` and `independentModules.yaml` are also supported. See an example in the 🎮[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
#### Simple example for the folder structure below:

Expand Down
10 changes: 5 additions & 5 deletions documentation/project-structure-naming-rules.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h1 align="center">📁🦉project-structure/naming-rules</h1>
<h1 align="center"><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/File%20Folder.png" alt="Folder" width="60" height="60" /><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Owl.png" alt="Owl" width="60" height="60" /></br>project-structure/naming-rules</h1>
<p align="center">Enforce advanced naming rules and prohibit the use of given selectors in a given file.</p>
<p align="center">Have full control over what your file can contain and the naming conventions it must follow.</p>

#### 🚀 Features:
<h4><img src="https://raw.githubusercontent.com/Igorkowalski94/eslint-plugin-project-structure/main/images/Rocket.png" alt="Folder" width="25" height="25" /> Features:</h4>

- Naming validation.
- Supported selectors: `class`, `variable`, `function`, `arrowFunction`, `type`, `interface`, `enum`.
Expand All @@ -17,7 +17,7 @@

## 📋 General information

🕹️[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
🎮[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.

Become part of the community!<br>
Leave a ⭐ and share the link with your friends.<br>
Expand Down Expand Up @@ -65,7 +65,7 @@ pnpm add --save-dev eslint-plugin-project-structure
Add the following lines to `eslint.config.mjs`.

> [!NOTE]
> The examples in the documentation refer to ESLint's new config system. If you're interested in examples for the old ESLint config, you can find them in the 🕹️[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
> The examples in the documentation refer to ESLint's new config system. If you're interested in examples for the old ESLint config, you can find them in the 🎮[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
```mjs
// @ts-check
Expand Down Expand Up @@ -109,7 +109,7 @@ Create a `namingRules.mjs` in the root of your project.<br>
> Remember to include `// @ts-check`, otherwise type checking won't be enabled.
> [!NOTE]
> `namingRules.json` and `namingRules.yaml` are also supported. See an example in the 🕹️[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
> `namingRules.json` and `namingRules.yaml` are also supported. See an example in the 🎮[playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.
#### Example:

Expand Down
Binary file removed images/Books.png
Binary file not shown.
Binary file removed images/Chains.png
Binary file not shown.
Binary file removed images/Chequered Flag.png
Binary file not shown.
Binary file removed images/Clipboard.png
Binary file not shown.
Binary file removed images/Floppy Disk.png
Binary file not shown.
Binary file removed images/Flying Saucer.png
Binary file not shown.
Binary file removed images/Gear.png
Binary file not shown.
Binary file removed images/Information.png
Binary file not shown.
Binary file removed images/Keycap Digit One.png
Binary file not shown.
Binary file removed images/Keycap Digit Two.png
Binary file not shown.
Binary file removed images/Locomotive.png
Binary file not shown.
Binary file removed images/Notebook with Decorative Cover.png
Binary file not shown.
Binary file removed images/Notebook.png
Binary file not shown.
Binary file removed images/Small Airplane.png
Binary file not shown.

0 comments on commit 2330445

Please sign in to comment.