Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions src/constants/routeconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,58 @@
"packageName": "shiksha-user"
}
]
},
{
"sourceRoute": "/interface/v1/user/users-hierarchy-view",
"type": "POST",
"priority": "MUST_HAVE",
"inSequence": false,
"orchestrated": false,
"targetPackages": [
{
"basePackageName": "user",
"packageName": "shiksha-user"
}
]
},
{
"sourceRoute": "/interface/v1/user-tenant",
"type": "POST",
"priority": "MUST_HAVE",
"inSequence": false,
"orchestrated": false,
"targetPackages": [
{
"basePackageName": "user",
"packageName": "shiksha-user"
}
]
},
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix inconsistent indentation.

Lines 666 and 679 have extra indentation (additional tabs) compared to all other route entries in the file.

Apply this diff to fix the indentation:

-			  {
+	  {
 		"sourceRoute": "/interface/v1/user-tenant/status",
-			  {
+	  {
 		"sourceRoute": "/interface/v1/user-tenant/:id",

Also applies to: 679-679

🤖 Prompt for AI Agents
In src/constants/routeconfig.js around lines 666 and 679, two route entry lines
have extra indentation (additional tabs) that make them inconsistent with the
rest of the file; remove the extra tabs so those lines match the same
indentation level as the surrounding route objects (align with other entries),
ensuring spacing uses the project standard (tabs or spaces) and update both line
666 and line 679 accordingly.

"sourceRoute": "/interface/v1/user-tenant/status",
"type": "PATCH",
"priority": "MUST_HAVE",
"inSequence": false,
"orchestrated": false,
"targetPackages": [
{
"basePackageName": "user",
"packageName": "shiksha-user"
}
]
},
{
"sourceRoute": "/interface/v1/user-tenant/:id",
"type": "GET",
"priority": "MUST_HAVE",
"inSequence": false,
"orchestrated": false,
"targetPackages": [
{
"basePackageName": "user",
"packageName": "shiksha-user"
}
]
}
Comment on lines +639 to 691
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify file validity and resolve parse errors.

Static analysis reports 16 parse errors across the newly added lines. This file has a .js extension but contains raw JSON without JavaScript module exports (module.exports or export). While the existing code follows the same pattern, please verify:

  1. Whether this file should have a .json extension instead
  2. If it needs proper JavaScript module syntax
  3. Whether there's a Biome configuration issue causing false positives

Run the following script to check if this file is properly handled by the application:


🏁 Script executed:

#!/bin/bash
# Check how this route config file is imported/required in the codebase
rg -n --type=js -C3 "require.*routeconfig|import.*routeconfig|routeconfig\.js"

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Check the beginning and end of the routeconfig.js file
echo "=== FILE START (first 20 lines) ==="
head -20 src/constants/routeconfig.js
echo ""
echo "=== FILE END (last 20 lines) ==="
tail -20 src/constants/routeconfig.js

Length of output: 800


🏁 Script executed:

#!/bin/bash
# Search for dynamic file loading patterns that might load this as JSON
rg -n --type=js -C3 "fs\.read|require\.extensions|JSON\.parse|readFileSync|readFile" | head -100

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Check for similar route config or constants files
fd -e js "route|config|constant" src/ | head -20

Length of output: 28


🏁 Script executed:

#!/bin/bash
# Search for how files in src/constants are imported
rg -n --type=js -C2 "src/constants|constants/" | head -50

Length of output: 0



🏁 Script executed:

#!/bin/bash
# Broader search for routeconfig usage without type restriction
rg -n "routeconfig" --max-count=20

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Search for how routes/config might be loaded in app entry points
rg -n --type=js "routes|routeConfig|route.*config" src/index.js src/app.js src/server.js 2>/dev/null | head -30

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Look for all .js files in src/constants to understand usage pattern
ls -la src/constants/

Length of output: 249


🏁 Script executed:

#!/bin/bash
# Search for any module.exports or export in src/constants directory
rg -n "module\.exports|^export" src/constants/

Length of output: 143


🏁 Script executed:

#!/bin/bash
# Check if this file is referenced in package.json or build configs
cat package.json | grep -i route || echo "No route in package.json"

Length of output: 24


🏁 Script executed:

#!/bin/bash
# Look for indentation issues at the problematic lines
sed -n '685,691p' src/constants/routeconfig.js | cat -A

Length of output: 127


🏁 Script executed:

#!/bin/bash
# Check if there's a webpack, rollup, or build config that might handle this specially
find . -maxdepth 2 -name "webpack*.js" -o -name "rollup*.js" -o -name "*.config.js" -o -name ".babelrc*" | head -20

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Check package.json scripts to see if there's any build processing
grep -A 5 '"scripts"' package.json

Length of output: 205


Fix Google JavaScript Style Guide violation and remove unused dead code.

This file violates the Google JavaScript Style Guide: .js files must contain valid JavaScript module syntax (exports/module.exports), not raw JSON. The file is currently pure JSON without any exports, making it an invalid JavaScript module that cannot be loaded by standard module systems.

Additionally, verification confirms the file is unreferenced and unused throughout the codebase—no code imports or requires it. The only other file in src/constants/ is sso.constants.ts, which correctly exports its configuration.

Required changes:

  1. Either rename to .json (if meant to be a static JSON file)
  2. Or add proper JavaScript module exports: module.exports = { "routes": [ ... ] }
  3. Remove if this is truly dead code

Also fix indentation inconsistencies in lines 689–691 (mixed tabs and spaces).

🧰 Tools
🪛 Biome (2.1.2)

[error] 639-639: Expected a statement but instead found ','.

Expected a statement here.

(parse)


[error] 641-641: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 648-648: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 651-651: Expected a statement but instead found ']'.

Expected a statement here.

(parse)


[error] 652-652: Expected a statement but instead found ','.

Expected a statement here.

(parse)


[error] 654-654: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 661-661: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 664-664: Expected a statement but instead found ']'.

Expected a statement here.

(parse)


[error] 665-665: Expected a statement but instead found ','.

Expected a statement here.

(parse)


[error] 667-667: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 674-674: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 677-677: Expected a statement but instead found ']'.

Expected a statement here.

(parse)


[error] 678-678: Expected a statement but instead found ','.

Expected a statement here.

(parse)


[error] 680-680: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 687-687: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 690-690: Expected a statement but instead found ']'.

Expected a statement here.

(parse)

🤖 Prompt for AI Agents
In src/constants/routeconfig.js around lines 639 to 691 the file is pure JSON
(no exports) which violates the JS module requirement and appears unreferenced;
fix by either renaming the file to .json if it should be a static JSON asset, or
convert it into a valid CommonJS module by wrapping the route array in a
top-level export (e.g., module.exports = { routes: [...] }), or remove the file
entirely if it is dead code; also normalize indentation on lines 689–691 to use
spaces consistently (no mixed tabs) after making the chosen change.

]
}