chore: migrate from scss-lint to sass-lint (#1172)

https://github.com/brigade/scss-lint now says "NOTICE: Consider other tools
before adopting SCSS-Lint", and recommends sass-lint as an alternative.
sass-lint has the additional advantage of being written in NodeJS, which means
it slots nicely into our existing infrastructure, and we can completely
remove our build-time dependency on Ruby.
This commit is contained in:
Andrew Scheller 2017-03-09 19:09:00 +00:00 committed by Juan Cruz Viotti
parent 0a9b67976c
commit 0c7e1feb4b
9 changed files with 20 additions and 49 deletions

17
.sass-lint.yml Normal file
View File

@ -0,0 +1,17 @@
# sass-lint config generated by make-sass-lint-config v0.1.2
files:
include: lib/gui/scss/**/*.scss
options:
formatter: stylish
merge-default-rules: false
rules:
no-css-comments: 0
no-important: 0
no-qualifying-elements: 0
placeholder-in-extend: 0
property-sort-order: 0
quotes:
- 1
- style: double

View File

@ -1,16 +0,0 @@
scss_files: 'lib/gui/scss/**/*.scss'
linters:
Comment:
enabled: false
ImportantRule:
enabled: false
PlaceholderInExtend:
enabled: false
PropertySortOrder:
enabled: false
QualifyingElement:
enabled: false
StringQuotes:
enabled: true
style: double_quotes

View File

@ -7,7 +7,6 @@ services:
env:
global:
- NODE_VERSION="6.1.0"
- RUBY_VERSION="2.3.1"
matrix:
- TARGET_ARCH=x64
- TARGET_ARCH=x86
@ -31,14 +30,11 @@ before_install:
node --version;
npm --version;
npm config set spin=false;
rvm install $RUBY_VERSION;
rvm use $RUBY_VERSION;
fi
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
pip install codespell;
gem install scss_lint;
npm install -g bower;
brew install afsctool;
brew install jq;

View File

@ -30,10 +30,8 @@ install:
- choco install jq
- set PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;%PATH%
- set PATH=C:\Program Files (x86)\NSIS;%PATH%
- set PATH=C:\Ruby22\bin;%PATH%
- set PATH=C:\MinGW\bin;%PATH%
- set PATH=C:\MinGW\msys\1.0\bin;%PATH%
- gem install scss_lint
- pip install codespell
- make info
- make electron-develop

View File

@ -13,7 +13,6 @@ Prerequisites
- [Bower](http://bower.io)
- [UPX](http://upx.sourceforge.net)
- [Python](https://www.python.org)
- [SCSS Lint](https://github.com/brigade/scss-lint/)
- [jq](https://stedolan.github.io/jq/)
- [Asar](https://github.com/electron/asar)
- [Codespell](https://github.com/lucasdemarchi/codespell)

View File

@ -14,10 +14,10 @@
"test": "npm run lint && electron-mocha --recursive --renderer tests/gui -R spec && electron-mocha --recursive tests/cli tests/shared tests/child-writer tests/image-stream -R spec",
"sass": "node-sass ./lib/gui/scss/main.scss > ./lib/gui/css/main.css",
"jslint": "eslint lib tests scripts bin versionist.conf.js",
"scsslint": "scss-lint lib/gui/scss",
"sasslint": "sass-lint lib/gui/scss",
"htmllint": "node scripts/html-lint.js",
"codespell": "codespell.py --dictionary=- --dictionary=dictionary lib tests",
"lint": "npm run jslint && npm run scsslint && npm run codespell && npm run htmllint",
"lint": "npm run jslint && npm run sasslint && npm run codespell && npm run htmllint",
"changelog": "versionist",
"start": "electron lib/start.js",
"clean-shrinkwrap": "node ./scripts/clean-shrinkwrap.js"
@ -118,6 +118,7 @@
"jsonfile": "^2.3.1",
"mochainon": "^1.0.0",
"node-sass": "^3.8.0",
"sass-lint": "^1.10.2",
"tmp": "0.0.31",
"versionist": "^2.1.0"
}

View File

@ -16,8 +16,6 @@ RUN apt-get update && apt-get install -y \
python \
python-pip \
python-dev \
python-software-properties \
software-properties-common \
upx \
unzip \
wget \
@ -32,9 +30,3 @@ RUN npm install -g bower asar electron-installer-debian
# Python
RUN pip install codespell
# Ruby
RUN add-apt-repository ppa:brightbox/ruby-ng
RUN apt-get update
RUN apt-get install -y ruby2.3
RUN gem install scss_lint

View File

@ -16,8 +16,6 @@ RUN apt-get update && apt-get install -y \
python \
python-pip \
python-dev \
python-software-properties \
software-properties-common \
upx \
unzip \
wget \
@ -32,9 +30,3 @@ RUN npm install -g bower asar electron-installer-debian
# Python
RUN pip install codespell
# Ruby
RUN add-apt-repository ppa:brightbox/ruby-ng
RUN apt-get update
RUN apt-get install -y ruby2.3
RUN gem install scss_lint

View File

@ -16,8 +16,6 @@ RUN apt-get update && apt-get install -y \
python \
python-pip \
python-dev \
python-software-properties \
software-properties-common \
upx \
unzip \
wget \
@ -32,9 +30,3 @@ RUN npm install -g bower asar electron-installer-debian
# Python
RUN pip install codespell
# Ruby
RUN add-apt-repository ppa:brightbox/ruby-ng
RUN apt-get update
RUN apt-get install -y ruby2.3
RUN gem install scss_lint