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

Commit

Permalink
Merge branch 'release/0.3.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
krns committed Nov 23, 2018
2 parents 2c98e50 + ed99c54 commit d7e8027
Show file tree
Hide file tree
Showing 6 changed files with 658 additions and 362 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:8
2 changes: 1 addition & 1 deletion lib/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Reporter {
output += ' | '
output += chalk.yellow.bold(`warnings ${totalWarnings}`)
console.log(output)
process.exit(1)
process.exit(totalErrors > 0 ? 1 : 0)
}
}
}
Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-lint-vue",
"version": "0.2.1",
"version": "0.3.1",
"description": "Command line tool to lint Sass styles in Vue single file components.",
"keywords": [
"lint",
Expand Down Expand Up @@ -30,17 +30,19 @@
"precommit": "npm run lint"
},
"dependencies": {
"chalk": "^1.1.3",
"cheerio": "^0.22.0",
"commander": "^2.9.0",
"chalk": "^2.4.1",
"cheerio": "^1.0.0-rc.2",
"commander": "^2.18.0",
"eslint": "^3.14.1",
"eslint-config-standard": "^6.2.1",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^2.0.1",
"htmlparser2": "^3.9.2",
"husky": "^0.13.1",
"sass-lint": "^1.10.2",
"sass-lint": "^1.12.1",
"text-table": "^0.2.0",
"walk": "^2.3.9"
"walk": "^2.3.14"
},
"devDependencies": {
"husky": "^1.0.1"
}
}
37 changes: 31 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,21 @@

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.

## Features

* Add a `.sass-lint.yml` to specify your [configuration](https://github.com/sasstools/sass-lint#configuring).
* Disable specific rules or all rules [via source](https://github.com/sasstools/sass-lint#disabling-linters-via-source).

## Installation

```
$ npm install sass-lint-vue
```bash
npm install sass-lint-vue
```

## Usage

```
$ sass-lint-vue [options] <file ...>
```bash
sass-lint-vue [options] <file ...>
```

### Options
Expand All @@ -26,8 +31,28 @@ $ sass-lint-vue [options] <file ...>

## Example

The following example scans the `assets` directory for `.vue` files and outputs lint errors in `<style>` tags with the attribute `lang="scss"` set.
The following example scans the `assets` directory for `.vue` files and outputs lint errors in `<style>` tags with the attribute `lang="scss"` set.

```bash
sass-lint-vue assets
```
$ sass-lint-vue assets

## Development

Build the docker container via

```bash
docker build . -t sass-lint-vue.
```

Lint the `Component.vue` file in the docker container via:

```bash
docker run --rm -v (pwd):/app sass-lint-vue ./app/bin/sass-lint-vue ./app/test/Component.vue
```

Access the container via:

```bash
docker run -it --rm -v (pwd):/app sass-lint-vue bash
```
15 changes: 15 additions & 0 deletions test/Component.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div class="wrapper"></div>
</template>
<script>
export default {
}
</script>
<style lang="scss">
.wrapper {
$black: #000;
background: $black;
}
</style>
Loading

0 comments on commit d7e8027

Please sign in to comment.