Skip to content

Commit

Permalink
2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Kowalski committed Jul 24, 2024
1 parent 57d9e05 commit c7e2423
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion documentation/project-structure-export-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const Importantvariable4 = "";

### **`"filePattern"`**: `<string | string[]>` <a id="file-pattern"></a>

Here you define which files should meet the rules. You can use all **[micromatch.isMatch](https://github.com/micromatch/micromatch?tab=readme-ov-file#ismatch)** functionalities.
Here you define which files should meet the rules. You can use all **[micromatch.every](https://github.com/micromatch/micromatch?tab=readme-ov-file#every)** functionalities.

```jsonc
{
Expand Down
4 changes: 2 additions & 2 deletions documentation/project-structure-independent-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ The name of your module.

Your module's pattern.<br>

You can use all **[micromatch.isMatch](https://github.com/micromatch/micromatch?tab=readme-ov-file#ismatch)** functionalities.
You can use all **[micromatch.every](https://github.com/micromatch/micromatch?tab=readme-ov-file#every)** functionalities.

```jsonc
{
Expand All @@ -364,7 +364,7 @@ You can use all **[micromatch.isMatch](https://github.com/micromatch/micromatch?

The place where you specify what can be imported into your module.<br>

You can use all **[micromatch.isMatch](https://github.com/micromatch/micromatch?tab=readme-ov-file#ismatch)** functionalities.<br>
You can use all **[micromatch.every](https://github.com/micromatch/micromatch?tab=readme-ov-file#every)** functionalities.<br>

If at least **one** pattern in **`allowImportsFrom`** meets the condition, the import is considered allowed.<br>

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "Igor Kowalski (Igorkowalski94)",
"name": "eslint-plugin-project-structure",
"version": "2.0.2",
"version": "2.0.3",
"license": "MIT",
"description": "Eslint plugin with rules that will help you achieve a project structure that is scalable, consistent, and well thought out.",
"keywords": [
Expand Down Expand Up @@ -70,7 +70,7 @@
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-independent-modules": "^0.0.26",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-project-structure": "2.0.0",
"eslint-plugin-project-structure": "2.0.2",
"husky": "^9.0.11",
"jest": "^29.7.0",
"prettier": "^3.3.2",
Expand Down
2 changes: 1 addition & 1 deletion src/rules/exportRules/helpers/validateExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const validateExport = ({
const filenamePath = getFilenamePathWithoutRoot({ filename, settings });

const rule = options.find(({ filePattern }) =>
micromatch.isMatch(filenamePath, filePattern),
micromatch.every(filenamePath, filePattern),
);

if (!rule) return;
Expand Down
2 changes: 1 addition & 1 deletion src/rules/independentModules/helpers/checkImportPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const checkImportPath = ({

if (isExternal) {
const isValidExternalImportPattern = allowImportsFromExtracted.some(
(p) => micromatch.isMatch(importPath, p),
(p) => micromatch.every(importPath, p),
);

if (isValidExternalImportPattern || allowExternalImports !== false)
Expand Down
2 changes: 1 addition & 1 deletion src/rules/independentModules/helpers/findModuleConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export const findModuleConfig = (
fileName: string,
modules: IndependentModulesConfig["modules"],
): Module | undefined =>
modules.find(({ pattern }) => micromatch.isMatch(fileName, pattern));
modules.find(({ pattern }) => micromatch.every(fileName, pattern));
2 changes: 1 addition & 1 deletion src/rules/independentModules/helpers/validateImportPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ export const validateImportPath = ({
filename,
});

return micromatch.isMatch(importPath, newPattern);
return micromatch.every(importPath, newPattern);
});
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2599,14 +2599,14 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-project-structure@npm:2.0.0":
version: 2.0.0
resolution: "eslint-plugin-project-structure@npm:2.0.0"
"eslint-plugin-project-structure@npm:2.0.2":
version: 2.0.2
resolution: "eslint-plugin-project-structure@npm:2.0.2"
dependencies:
"@typescript-eslint/utils": ^7.13.0
js-yaml: ^4.1.0
micromatch: ^4.0.7
checksum: 79d9cd63e215fc8b64bbd81a8d2a3ebe347577f630a8892e5b0977a055d242ffca303a36ad7da39d6d0da6042ffc37fe328840d20ec13adec8f61783b18bcdf8
checksum: 9d9ad8214decfb6381bde6b9272800a9ccc2940ed451c8d20cf83389201918f6946b7ebbd176d7c255e1ed474513f9f7c7726ee79ffcf8a1f59f7e411ac0927a
languageName: node
linkType: hard

Expand All @@ -2629,7 +2629,7 @@ __metadata:
eslint-plugin-import: ^2.29.1
eslint-plugin-independent-modules: ^0.0.26
eslint-plugin-prettier: ^5.1.3
eslint-plugin-project-structure: 2.0.0
eslint-plugin-project-structure: 2.0.2
husky: ^9.0.11
jest: ^29.7.0
js-yaml: ^4.1.0
Expand Down

0 comments on commit c7e2423

Please sign in to comment.