Skip to content

Commit

Permalink
3.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Igorkowalski94 committed Dec 15, 2024
1 parent ef79b15 commit 923a98d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
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": "3.12.0",
"version": "3.13.0",
"license": "MIT",
"description": "Powerful ESLint plugin with rules to help you achieve a scalable, consistent, and well-structured project. Create your own framework! Define your folder structure, file composition, advanced naming conventions, 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! react folder structure react file structure react project structure react conventions architecture react next.js angular node solid vue svelte",
"keywords": [
Expand Down Expand Up @@ -74,7 +74,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-project-structure": "3.10.11",
"eslint-plugin-project-structure": "3.12.0",
"husky": "^9.1.7",
"jest": "^29.7.0",
"prettier": "^3.4.2",
Expand Down
11 changes: 9 additions & 2 deletions src/rules/folderStructure/helpers/handleProgram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ export const handleProgram = ({
cwd,
});

const cacheFileLocation = settings["project-structure/cache-location"] as
| string
| undefined;
const projectRoot = getProjectRoot({
cwd,
projectRootConfig: config.projectRoot,
});
const structureRoot = path.resolve(projectRoot, config.structureRoot ?? ".");
const cacheLocationOrProjectRoot = cacheFileLocation ?? projectRoot;

if (
!filename.includes(structureRoot) ||
Expand All @@ -51,13 +55,16 @@ export const handleProgram = ({
projectRoot,
config,
});
cleanUpErrorFromCache({ projectRoot, filename });
cleanUpErrorFromCache({
projectRoot: cacheLocationOrProjectRoot,
filename,
});
} catch (error) {
if (!finalErrorGuard(error)) throw error;

if (
isErrorInCache({
projectRoot,
projectRoot: cacheLocationOrProjectRoot,
errorCache: {
filename,
errorMessage: error.message,
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2777,16 +2777,16 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-project-structure@npm:3.10.11":
version: 3.10.11
resolution: "eslint-plugin-project-structure@npm:3.10.11"
"eslint-plugin-project-structure@npm:3.12.0":
version: 3.12.0
resolution: "eslint-plugin-project-structure@npm:3.12.0"
dependencies:
"@typescript-eslint/utils": ^8.17.0
comment-json: ^4.2.5
js-yaml: ^4.1.0
jsonschema: ^1.4.1
micromatch: ^4.0.8
checksum: 4c36b533fe76faf6e7ddac436ecebea82d60e6b5dcd73b59abff6baa4c266ac5c8b0177ed0bc14c25820ac2a8f45f3a76a94b6f79c38fb3db7c1647594e78d63
checksum: cbd341bcee535107bc4007be32efc24489dc7bcc3f615603be40986086bcfe2e894f5ea239e833c1af4602f5562986e834b0626b2d2617895ce6ed75f3d4f891
languageName: node
linkType: hard

Expand All @@ -2807,7 +2807,7 @@ __metadata:
eslint-config-prettier: ^9.1.0
eslint-plugin-import: ^2.31.0
eslint-plugin-prettier: ^5.2.1
eslint-plugin-project-structure: 3.10.11
eslint-plugin-project-structure: 3.12.0
husky: ^9.1.7
jest: ^29.7.0
js-yaml: ^4.1.0
Expand Down

0 comments on commit 923a98d

Please sign in to comment.