All Projects β†’ JamieMason β†’ eslint-formatter-git-log

JamieMason / eslint-formatter-git-log

Licence: MIT license
ESLint Formatter featuring Git Author, Date, and Hash

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to eslint-formatter-git-log

html-eslint
ESLint plugin for linting HTML
Stars: ✭ 72 (+100%)
Mutual labels:  lint, formatter
li18nt
🌎 Lint your i18n translation files. Detect conflicting properties, duplicates and make it more readable and easier to maintain by formatting it!
Stars: ✭ 29 (-19.44%)
Mutual labels:  lint, formatter
dockerfile-language-service
Dockerfile language service for providing an API to create feature-rich Dockerfile editors in JavaScript.
Stars: ✭ 15 (-58.33%)
Mutual labels:  lint, formatter
prettier-check
Check that all files match prettier code style.
Stars: ✭ 54 (+50%)
Mutual labels:  lint, formatter
dockerfile-utils
A library and command line interface for formatting and linting Dockerfiles.
Stars: ✭ 17 (-52.78%)
Mutual labels:  lint, formatter
Pettier
Prettier config that randomizes options and arbitrarily switches between spaces and tabs πŸ™„
Stars: ✭ 149 (+313.89%)
Mutual labels:  lint, formatter
Snazzy
Format JavaScript Standard Style as Stylish (i.e. snazzy) output
Stars: ✭ 381 (+958.33%)
Mutual labels:  lint, formatter
rspec-tap-formatters
TAP Producer for RSpec-3
Stars: ✭ 20 (-44.44%)
Mutual labels:  formatter, reporter
git-mit
Minimalist set of hooks to aid pairing and link commits to issues
Stars: ✭ 44 (+22.22%)
Mutual labels:  lint
vayder
Easy and concise validations for Express routes
Stars: ✭ 26 (-27.78%)
Mutual labels:  validate
cashaddress
Python tool for convert bitcoin cash legacy addresses
Stars: ✭ 40 (+11.11%)
Mutual labels:  validate
react-formulation
Simple React form validation
Stars: ✭ 14 (-61.11%)
Mutual labels:  validate
eslint-rules
My custom eslint rules in addition to the ones provided at http://eslint.org/
Stars: ✭ 94 (+161.11%)
Mutual labels:  lint
mllint
`mllint` is a command-line utility to evaluate the technical quality of Python Machine Learning (ML) projects by means of static analysis of the project's repository.
Stars: ✭ 67 (+86.11%)
Mutual labels:  lint
standard-action
Github Action to lint with `standard` and friends
Stars: ✭ 15 (-58.33%)
Mutual labels:  lint
vscode-liquid
πŸ’§Liquid language support for VS Code
Stars: ✭ 137 (+280.56%)
Mutual labels:  formatter
eslint-plugin-roku
ESLint plugin to parse and lint BrightScript files
Stars: ✭ 44 (+22.22%)
Mutual labels:  lint
VSLilyPond
VSCode Extension for LilyPond
Stars: ✭ 59 (+63.89%)
Mutual labels:  formatter
react-validate-framework
A lightweight and extensible React validation component
Stars: ✭ 18 (-50%)
Mutual labels:  validate
custom-tslint-formatters
Custom formatters for TSLint
Stars: ✭ 14 (-61.11%)
Mutual labels:  formatter

eslint-formatter-git-log

ESLint Formatter featuring Git Author, Date, and Hash

NPM version NPM downloads Build Status Maintainability

Table of Contents

🌩 Installation

npm install --save-dev eslint eslint-formatter-git-log

πŸ•Ή Usage

To use the default configuration, set ESLint's --format option to git-log as follows:

eslint --format git-log './src/**/*.js'

πŸ‘€ Examples

Full Report

By default, a report of every Error or Warning in the Codebase is displayed:

screenshot

Personalised Reports

When an emailRegExp is provided such as /[email protected]/, a report is shown that relates only to changes you yourself have made.

  1. Create a file in your project which follows the structure below.

    const gitLogFormatter = require('eslint-formatter-git-log');
    
    module.exports = gitLogFormatter.withConfig({
      emailRegExp: /[email protected]/,
    });
  2. Set ESLint's --format option to your customised version instead of git-log:

    eslint --format ./path/to/your/custom-formatter.js './src/**/*.js'

screenshot

Contributor Reports

To extend personalised reports to your Team, the Git Committer Email is needed.

gitLogFormatter.getUserEmail()

An optional helper is available at gitLogFormatter.getUserEmail() which reads git config user.email and feeds it through git check-mailmap.

const gitLogFormatter = require('eslint-formatter-git-log');

module.exports = gitLogFormatter.withConfig({
  emailRegExp: new RegExp(gitLogFormatter.getUserEmail()),
});

$GIT_COMMITTER_EMAIL

Alternatively, if your Team each have their $GIT_COMMITTER_EMAIL Environment Variable exported and reachable, then the following is enough.

const gitLogFormatter = require('eslint-formatter-git-log');

module.exports = gitLogFormatter.withConfig({
  emailRegExp: new RegExp(process.env.GIT_COMMITTER_EMAIL),
});

References

βš–οΈ Configuration

This example lists every available option with its corresponding default value. You don't need to provide a value for every configuration item, just the ones you want to change.

const chalk = require('chalk');
const gitLogFormatter = require('eslint-formatter-git-log');

module.exports = gitLogFormatter.withConfig({
  // If set, only show result when Author Email matches this pattern
  emailRegExp: undefined,
  // Whitespace to insert between items when formatting
  gutter: '  ',
  // Translations for plain text used when formatting
  label: {
    error: 'error',
    warning: 'warning'
  },
  // Increase if you have files with 1000s of lines
  locationColumnWidth: 8,
  // Which methods of https://github.com/chalk/chalk to use when formatting
  style: {
    // eg. "error"
    error: chalk.red,
    // eg. "/Users/guybrush/Dev/grogrates/src/index.js"
    filePath: chalk.underline,
    // eg. "warning"
    warning: chalk.yellow,
    // eg. "161:12"
    location: chalk.dim,
    // eg. "no-process-exit"
    rule: chalk.dim,
    // eg. "bda304e570"
    commit: chalk.magenta,
    // eg. "(1 year, 2 months ago)"
    date: chalk.greenBright,
    // eg. "<[email protected]>"
    email: chalk.blueBright,
  },
});

πŸ™‹πŸ½β€β™‚οΈ Getting Help

Get help with issues by creating a Bug Report or discuss ideas by opening a Feature Request.

πŸ‘€ Other Projects

If you find my Open Source projects useful, please share them ❀️

πŸ€“ Author

I'm Jamie Mason from Leeds in England, I began Web Design and Development in 1999 and have been Contracting and offering Consultancy as Fold Left Ltd since 2012. Who I've worked with includes Sky Sports, Sky Bet, Sky Poker, The Premier League, William Hill, Shell, Betfair, and Football Clubs including Leeds United, Spurs, West Ham, Arsenal, and more.

Follow JamieMason on GitHub      Follow fold_left on Twitter

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].