Registry / devops / ory-prettier-styles

ory-prettier-styles

JSON →
library1.3.0jsnpmunverified

Shareable Prettier configuration used across all ORY projects, currently at v1.3.0 (2023). It enforces consistent code formatting via a single config reference or with custom overrides. Compared to creating your own Prettier config from scratch, this package provides a battle-tested set of defaults used by ORY's extensive open-source ecosystem, including specific rules for JSON, Markdown, and YAML. The package also includes a GitHub Action for automated format checking in CI/CD pipelines. Release cadence is ad-hoc; minor versions have introduced breaking changes to formatting defaults (e.g., restoring standard width for Markdown, switching to double quotes).

npm install ory-prettier-styles
INSTALL
IMPORT
SIG · ORY-PRETTIER-STYLE
O
ory-prettier-styles
devopsjavascriptv1.3.0
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.

package.json config
"prettier": "ory-prettier-styles"
No known common mistake.
Add this field to your package.json to use the unmodified ORY styles.
require in .prettierrc.js
module.exports = { ...require('ory-prettier-styles'), // overrides }
module.exports = require('ory-prettier-styles')
When using CommonJS, don't forget to spread the config if you want to add overrides. The config is an object, not a function.
GitHub Action
uses: ory/prettier-styles@v1
uses: ory/prettier-styles@v1.3.0
Use the major version tag @v1 to get compatible updates. Pinning to a minor version may miss security fixes.

Sets up Prettier with ORY's styles either via package.json string or with a custom .prettierrc.js.

// In package.json: { "prettier": "ory-prettier-styles" } // Or in .prettierrc.js: module.exports = { ...require('ory-prettier-styles'), // singleQuote: true }
Debug
Known issues
breakingv1.3.0 changed Markdown formatting width from a custom value back to Prettier's default (80).
fix
If you relied on the previous custom width, add 'printWidth: 80' or set a different value in your overrides.
affects: >=1.3.0
breakingv1.3.0 uses default quote style (double quotes) instead of single quotes.
fix
If you prefer single quotes, override 'singleQuote: true' in your .prettierrc.js.
affects: >=1.3.0
gotchaThe GitHub Action @v1 tag points to the latest v1.x release, which may contain breaking changes in formatting defaults.
fix
Consider pinning to a specific version (e.g., @v1.2.0) to avoid unexpected formatting changes.
affects: >=1.0.0
gotchaIf you use the package.json 'prettier' key, you cannot override individual rules without switching to a configuration file.
fix
Use .prettierrc.js or similar to extend and override.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'ory-prettier-styles'
Package not installed or module resolution fails.
fix
Run 'npm install ory-prettier-styles --save-dev' or 'yarn add ory-prettier-styles -D'.
Invalid configuration file: The exported value is not a function or object.
Using module.exports = ory-prettier-styles instead of spreading.
fix
Use module.exports = { ...require('ory-prettier-styles'), /* overrides */ }.
Upgrade
Version history
1.3.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
ory-prettier-styles — npm install ory-prettier-styles · libregistry