Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md
bang-format.js
border-zero.js
color-keyword.js
debug-statement.js
declaration-order.js
empty-line-between-blocks.js
empty-rule.js
final-newline.js
hex-length.js
hex-notation.js
hex-validation.js
id-selector.js
import-path.js
indentation.js
leading-zero.js
name-format.js
nesting-depth.js
placeholder-in-extend.js
property-spelling.js
pseudo-element.js
qualifying-element.js
selector-depth.js
selector-format.js
shorthand.js
single-line-per-property.js
single-line-per-selector.js
space-after-comma.js
space-after-property-colon.js
space-after-property-name.js
space-after-variable-colon.js
space-after-variable-name.js
space-before-brace.js
space-between-parens.js
string-quotes.js
trailing-semicolon.js
trailing-zero.js
unnecessary-mantissa.js
unnecessary-parent-reference.js
url-quotes.js
valid-scss.js
vendor-prefixes.js
zero-unit.js

README.md

How to add tests

  • Update ./src/.stylelintrc.json with your new rules
  • Run npm run build to generate ./index.js
  • Create your test file named after the scss-lint your you are adding a stylelint rule for
  • Copy the code from one of the other tests into your test new file
  • Update the test so you have .scss code that will produce lint you want to test for
  • Add a console.log statement within the checkResult function in the test file passing result to the log statement. e.g. console.log(result)
  • Look for warnings it generates
  • Copy expected text to test file
  • Escape quotes in your expected error text
  • Run tests again and refine until they pass
  • Update t.plan(2) to the number of tests you have