All Projects → unstubbable → custom-tslint-formatters

unstubbable / custom-tslint-formatters

Licence: other
Custom formatters for TSLint

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to custom-tslint-formatters

jsonfmt
Like gofmt, but for JSON files.
Stars: ✭ 70 (+400%)
Mutual labels:  formatter
AdvancedHTMLParser
Fast Indexed python HTML parser which builds a DOM node tree, providing common getElementsBy* functions for scraping, testing, modification, and formatting. Also XPath.
Stars: ✭ 90 (+542.86%)
Mutual labels:  formatter
vscode-liquid
💧Liquid language support for VS Code
Stars: ✭ 137 (+878.57%)
Mutual labels:  formatter
vscode-formatting-toggle
A VS Code extension that allows you to toggle the formatter (Prettier, Beautify, …) ON and OFF with a simple click.
Stars: ✭ 52 (+271.43%)
Mutual labels:  formatter
json.pizza
Online JSON formatter and prettifier
Stars: ✭ 72 (+414.29%)
Mutual labels:  formatter
gradle-scalafmt
Gradle plugin for scalafmt
Stars: ✭ 25 (+78.57%)
Mutual labels:  formatter
go-qmk-keymap
This is a utility that can format your keymap array of layers as well as generating ascii-art diagrams of those layouts.
Stars: ✭ 20 (+42.86%)
Mutual labels:  formatter
Golite
Add essential language support for the Go language to Sublime Text 3.
Stars: ✭ 14 (+0%)
Mutual labels:  formatter
cms-fe-angular8
A Content Management System with Angular8, UI use Ant-Design(ng-zorro-antd)
Stars: ✭ 65 (+364.29%)
Mutual labels:  tslint
table2ascii
Python library for converting lists to fancy ASCII tables for displaying in the terminal and on Discord
Stars: ✭ 31 (+121.43%)
Mutual labels:  formatter
laravel-formatters
«‎Formatter» pattern for Laravel
Stars: ✭ 86 (+514.29%)
Mutual labels:  formatter
rspec-tap-formatters
TAP Producer for RSpec-3
Stars: ✭ 20 (+42.86%)
Mutual labels:  formatter
codeclimate-tslint
Code Climate TSLint-Engine
Stars: ✭ 39 (+178.57%)
Mutual labels:  tslint
stylus-supremacy
A Node.js script that helps formatting Stylus files.
Stars: ✭ 86 (+514.29%)
Mutual labels:  formatter
alda
A boilerplate for React isomorphic aplication with Material Design
Stars: ✭ 16 (+14.29%)
Mutual labels:  tslint
plugin-pug
Prettier Pug Plugin
Stars: ✭ 163 (+1064.29%)
Mutual labels:  formatter
go-dump
Go-Dump is a Golang package which helps you to dump a struct.
Stars: ✭ 32 (+128.57%)
Mutual labels:  formatter
ex format
ExFormat formats Elixir source code according to a standard set of rules
Stars: ✭ 39 (+178.57%)
Mutual labels:  formatter
tslint-defocus
A tslint rule to nag you when you forget that you have focused some Jasmine tests with 'fdescribe' or 'fit'
Stars: ✭ 18 (+28.57%)
Mutual labels:  tslint
astraea
TypeScript + React Boilerplate
Stars: ✭ 15 (+7.14%)
Mutual labels:  tslint

Custom TSLint Formatters

A collection of custom TSLint formatters. With colors.

Included Formatters

grouped

Prints a block for each file with the file name as headline, followed by a summary.

custom tslint formatter grouped

Errors are printed as error: row:column <error>, warnings are printed as warning: row:column <warning>.

Errors are in red, warnings in yellow.

vscode

This is a technical formatter that can be used as input for a task in Visual Studio Code to lint all files in a project.

vscode lint task

Usage

First add a new npm task to your package.json:

{
  "lint:vscode": "tslint -s node_modules/custom-tslint-formatters/formatters -t vscode 'src/**/*.+(ts|tsx)'"
}

Then add a new task to .vscode/tasks.json:

{
  "version": "0.1.0",
  "command": "npm",
  "isShellCommand": true,
  "showOutput": "always",
  "suppressTaskName": true,
  "tasks": [
    {
      "taskName": "lint",
      "args": ["run", "lint:vscode"],
      "problemMatcher": {
        "owner": "tslint",
        "fileLocation": ["relative", "${workspaceRoot}"],
        "severity": "warning",
        "pattern": {
          "regexp": "^\\[tslint\\] (.*):(\\d+):(\\d+):\\s+(.*)$",
          "file": 1,
          "line": 2,
          "column": 3,
          "message": 4
        }
      },
      "showOutput": "never"
    }
  ]
}

Installation

npm install custom-tslint-formatters --save-dev

Usage

On the commandline specify the formatters directory with -s and the formatter with -t (see list of formatters above):

tslint -s node_modules/custom-tslint-formatters/formatters -t grouped src/**/*.ts

For tslint-loader add a tslint configuration block to your webpack config specifying the formattersDirectory as well as the formatter (see list of formatters above):

module.exports = {
  module: {
    preLoaders: [
      {
        test: /\.ts$/,
        loader: "tslint"
      }
    ]
  },
  tslint: {
    formattersDirectory: 'node_modules/custom-tslint-formatters/formatters',
    formatter: 'grouped'
  }
}
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].