Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prettier-plugin-rust

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-rust - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

12

index.d.ts
import * as jinx_rust from 'jinx-rust';
import { Node } from 'jinx-rust';
import * as prettier from 'prettier';
import { Doc, Plugin } from 'prettier';
declare module "prettier/doc.js" {
namespace utils {
function canBreak(doc: Doc): boolean;
}
}
declare const plugin: Plugin<Node>;
declare const languages: prettier.SupportLanguage[] | undefined;

@@ -14,2 +24,2 @@ declare const parsers: {

export { defaultOptions, languages, options, parsers, printers };
export { plugin as default, defaultOptions, languages, options, parsers, printers };

142

package.json
{
"name": "prettier-plugin-rust",
"version": "0.1.8",
"description": "Prettier plugin for Rust",
"repository": {
"type": "git",
"url": "https://github.com/jinxdash/prettier-plugin-rust.git"
},
"author": "jinxdash <jinxdash.github@gmail.com> (https://github.com/jinxdash)",
"keywords": [
"prettier",
"formatter",
"rust"
],
"license": "MIT",
"type": "module",
"main": "index.cjs",
"module": "index.js",
"types": "index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"require": "./index.cjs",
"import": "./index.js"
}
},
"files": [
"index.js",
"index.cjs",
"index.d.ts",
"package.json",
"LICENSE"
],
"scripts": {
"e": "node --loader ts-node/esm/transpile-only --experimental-specifier-resolution=node --no-warnings",
"build": "pnpm run e -- ./scripts/build.ts && pnpm run test-build",
"test-build": "pnpm run e -- ./tests/test.build.ts",
"test-print-samples": "pnpm run e -- ./tests/print.ts",
"dev-repl": "pnpm run e -- ./scripts/dev.repl.ts",
"dev-format-local": "pnpm run e -- ./scripts/dev.format.ts"
},
"devDependencies": {
"@types/node": "^18.0.6",
"@types/prettier": "^2.6.3",
"ts-node": "^10.9.1",
"tsup": "^6.1.3",
"typescript": "^4.7.4"
},
"dependencies": {
"jinx-rust": "0.1.6",
"prettier": "^2.7.1"
},
"prettier": {
"printWidth": 140,
"semi": true,
"tabWidth": 4,
"useTabs": true,
"endOfLine": "lf",
"overrides": [
{
"files": [
"**/*.md"
],
"options": {
"printWidth": 80,
"useTabs": false,
"tabWidth": 2
}
}
]
}
}
"name": "prettier-plugin-rust",
"version": "0.1.9",
"description": "Prettier plugin for Rust",
"repository": {
"type": "git",
"url": "https://github.com/jinxdash/prettier-plugin-rust.git"
},
"author": "jinxdash <jinxdash.github@gmail.com> (https://github.com/jinxdash)",
"keywords": [
"prettier",
"formatter",
"rust"
],
"license": "MIT",
"type": "module",
"main": "index.cjs",
"module": "index.js",
"types": "index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"require": "./index.cjs",
"import": "./index.js"
}
},
"files": [
"index.js",
"index.cjs",
"index.d.ts",
"package.json",
"LICENSE"
],
"devDependencies": {
"@swc/core": "^1.2.248",
"@types/node": "^18.0.6",
"@types/prettier": "^2.7.0",
"ts-node": "^10.9.1",
"tsup": "^6.2.3",
"typescript": "^4.8.2"
},
"dependencies": {
"jinx-rust": "0.1.6",
"prettier": "^2.7.1"
},
"prettier": {
"printWidth": 140,
"semi": true,
"tabWidth": 4,
"useTabs": true,
"endOfLine": "lf",
"overrides": [
{
"files": [
"**/*.md"
],
"options": {
"printWidth": 80,
"useTabs": false,
"tabWidth": 2
}
}
]
},
"scripts": {
"build": "ts-node ./scripts/build.ts && ts-node ./tests/test.build.ts",
"test-build": "ts-node ./tests/test.build.ts",
"test-print-samples": "ts-node ./tests/print.ts",
"dev-repl": "ts-node ./scripts/dev.repl.ts",
"dev-format-local": "ts-node ./scripts/dev.format.ts"
}
}

@@ -200,2 +200,11 @@ <div align="center">

- You can also use the plugin programmatically:
```ts
import prettier from "prettier";
import * as rustPlugin from "prettier-plugin-rust";
prettier.format(code, { plugins: [rustPlugin] });
```
- ### Rust crate

@@ -235,3 +244,3 @@

Jinx-rust has a little *plaidoyer* in its readme arguing for Rust Tooling *not* to use the official rustc parser [here](https://github.com/jinxdash/jinx-rust#why-jinx-rust-and-why-in-typescript).
Jinx-rust has a little _plaidoyer_ in its readme arguing for Rust Tooling _not_ to use the official rustc parser [here](https://github.com/jinxdash/jinx-rust#why-jinx-rust-and-why-in-typescript).

@@ -238,0 +247,0 @@ - ### _When exactly does Prettier Rust change code syntax?_

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc