@thebespokepixel/xo-tidy

post-babel xo formatting.

No longer maintained.
Last updated 3 years ago by thebespokepixel .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @thebespokepixel/xo-tidy -g
SYNC missed versions from official npm registry.

@thebespokepixel/xo-tidy

Automatic xo code formatter, geared toward post babel output.

Status

Status npm Travis David
Code-climate Coverage Snyk

Developer

David-developer Rollup

Help

Inch Gitter

Tidy (or lint) Babel/CoffeeScript output or just plain JavaScript to (something approaching) xo style. Mainly concerned with white space, indentation and ASI preferences.

Works as a CLI tool (piping stdin → stdout) and a vinyl stream formatter for gulp/through2. The CLI verbose modes can be very handy in spotting things that could be done better.

Usage

Installation

npm install --global @thebespokepixel/xo-tidy # For CLI use

npm i -D @thebespokepixel/xo-tidy # For programmatic use
// ES5
var xoTidy = require('@thebespokepixel/xo-tidy');

// or in Babel/ES2015+
import xoTidy from 'xoTidy'

Methods

formatText (string/buffer, options)

Simply give it source code as text, and it'll return formatted output, unless lint: true, which will return linting information.

formatStdio (options)

Reads stdio directly and passes the output to stdout.

formatBuffer (options)

Useful for gulp tasks, or any other vinyl streams.

gulp.src(src)
  .pipe(xoTidy.formatStream(options_))
  .pipe(gulp.dest(dest))
Options object:
{
  xopath:    '.',
  lint:      false,
  esnext:    false,
  semicolon: true,
  space:     false,
  rules:     {}
}

Documentation

Full documentation can be found at https://markgriffiths.github.io/xo-tidy/

Current Tags

  • 0.7.0-beta.7                                ...           beta (4 years ago)
  • 0.7.5                                ...           latest (3 years ago)

40 Versions

  • 0.7.5 [deprecated]           ...           3 years ago
  • 0.7.4 [deprecated]           ...           3 years ago
  • 0.7.3 [deprecated]           ...           4 years ago
  • 0.7.2 [deprecated]           ...           4 years ago
  • 0.7.1 [deprecated]           ...           4 years ago
  • 0.7.0 [deprecated]           ...           4 years ago
  • 0.7.0-beta.7                                ...           4 years ago
  • 0.7.0-beta.6                                ...           4 years ago
  • 0.7.0-beta.5                                ...           4 years ago
  • 0.7.0-beta.4                                ...           4 years ago
  • 0.7.0-beta.3                                ...           4 years ago
  • 0.7.0-beta.2                                ...           4 years ago
  • 0.7.0-beta.1                                ...           4 years ago
  • 0.7.0-beta.0                                ...           4 years ago
  • 0.6.0 [deprecated]           ...           4 years ago
  • 0.6.0-beta.1                                ...           4 years ago
  • 0.6.0-beta.0                                ...           4 years ago
  • 0.5.2 [deprecated]           ...           4 years ago
  • 0.5.1 [deprecated]           ...           4 years ago
  • 0.5.0 [deprecated]           ...           4 years ago
  • 0.4.12 [deprecated]           ...           4 years ago
  • 0.4.11 [deprecated]           ...           4 years ago
  • 0.4.10 [deprecated]           ...           4 years ago
  • 0.4.9 [deprecated]           ...           4 years ago
  • 0.4.8 [deprecated]           ...           4 years ago
  • 0.4.7 [deprecated]           ...           4 years ago
  • 0.4.6 [deprecated]           ...           4 years ago
  • 0.4.5 [deprecated]           ...           4 years ago
  • 0.4.4 [deprecated]           ...           4 years ago
  • 0.4.3 [deprecated]           ...           4 years ago
  • 0.4.2 [deprecated]           ...           4 years ago
  • 0.4.1 [deprecated]           ...           4 years ago
  • 0.4.0 [deprecated]           ...           4 years ago
  • 0.3.1 [deprecated]           ...           4 years ago
  • 0.3.0 [deprecated]           ...           4 years ago
  • 0.2.2 [deprecated]           ...           4 years ago
  • 0.2.1 [deprecated]           ...           4 years ago
  • 0.2.0 [deprecated]           ...           4 years ago
  • 0.1.0 [deprecated]           ...           4 years ago
  • 0.0.1 [deprecated]           ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (26)
Dev Dependencies (10)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |