Skip to content

Commit

Permalink
Update the linter config
Browse files Browse the repository at this point in the history
  • Loading branch information
Abenezer-Tilahun committed Dec 26, 2023
1 parent c3a3b89 commit 4664f6b
Show file tree
Hide file tree
Showing 4 changed files with 12,208 additions and 10,147 deletions.
44 changes: 26 additions & 18 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@ env:
jobs:
lighthouse:
name: Lighthouse
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "12.x"
node-version: "18.x"
- name: Setup Lighthouse
run: npm install -g @lhci/cli@0.7.x
run: npm install -g @lhci/cli@0.11.x
- name: Lighthouse Report
run: lhci autorun --upload.target=temporary-public-storage --collect.staticDistDir=.
webhint:
name: Webhint
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "12.x"
node-version: "18.x"
- name: Setup Webhint
run: |
npm install --save-dev hint@6.x
npm install --save-dev hint@7.x
[ -f .hintrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.hintrc
- name: Webhint Report
run: npx hint .
stylelint:
name: Stylelint
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "12.x"
node-version: "18.x"
- name: Setup Stylelint
run: |
npm install --save-dev [email protected] [email protected] [email protected] [email protected]
Expand All @@ -48,15 +48,23 @@ jobs:
run: npx stylelint "**/*.{css,scss}"
eslint:
name: ESLint
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "12.x"
node-version: "18.x"
- name: Setup ESLint
run: |
npm install --save-dev [email protected] [email protected] [email protected] [email protected]
[ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/html-css-js/.eslintrc.json
- name: ESLint Report
run: npx eslint .
nodechecker:
name: node_modules checker
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Check node_modules existence
run: |
if [ -d "node_modules/" ]; then echo -e "\e[1;31mThe node_modules/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."; echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future." && exit
18 changes: 14 additions & 4 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["tailwind", "apply", "variants", "responsive", "screen"]
}
],
"scss/at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["tailwind", "apply", "variants", "responsive", "screen"]
}
],
"csstree/validator": true
},
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css"]
}
"ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css", "**/*.js", "**/*.jsx"]
}
Loading

0 comments on commit 4664f6b

Please sign in to comment.