0.1.7 • Published 11 months ago

prettier-plugin-tact v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

prettier-plugin-tact

A prettier plugin for automatically formatting your tact code.

Installation

Install both prettier and prettier-plugin-tact:

npm install --save-dev prettier prettier-plugin-tact
// or by pnpm
pnpm add -D prettier prettier-plugin-tact

Activate the plugin

Create or modify your prettier configuration file to activate the plugin:

{
  "plugins": ["prettier-plugin-tact"]
}

Usage

If you installed prettier as a local dependency, you can add prettier as a script in your package.json,

{
  "scripts": {
    "prettier": "prettier"
  }
}

Run prettier for your contracts files by command or you can add this to you script if you prefer:

npm run prettier -- path/to/file.tact --write
# or
pnpm prettier path/to/file.tact --write

Prettier only works with valid code. If there is a syntax error, nothing will be done and a parser error will be thrown.

Notice

Before tree-sitter-tact be publishing to npm registry, you should install tree-sitter-tact from GitHub repo by:

npm install -D https://github.com/tact-lang/tree-sitter-tact

License

Distributed under the MIT license. See LICENSE for more information.

0.1.7

11 months ago

0.1.6

12 months ago

0.1.5

12 months ago

0.1.4

12 months ago

0.1.3

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago