patched
Patched is a comprehensive and opinionated linter and formatter
Last updated 2 months ago by alexseitsinger .
BSD-2-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install patched 
SYNC missed versions from official npm registry.

Patched

Comprehensive and opinionated linter and formatter (it's just an ESLint wrapper)

(Inspired by the convenience of XO, the criticism from FreeBSD via Standard, and more...)

After compiling a large number of eslint configs for the many plugins that I try to use, it seemed like a good idea to just bundle them all up together to make things easier. As such, Patched was created!

I haven't written any tests, yet. However, things appear to be functional thus far. That means this is currently a WORK IN PROGRESS.

The goal for Patched, like the other fantastic linters & formatters, is to simplify the very importing linting process by making it:

  • easier: By not requiring any configuration or plugins to install
  • smarter: By detecting features and correctly loading the appropriate rules (and any patches) on it's own).

Installation

yarn add patched

Highlights

  1. Since many plugins often compliment or conflict with eachother, Patched uses predefined plugin groups (based on language, framework, etc.) to load plugins, rather than specifying any plugins individually.
  2. Plugin groups are automatically determined at runtime by testing for some simple criteria (eg: file extension, source code content, dependency existence, etc.)
  3. Each plugin used has its own ruleset loaded which each contain:
  • rules: The default rules to apply for the plugin (as if it were the only rules used).
  • patches: A collection of rules to apply to other plugin's because their rules conflict with ours.
  • options: Any additional options that may need to be included within the final eslint config. (ie: tsconfigRootDir, project, import/resolver, etc.)
  1. Plugins are always loaded in the same order, and the final config is generated in 3 stages to ensure the rules used are always what's expected.
  • Load the rulesets for each plugin.
  • Apply the rules for each plugin (in order)
  • Find & apply any patches (from any sibling rulesets).

Summary

Name Value
space type space
space size 2
if/else style stroustrup
semi prefer ASI, except for ;((){ })
quotes double
quote props when necessary
line length 88 (Hi, Black!)

Integrations

  1. coc.nvim: Forking coc-eslint was simple enough, so patched integration will be available soon.

Current Tags

  • 0.3.0                                ...           latest (2 months ago)

4 Versions

  • 0.3.0                                ...           2 months ago
  • 0.2.0                                ...           3 months ago
  • 0.1.1                                ...           3 months ago
  • 0.1.0                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dev Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |