Skip to content

Commit 84637b0

Browse files
committed
set up linters
1 parent 1e2d851 commit 84637b0

File tree

4 files changed

+69
-0
lines changed

4 files changed

+69
-0
lines changed

.eslintrc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"jest": true
6+
},
7+
"parserOptions": {
8+
"ecmaVersion": 2018,
9+
"sourceType": "module"
10+
},
11+
"extends": ["airbnb-base"],
12+
"rules": {
13+
"no-shadow": "off",
14+
"no-param-reassign": "off",
15+
"eol-last": "off",
16+
"arrow-parens": "off"
17+
},
18+
"ignorePatterns": [
19+
"dist/",
20+
"build/"
21+
]
22+
}

.github/workflows/linters.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Linters
2+
3+
on: pull_request
4+
5+
env:
6+
FORCE_COLOR: 1
7+
8+
jobs:
9+
eslint:
10+
name: ESLint
11+
runs-on: ubuntu-18.04
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: "12.x"
17+
- name: Setup ESLint
18+
run: |
19+
20+
[ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/javascript/.eslintrc.json
21+
- name: ESLint Report
22+
run: npx eslint .
23+
stylelint:
24+
name: Stylelint
25+
runs-on: ubuntu-18.04
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: actions/setup-node@v1
29+
with:
30+
node-version: "12.x"
31+
- name: Setup Stylelint
32+
run: |
33+
npm install --save-dev [email protected] [email protected] [email protected] stylelint-csstree-validator
34+
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/javascript/.stylelintrc.json
35+
- name: Stylelint Report
36+
run: npx stylelint "**/*.{css,scss}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

.stylelintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": ["stylelint-config-standard"],
3+
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
4+
"rules": {
5+
"at-rule-no-unknown": null,
6+
"scss/at-rule-no-unknown": true,
7+
"csstree/validator": true
8+
},
9+
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css"]
10+
}

0 commit comments

Comments
 (0)