0.7.5 • Published 9 years ago

@thebespokepixel/xo-tidy v0.7.5

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

@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/

0.7.5

9 years ago

0.7.4

9 years ago

0.7.3

9 years ago

0.7.2

9 years ago

0.7.1

9 years ago

0.7.0

9 years ago

0.7.0-beta.7

9 years ago

0.7.0-beta.6

9 years ago

0.7.0-beta.5

9 years ago

0.7.0-beta.4

9 years ago

0.7.0-beta.3

9 years ago

0.7.0-beta.2

9 years ago

0.7.0-beta.1

9 years ago

0.7.0-beta.0

9 years ago

0.6.0

9 years ago

0.6.0-beta.1

9 years ago

0.6.0-beta.0

9 years ago

0.5.2

9 years ago

0.5.1

9 years ago

0.5.0

9 years ago

0.4.12

9 years ago

0.4.11

9 years ago

0.4.10

9 years ago

0.4.9

9 years ago

0.4.8

9 years ago

0.4.7

9 years ago

0.4.6

10 years ago

0.4.5

10 years ago

0.4.4

10 years ago

0.4.3

10 years ago

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago