0.7.5 • Published 7 years ago

@thebespokepixel/xo-tidy v0.7.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 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

7 years ago

0.7.4

7 years ago

0.7.3

7 years ago

0.7.2

7 years ago

0.7.1

7 years ago

0.7.0

7 years ago

0.7.0-beta.7

7 years ago

0.7.0-beta.6

7 years ago

0.7.0-beta.5

7 years ago

0.7.0-beta.4

8 years ago

0.7.0-beta.3

8 years ago

0.7.0-beta.2

8 years ago

0.7.0-beta.1

8 years ago

0.7.0-beta.0

8 years ago

0.6.0

8 years ago

0.6.0-beta.1

8 years ago

0.6.0-beta.0

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.12

8 years ago

0.4.11

8 years ago

0.4.10

8 years ago

0.4.9

8 years ago

0.4.8

8 years ago

0.4.7

8 years ago

0.4.6

8 years ago

0.4.5

8 years ago

0.4.4

8 years ago

0.4.3

8 years ago

0.4.2

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago