Skip to content

Commit

Permalink
Add stylelint to run linter for docsify style
Browse files Browse the repository at this point in the history
  • Loading branch information
yhatt committed Nov 13, 2018
1 parent 2f1ee51 commit 04fff5a
Show file tree
Hide file tree
Showing 4 changed files with 820 additions and 20 deletions.
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ references:
name: Prettier formatting
command: yarn format:check

- run: yarn lint:all
- run:
name: ESLint
command: yarn lint:js

- run:
name: stylelint
command: yarn lint:css

- run:
name: Jest
Expand Down
17 changes: 17 additions & 0 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends:
- stylelint-config-standard
- stylelint-config-prettier

ignoreFiles:
- coverage/**/*
- docs/style/**/*
- jsdoc/**/*

plugins:
- stylelint-scss

rules:
at-rule-no-unknown:
- null
scss/at-rule-no-unknown:
- true
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
"format": "prettier \"**/*.{css,js,json,md,scss,ts,yaml,yml}\"",
"format:check": "yarn --silent --mutex file run format -l",
"jsdoc": "rimraf jsdoc && jsdoc src -c .jsdoc.json",
"lint": "eslint",
"lint:all": "eslint .",
"prepack": "npm-run-all --npm-path yarn --parallel format:check lint:all test:coverage --sequential build",
"preversion": "npm-run-all --npm-path yarn --parallel format:check lint:all test:coverage",
"lint:js": "eslint .",
"lint:css": "stylelint \"./**/*.{css,scss}\"",
"prepack": "npm-run-all --npm-path yarn --parallel format:check lint:* test:coverage --sequential build",
"preversion": "npm-run-all --npm-path yarn --parallel format:check lint:* test:coverage",
"test": "jest",
"test:coverage": "jest --coverage",
"version": "node version.js && git add -A CHANGELOG.md",
Expand Down Expand Up @@ -82,7 +82,11 @@
"nodemon": "^1.18.6",
"npm-run-all": "^4.1.3",
"prettier": "^1.14.3",
"rimraf": "^2.6.2"
"rimraf": "^2.6.2",
"stylelint": "^9.8.0",
"stylelint-config-prettier": "^4.0.0",
"stylelint-config-standard": "^18.2.0",
"stylelint-scss": "^3.4.0"
},
"dependencies": {
"js-yaml": "^3.12.0",
Expand Down
Loading

0 comments on commit 04fff5a

Please sign in to comment.