0.2.2 • Published 6 years ago

autolesshint v0.2.2

Weekly downloads
62
License
MIT
Repository
github
Last release
6 years ago

autolesshint

npm

autolesshint is a tool to automatically fix Lesshint >=v4.0.0 complaints.

Installation

Run the following command from the command line (add -g to install globally):

npm install autolesshint

CLI usage

Run autolesshint from the command-line by passing one or more files/directories to recursively scan.

autolesshint src/less/ lib/style.less
Available FlagsDescription
-c/--configSpecify the configuration file to use (will be merged with defaults).
-e/--excludeA minimatch glob pattern or a file to exclude from being linted.
-V/--versionShow version.

Supported rules

  • attribute_quotes
  • border_zero
  • comment
  • empty_rule
  • final_newline
  • hex_length
  • hex_notation
  • newline_after_block
  • single_line_per_selector
  • space_before_brace
  • space_between_parens
  • string_quotes
  • trailing_semicolon
  • trailing_whitespace
  • url_quotes
  • zero_unit

See the Complete rule coverage milestone for upcoming coverage support.

Unsupported rules

These rules contain logic that require user input and can't be automatically fixed:

  • depth_level
  • duplicate_property
  • hex_validation
  • id_selector
  • import_path
  • important_rule
  • max_char_per_line
  • property_units
  • qualifying_element
  • selector_naming
  • url_format

Contributing

autolesshint uses Gulp to automate building, which requires Node.js.

To build from scratch, install NodeJS and run the following commands:

npm install -g gulp
npm install
gulp

automutate manages the runtime of taking in lint complaints from lesshint. These are mapped to Suggester classes in src/suggesters by name.

automutate-tests manages development-time tests verifying actual file mutations.

Adding a suggester

  • Add a Suggester class with a linter's name. my_rule would be mapped to src/suggesters/myRuleSuggester.ts that would have to export a MyRuleSuggester class that implements the ISuggester interface.
  • Add test case(s) under test/cases that each have an original.less, expected.less, actual.less, and .lesshintrc.
  • Add the suggester to the list in README.md.
  • Submit a PR referencing the issue corresponding to the lint rule.
0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1

7 years ago