Skip to content

Commit

Permalink
Add linter and GHA workflow config
Browse files Browse the repository at this point in the history
  • Loading branch information
bolah2009 committed Jun 23, 2020
1 parent 30c8998 commit 9eb92f2
Show file tree
Hide file tree
Showing 4 changed files with 2,513 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Linters

on: pull_request

env:
FORCE_COLOR: 1

jobs:
rubocop:
name: Rubocop
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x
- name: Setup Rubocop
run: |
gem install --no-document rubocop:'~>0.81.0' # https://docs.rubocop.org/en/stable/installation/
[ -f .rubocop.yml ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/ror/.rubocop.yml
- name: Rubocop Report
run: rubocop --color
stylelint:
name: Stylelint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Setup Stylelint
run: |
npm install --save-dev [email protected] [email protected] [email protected]
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/ror/.stylelintrc.json
- name: Stylelint Report
run: npx stylelint "**/*.{css,scss}"
15 changes: 15 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

{
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true
},
"ignoreFiles": [
"build/**",
"dist/**",
"**/reset*.css",
"**/bootstrap*.css"
]
}
Loading

0 comments on commit 9eb92f2

Please sign in to comment.