Registry / web-framework / prettier-plugin-jsp

prettier-plugin-jsp

JSON →
library1.0.13jsnpmunverified

A Prettier plugin for formatting Java Server Pages (JSP) files. Current stable version: 1.0.13. Released occasionally with bug fixes. Supports .jsp and .tag files. Integrates with Prettier's plugin system and can be used via CLI or VSCode. Alternative to manual JSP formatting.

npm install prettier-plugin-jsp
INSTALL
IMPORT
SIG · PRETTIER-PLUGIN-JS
P
prettier-plugin-jsp
web-frameworkjavascriptv1.0.13
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
module.exports = { plugins: ['prettier-plugin-jsp'] }
import prettierPluginJsp from 'prettier-plugin-jsp'
Plugin is loaded via Prettier config, not directly imported as a module.
plugins array
"plugins": ["prettier-plugin-jsp"]
"plugins": ["@prettier/plugin-jsp"]
The plugin name in the plugins array must exactly match the package name.
CLI usage
npx prettier --write --plugin=prettier-plugin-jsp *.jsp
npx prettier --write *.jsp --plugin prettier-plugin-jsp
The --plugin flag must be positioned before file arguments.

Installs the plugin, configures Prettier to use it, and formats a JSP file via CLI.

// Install Prettier and the plugin npm install --save-dev prettier prettier-plugin-jsp // Create .prettierrc cat > .prettierrc <<EOF { "plugins": ["prettier-plugin-jsp"] } EOF // Format a JSP file npx prettier --write index.jsp
Debug
Known issues
gotchaPlugin requires Prettier version ^2.7.1; incompatible with Prettier v3.
fix
Use Prettier v2.x or wait for plugin update for v3.
affects: >=1.0.0
gotchaFile associations must be set in VSCode for .tag files to be recognized as JSP.
fix
Add '"*.tag": "jsp"' to files.associations in settings.json.
affects: >=1.0.0
deprecatedPrettier v2 is in maintenance mode; upgrade to v3 when plugin supports it.
fix
Monitor plugin releases for v3 compatibility.
affects: >=1.0.0
gotchaPlugin may not correctly parse complex JSP expressions (e.g., nested tags or scriptlets).
fix
Manually review formatted output for any parsing errors.
affects: >=1.0.0
gotchaFormatting might break on large JSP files due to Prettier's single-threaded nature.
fix
Use incremental formatting or split files if issues occur.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'prettier-plugin-jsp'
The plugin is not installed or Prettier cannot resolve it.
fix
Run 'npm install --save-dev prettier-plugin-jsp' and ensure node_modules includes it.
Error: Couldn't resolve plugin "prettier-plugin-jsp" (No plugins loaded)
Plugin name is incorrect or missing in Prettier config.
fix
In .prettierrc, set '"plugins": ["prettier-plugin-jsp"]' exactly.
The JSP file is not being formatted even after installing the plugin
File association is missing in VSCode or CLI not targeting the correct file type.
fix
Add '*.jsp' to files.associations in VSCode; for CLI, explicitly pass the file.
Upgrade
Version history
1.0.13latest on npm
Audit
Dependencies
prettieroptionalpeer dependency required for plugin to work
Agent activity
2 hits · last 30 days
node
2
Resources
prettier-plugin-jsp — npm install prettier-plugin-jsp · libregistry