Skip to content

Instantly share code, notes, and snippets.

@seiz
seiz / 03)CSS Syntax Check.sh
Last active July 15, 2016 09:49
BBedit Script to syntax check a CSS-File with csslint.
#!/bin/bash
/usr/local/bin/csslint --errors=errors,selector-max --warnings=known-properties,box-model,compatible-vendor-prefixes,regex-selectors,empty-rules,selector-max-approaching,zero-units --format=compact --quiet "$BB_DOC_PATH" | bbresults -e --pattern '(?P<file>.+?):\sline\s(?P<line>\d+),\scol\s(?P<col>\d+),\s((?P<type>\w+)\s-\s)?(?P<msg>.*)$'
@seiz
seiz / 01)JavaScript Syntax Check.sh
Last active November 23, 2021 20:31
BBedit Script to syntax check a JavaScript-File with jshint.
#!/bin/bash
/usr/local/bin/jshint "$BB_DOC_PATH" | bbresults -e --pattern '(?P<file>.+?):\sline\s(?P<line>\d+),\scol\s((?P<col>\d+),)?\s+(?P<msg>.*)$'
@seiz
seiz / 00)JSON Syntax Check.sh
Last active November 23, 2021 20:28
BBedit Script to syntax check a JSON-File with jsonlint. Thanks to the new "bbresults", this is a piece of cake.
#!/bin/bash
/usr/local/bin/jsonlint -cq 2>&1 "$BB_DOC_PATH" | bbresults -e --pattern '(?P<file>.+?):\sline\s(?P<line>\d+),\scol\s((?P<col>\d+),)?\s+(?P<msg>.*)$'
@seiz
seiz / Unquoted Attribute Selector
Created February 10, 2014 10:24
Regex to find unquoted attribute selectors in css files
\[([^=|\*]+)([=|*]+)([^\]]+)\]