From 40c9d8c86e45adc65a79b2a692c641f264b84499 Mon Sep 17 00:00:00 2001 From: Igor Kowalski Date: Fri, 30 Aug 2024 16:25:42 +0200 Subject: [PATCH] 2.2.12 --- README.md | 2 +- documentation/migration-to-2.2.0.md | 4 ++-- .../project-structure-folder-structure.md | 8 ++++---- .../project-structure-independent-modules.md | 6 +++--- .../project-structure-naming-rules.md | 10 +++++----- namingRules.mjs | 2 +- package.json | 4 ++-- yarn.lock | 18 +++++++++--------- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index c946db3..70d234a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ## 📋 General information -🕹ī¸[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground) 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!
Leave a ⭐ and share the link with your friends.
diff --git a/documentation/migration-to-2.2.0.md b/documentation/migration-to-2.2.0.md index 9d2bed9..ae57b37 100644 --- a/documentation/migration-to-2.2.0.md +++ b/documentation/migration-to-2.2.0.md @@ -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) 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. @@ -173,7 +173,7 @@ The added regex is `((([A-Z]|\d)+_)*([A-Z]|\d)+)`. ## New rules -🕹ī¸[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground) for eslint-plugin-project-structure rules. +🕹ī¸[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme) for eslint-plugin-project-structure rules.

project-structure-independent-modules

A key principle of a healthy project is to prevent the creation of a massive dependency tree, diff --git a/documentation/project-structure-folder-structure.md b/documentation/project-structure-folder-structure.md index 874e12c..f5a42d9 100644 --- a/documentation/project-structure-folder-structure.md +++ b/documentation/project-structure-folder-structure.md @@ -17,7 +17,7 @@ ## 📋 General information -🕹ī¸[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground) 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!
Leave a ⭐ and share the link with your friends.
@@ -65,7 +65,7 @@ npm i --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) 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 @@ -139,7 +139,7 @@ Create a `folderStructure.mjs` in the root of your project.
> 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) 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: @@ -492,7 +492,7 @@ The structure of your project and its rules. > Make sure your `tsconfig`/`eslint.config.mjs` and the script to run ESLint, contains all the `files`/`folders` you want to validate. Otherwise `eslint` will not take them into account. > [!TIP] -> I recommend creating reusable [rules](#rules) for each folder and using the [ruleId](#ruleid) in the [structure](#structure) for better readability. See the [example](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground/blob/main/folderStructure.mjs). +> I recommend creating reusable [rules](#rules) for each folder and using the [ruleId](#ruleid) in the [structure](#structure) for better readability. See the [example](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground#readme/blob/main/folderStructure.mjs). ``` . diff --git a/documentation/project-structure-independent-modules.md b/documentation/project-structure-independent-modules.md index e57bf78..93f2a27 100644 --- a/documentation/project-structure-independent-modules.md +++ b/documentation/project-structure-independent-modules.md @@ -15,7 +15,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) 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!
Leave a ⭐ and share the link with your friends.
@@ -64,7 +64,7 @@ npm i --dev eslint-plugin-independent-modules 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) 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 @@ -107,7 +107,7 @@ Create a `independentModules.mjs` in the root of your project.
> 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) 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: diff --git a/documentation/project-structure-naming-rules.md b/documentation/project-structure-naming-rules.md index 9a593ce..9ef3b9e 100644 --- a/documentation/project-structure-naming-rules.md +++ b/documentation/project-structure-naming-rules.md @@ -17,7 +17,7 @@ ## 📋 General information -🕹ī¸[Playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground) 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!
Leave a ⭐ and share the link with your friends.
@@ -58,7 +58,7 @@ npm i --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) 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 @@ -96,12 +96,12 @@ export default tseslint.config({ Create a `namingRules.mjs` in the root of your project.
-> [!NOTE] -> `namingRules.json` and `namingRules.yaml` are also supported. See an example in the [playground](https://github.com/Igorkowalski94/eslint-plugin-project-structure-playground) for eslint-plugin-project-structure rules. - > [!WARNING] > 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. + ```mjs // @ts-check diff --git a/namingRules.mjs b/namingRules.mjs index a7d8c29..0767e38 100644 --- a/namingRules.mjs +++ b/namingRules.mjs @@ -35,7 +35,7 @@ export const namingRulesConfig = createNamingRules([ }, { - filePattern: ["**/src/rules/*/*.ts"], + filePattern: ["src/rules/*/*.ts"], fileRootRules: { allowOnlySpecifiedSelectors: true, rules: [ diff --git a/package.json b/package.json index 1b89e85..da95ae9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Igor Kowalski (Igorkowalski94)", "name": "eslint-plugin-project-structure", - "version": "2.2.11", + "version": "2.2.12", "license": "MIT", "description": "ESLint plugin with rules to help you achieve a scalable, consistent, and well-structured project. Create your own framework! Define your folder structure, advanced naming conventions, file composition, and create independent modules. Take your project to the next level and save time by automating the review of key principles of a healthy project!", "keywords": [ @@ -75,7 +75,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-project-structure": "2.2.10", + "eslint-plugin-project-structure": "2.2.11", "husky": "^9.1.5", "jest": "^29.7.0", "prettier": "^3.3.3", diff --git a/yarn.lock b/yarn.lock index 3b9ca94..37a5f22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1514,7 +1514,7 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.3.0, @typescript-eslint/utils@npm:^8.1.0, @typescript-eslint/utils@npm:^8.3.0": +"@typescript-eslint/utils@npm:8.3.0, @typescript-eslint/utils@npm:^8.3.0": version: 8.3.0 resolution: "@typescript-eslint/utils@npm:8.3.0" dependencies: @@ -2817,16 +2817,16 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-project-structure@npm:2.2.10": - version: 2.2.10 - resolution: "eslint-plugin-project-structure@npm:2.2.10" +"eslint-plugin-project-structure@npm:2.2.11": + version: 2.2.11 + resolution: "eslint-plugin-project-structure@npm:2.2.11" dependencies: - "@typescript-eslint/utils": ^8.1.0 + "@typescript-eslint/utils": ^8.3.0 comment-json: ^4.2.5 js-yaml: ^4.1.0 jsonschema: ^1.4.1 - micromatch: ^4.0.7 - checksum: 60537396ab0f9d9f8cd067f97b7e4a54ae2c815ab0c9638973c516b099ccf5236c552df9955ca2f6192e48d237d8f3a5f8f419f8b4d8b53a1815913fa409ed83 + micromatch: ^4.0.8 + checksum: b6e7709973649ab61a8d2820f3caf43233e3538e0f82bb96cd564503e165ac47deb1437a1ef10a61757b38e94723a8ecc3db70249b280ef464d1fde5064997b5 languageName: node linkType: hard @@ -2847,7 +2847,7 @@ __metadata: eslint-config-prettier: ^9.1.0 eslint-plugin-import: ^2.29.1 eslint-plugin-prettier: ^5.2.1 - eslint-plugin-project-structure: 2.2.10 + eslint-plugin-project-structure: 2.2.11 husky: ^9.1.5 jest: ^29.7.0 js-yaml: ^4.1.0 @@ -4668,7 +4668,7 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:^4.0.7, micromatch@npm:^4.0.8": +"micromatch@npm:^4.0.8": version: 4.0.8 resolution: "micromatch@npm:4.0.8" dependencies: