Skip to content
This repository was archived by the owner on Oct 19, 2020. It is now read-only.

Commit 0d256ef

Browse files
committed
Merge branch 'release/0.2.1'
2 parents eedc6d9 + b74fb15 commit 0d256ef

File tree

8 files changed

+243
-26
lines changed

8 files changed

+243
-26
lines changed

.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.php]
12+
indent_size = 4
13+
14+
[*.md]
15+
indent_size = 4
16+
trim_trailing_whitespace = false

.eslintrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "standard"
3+
}

.travis.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: node_js
2+
node_js:
3+
- '6'
4+
cache:
5+
yarn: true
6+
script:
7+
- yarn run lint
8+
notifications:
9+
slack:
10+
secure: np7HDSwnl/LPafSpmurP1WMwC7fVeOkUkhf921zY08ICRlt1LkLhzHaus7aqEEwQiTwBXXRVTYmaWkIakFrEarEFGKly9vfpsWAibTfeRTZycXJcr7GPdgr3M3HmzaEGSGc4C/CsRJ/Swvq29MFUa0xTf1lZ+gBnMARoqDs5ODF321SLqfwge7k3G58P7ITK5OQ8QftEyXzSZ/Ar2Xb3oMlZZMKTbv9EREYO2ONFdG6KT6HiygZ2Ah9Dp34HbnmXA6nikbJWOWwPZvAfSf6hCtemSxAlicSWlcndN275VeM2Q+qCtIfFnRHUth1plR72x3d5N0O7E9RQp2J2RmceUMaH6NzK7oRZQZAirYZjvl6dw/BkprjnkLmk3cBVx0SuFK/DkWUwPwaNNoRzX3iFnrmFkRCw4LND5mBWC6Pmfb3Y/qtOC25kdIpzjVQG50yXNrXd9GMS1aSsyOHIlccBtB8/L7jzYGGi5hJTOeC7NVl/KIxk291s/XVHc+ZNsdNgMNvSNXJDxEph9Tt4xwtETla7ETejtgnwRzBedD1UeID0S7+PeU22Pt0jdb1YI5G7SVLllm8ZgnlcajlcUZTZ+mr/8S8L9wzt3NFOca3prWiORIR9EAFoWhqIhIxJFzaDyt0Xew8BsOEfP5SUxH6UkTBiSWnhhouhatHDzLC6p5c=

lib/linter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const walk = require('walk')
22
const fs = require('fs')
33
const path = require('path')
4-
const htmlparser = require('htmlparser')
4+
const htmlparser = require('htmlparser2')
55
const cheerio = require('cheerio')
66
const sassLint = require('sass-lint')
77
const Reporter = require('./reporter.js')

license.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MIT License
2+
3+
Copyright (c) 2017 Sourceboat
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sass-lint-vue",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Command line tool to lint Sass styles in Vue single file components.",
55
"keywords": [
66
"lint",
@@ -25,11 +25,20 @@
2525
"bin": {
2626
"sass-lint-vue": "./bin/sass-lint-vue"
2727
},
28+
"scripts": {
29+
"lint": "eslint --ext .js lib",
30+
"precommit": "npm run lint"
31+
},
2832
"dependencies": {
2933
"chalk": "^1.1.3",
3034
"cheerio": "^0.22.0",
3135
"commander": "^2.9.0",
32-
"htmlparser": "^1.7.7",
36+
"eslint": "^3.14.1",
37+
"eslint-config-standard": "^6.2.1",
38+
"eslint-plugin-promise": "^3.4.0",
39+
"eslint-plugin-standard": "^2.0.1",
40+
"htmlparser2": "^3.9.2",
41+
"husky": "^0.13.1",
3342
"sass-lint": "^1.10.2",
3443
"text-table": "^0.2.0",
3544
"walk": "^2.3.9"

readme.md

+31-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
11
# sass-lint-vue
22

3-
WIP
3+
[![npm](https://img.shields.io/npm/v/sass-lint-vue.svg?style=flat-square)](https://www.npmjs.com/package/sass-lint-vue)
4+
[![npm downloads](https://img.shields.io/npm/dt/sass-lint-vue.svg?style=flat-square)](https://www.npmjs.com/package/sass-lint-vue)
5+
[![Build Status](https://img.shields.io/travis/sourceboat/sass-lint-vue.svg?style=flat-square)](https://travis-ci.org/sourceboat/sass-lint-vue)
6+
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/)
7+
8+
Command line tool to lint [Sass](https://github.com/sass/sass) styles in [Vue single file components](https://vuejs.org/v2/guide/single-file-components.html). It uses [sass-lint](https://github.com/sasstools/sass-lint) under the hood.
9+
10+
## Installation
11+
12+
```
13+
$ npm install sass-lint-vue
14+
```
15+
16+
## Usage
17+
18+
```
19+
$ sass-lint-vue [options] <file ...>
20+
```
21+
22+
### Options
23+
24+
* `-h, --help`: output usage information
25+
* `-V, --version`: output the version number
26+
27+
## Example
28+
29+
The following example scans the `assets` directory for `.vue` files and outputs lint errors in `<style>` tags with the attribute `lang="scss"` set.
30+
31+
```
32+
$ sass-lint-vue assets
33+
```

0 commit comments

Comments
 (0)