Giter Club home page Giter Club logo

snazzy's Introduction

snazzy travis npm downloads javascript style guide

Format JavaScript Standard Style as Stylish (i.e. snazzy) output

Converts "compact" text from a linter to "stylish" (i.e. snazzy) output.

after

Compared to before:

before

install

npm install -g snazzy

usage

Pipe "compact" text into the snazzy command to get back pretty results:

$ standard --verbose | snazzy

note about version 7.0.0

standard is no longer bundled with snazzy. You must install standard manually alongside snazzy.

Run npm install standard --save-dev to get a copy of standard, then run standard | snazzy where you previously used to run snazzy.

This way requires more steps, but it's better. The user now controls the exact version of standard that is used. And for users who were piping into snazzy all along, this means a quicker install since an extra copy of standard will not get installed.

license

MIT. Copyright (c) Feross Aboukhadijeh.

snazzy's People

Contributors

feross avatar flet avatar greenkeeper[bot] avatar loicmahieu avatar mightyiam avatar rostislav-simonik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

snazzy's Issues

Formatting standard itself

Hey man, just wondering why this is a separate repo and not an update to standard. Seems like this is an improvement that every standard user would benefit from.

Please update to chalk

Hey,

can you please update chalk to 2.* the stripColor function has been removed, which breaks my build because I use chalk somewhere else as well. Thank you.

Incompatible with standard 10

demonstration repo

To reproduce add standard@beta and snazzy to a project. Afterward running standard (standalone or via snazzy) will cause the error Definition for rule 'standard/no-callback-literal' was not found. Uninstalling snazzy or installing standard 9 fixes the issue.

Have Snazzy output the same exit code as Standard

I'm trying to run the linter on a pre-commit script, so I want NPM to halt if there's a lint error. For whatever reason, NPM halts when Standard encounters an error, but not when Snazzy does.

Standard exits with code 1, while Snazzy exits with 255.

Can Snazzy pass thru the same exit code(s) that Standard produces?

snazzy gives incorrect message for "Missing '()' invoking a constructor"

I've been all over the place with this issue, posting on standard, then ESLint, back to standard and now here 😆

If I have the code:

const onionoo = new Onionoo()

to create a new instance of the Onionoo class but leave off the brackets:

const onionoo = new Onionoo

standard and ESLint give the error Missing '()' invoking a constructor but snazzy just returns Missing ':

$ standard
standard: Use JavaScript Standard Style (http://standardjs.com)
standard: Run `standard --fix` to automatically fix some problems.
  /Users/lukechilds/Dev/oss/onionoo-node-client/test/unit.js:14:19: Missing '()' invoking a constructor.

$ snazzy
standard: Use JavaScript Standard Style (http://standardjs.com)
standard: Run `standard --fix` to automatically fix some problems.

/Users/lukechilds/Dev/oss/onionoo-node-client/test/unit.js
  14:19  error  Missing '

✖ 1 problem

TypeError: chalk.stripColor is not a function

Apologies uprfront (I am a newbie). The newest version of snazzy (7.1.0) has caused a breaking change for me. I get the following error TypeError: chalk.stripColor is not a function. I have no troubles if I fall back to 7.0.0

happy state?

Any thoughts on having a good job state for parsing standard output and seeing no linting errors?

Cannot find module 'eslint-plugin-react' with Node 4.2.6 (5.6 works)

Error: Failed to load plugin react: Cannot find module 'eslint-plugin-react'
  at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.module.exports.load (/Users/iradchenko/sandbox/core/node_modules/eslint/lib/config/plugins.js:116:26)
    at Array.forEach (native)
    at Object.module.exports.loadAll (/Users/iradchenko/sandbox/core/node_modules/eslint/lib/config/plugins.js:134:21)
    at processText (/Users/iradchenko/sandbox/core/node_modules/eslint/lib/cli-engine.js:158:17)
    at processFile (/Users/iradchenko/sandbox/core/node_modules/eslint/lib/cli-engine.js:227:18)
    at executeOnFile (/Users/iradchenko/sandbox/core/node_modules/eslint/lib/cli-engine.js:602:23)

Not sure why I'd need to install this, since I'm not using react. Seems like a dep is missing somewhere..

snazzy --stdin doesn't work

snazzy is supposed to support all of standard's options, however--stdin doesn't seem to work. If I echo in "fail" it should return 'fail' is not defined.

$ echo fail | standard --stdin
standard: Use JavaScript Standard Style (http://standardjs.com)
  <text>:1:1: 'fail' is not defined.

$ echo fail | snazzy --stdin
fail

Error running `snazzy`

I receive the following error when trying to run snazzy by itself, it works fine to run it as standard --verbose | snazzy but seems to have trouble spawning the child process.

internal/child_process.js:298
    throw errnoException(err, 'spawn');
          ^
Error: spawn UNKNOWN
    at exports._errnoException (util.js:814:11)
    at ChildProcess.spawn (internal/child_process.js:298:11)
    at Object.exports.spawn (child_process.js:333:9)
    at Object.<anonymous> (C:\Program Files\iojs\node_modules\snazzy\bin\cmd.js:27:21)
    at Module._compile (module.js:430:26)
    at Object.Module._extensions..js (module.js:448:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:471:10)
    at startup (node.js:117:18)

Add warning support to Snazzy to allow Standard 17

Do you know which package is in charge of building this json?

{
  line: '2',
  column: '17',
  message: 'Expected property shorthand.',
  ruleId: 'object-shorthand) (warning'
}

If this is not being created by Snazzy (as it appears to my eyes, I'm not a JavaScript developer), I think that there could be an issue somewhere else upstream that should be fixed before adding warning support to Snazzy

Originally posted by @tagliala in standard/eslint-config-standard#229 (comment)

Changelog Missing

What version of this package are you using?
The latest stable version.

What problem do you want to solve?
Not having to waste time digging in the commit history to see what changed.

What do you think is the correct solution to this problem?
Implementing the changelog with the help of a tool such as standard-version or conventional-changelog-writer

Are you willing to submit a pull request to implement this change?
Unfortunately not.

Issue with solarized-dark

This is probably more of an issue with solarized than snazzy, but with solarized-dark, the line numbers and other important information are the same colour as the background, so text needs to be highlighted to see what the information actually is.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.