Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Unofficial fork, intended to provide some additional options to help improve consistency with feross/standard
and Flet/semistandard
. This fork is an attempt to pick up where arijs/prettier-miscellaneous
left off.
Provides the additional formatting options in a prettier plugin (or two).
Status: experimental
Major TODO items:
brodybits/prettierx#54
Quick CLI usage:
prettierx <options> <file(s)>
Option | Default value | CLI Override | API Override | Description |
---|---|---|---|---|
Align object properties | false | --align-object-properties | alignObjectProperties: <bool> | Align colons in multiline object literals (not applied with any of the JSON parsers). |
Space before function parentheses | false | --space-before-function-paren | spaceBeforeFunctionParen: <bool> | Put a space before function parenthesis, in all declarations. (Default is to put a space before function parenthesis for anonymous functions only.) |
Space before function parentheses | false | --space-before-function-paren | spaceBeforeFunctionParen: <bool> | Put a space before function parenthesis. |
Spaces around the star (*) in generator functions | false | --generator-star-spacing | generatorStarSpacing: <bool> | Add spaces around the star (*) in generator functions (before and after - from eslint). (Default is after only.) |
Spaces around the star (*) in yield* expressions | false | --yield-star-spacing | yieldStarSpacing: <bool> | Add spaces around the star (*) in yield* expressions (before and after - from eslint). |
Indent chains | true | --no-indent-chains | indentChains: <bool> | Print indents at the start of chained calls. |
Align ternary lines | true | --no-align-ternary-lines | alignTernaryLines: <bool> | Align ternary lines in case of multiline ternary term (default behavior, which is in conflict with ESLint/StandardJS behavior). Should be disabled for consistency with ESLint/StandardJS behavior. |
paren spacing | false | --paren-spacing | parenSpacing: <bool> | Print spaces between parens, WordPress style (not recommended with default `arrowParens: "always" setting). |
break before else | false | --break-before-else | breakBeforeElse: <bool> | Always add a line break before else. |
Formatting of import statements | auto | see ./docs/options.md | see ./docs/options.md | Formatting of import statements, may be oneline to avoid conflict with VSCode "Organize Imports" feature. |
The following options should be used to format the code according to standard js:
--generator-star-spacing
(generatorStarSpacing: true
)--space-before-function-paren
(spaceBeforeFunctionParen: true
)--single-quote
(singleQuote: true
)--jsx-single-quote
(jsxSingleQuote: true
)--no-semi
(semi: false
)--yield-star-spacing
(yieldStarSpacing: true
)--no-align-ternary-lines
(alignTernaryLines: false
)--trailing-comma none
(trailingComma: "none"
)Note that this tool does not follow any of the other standard js rules. It is recommended to use this tool together with eslint, in some form, to archive correct formatting according to standard js.
Any known conflicts with standard js will be tracked in open issues with the conflict-with-standard
tag.
--arrow-parens avoid
(arrowParens: "avoid"
), especially in combination with --paren-spacing
(parenSpacing: true
).foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());
foo(
reallyLongArg(),
omgSoManyParameters(),
IShouldRefactorThis(),
isThereSeriouslyAnotherOne()
);
A couple packages by @aMarCruz (Alberto Martínez):
See CONTRIBUTING.md.
prettierx 0.14.2
compare prettierx-0.14.0...prettierx-0.14.2
NOTE: prettierx release 0.14.1 was inadvertently skipped in package.json.
FAQs
prettierX - a less opinionated fork of the Prettier code formatter
The npm package prettierx receives a total of 22,488 weekly downloads. As such, prettierx popularity was classified as popular.
We found that prettierx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.