0.0.2 • Published 9 years ago

eslint-stylish-config v0.0.2

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

NPM version build status

ESLint Stylish

Install

Install with npm: npm i --save-dev eslint-stylish-config

Getting started

Use it with:

ESLint CLI

eslint --format node_modules/eslint-stylish-config/stylish.js file.js

grunt-eslint

require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks

grunt.initConfig({
  eslint: {
    options: {
      format: require('eslint-stylish-config')
    },
    target: ['file.js']
  }
});

grunt.registerTask('default', ['eslint']);

Configuration

In this ex edition you can put an optional .stylishconfig-file in the root of your project to modify the output style of the reporter.

{
  "positionFormat": "line-col-space",
  "colors": { 
    "path": "bold",
    "position": "magenta",
    "warning": "yellow",
    "error": "red",
    "description": "dim",
    "rule": "cyan",
    "summary": "gray",
    "noproblem": "green"
  }
}

positionFormat

  • Options: colon, line-col-space, line-col-comma
  • Default: colon

when colon

positionFormat colon

when line-col-space

positionFormat line-col-space

when line-col-comma

positionFormat line-col-comma

colors

For the colors you can set one of the available styling options that chalk supports:

StyleOptions
modifiersreset, bold, dim, italic (not widely supported), underline, inverse, hidden, strikethrough
colorsblack, red, green, yellow, blue, magenta, cyan, white, gray
background colorsbgBlack , bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite

Example

default reporter

default reporter

styled reporter

styled reporter

License

MIT © Svilen Popov