Skip to content

Commit

Permalink
ci: replace github linter by local eslint command
Browse files Browse the repository at this point in the history
  • Loading branch information
Valdo Ryu committed Oct 31, 2024
1 parent 5a37b35 commit 6e2c446
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 25 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Lint Codebase
uses: github/super-linter@v4
env:
LINTER_RULES_PATH: /
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc
VALIDATE_ALL_CODEBASE: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_CSS: false
VALIDATE_JSCPD: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- name: Install modules
run: yarn
- name: Run ESLint
run: yarn lint
3 changes: 2 additions & 1 deletion content/content.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
position: relative !important;
}

.dim:not(:hover) > * > * > * {
.dim:not(:hover) >,
* > * > * {
max-height: 150px !important;
overflow: hidden !important;
}
Expand Down
14 changes: 8 additions & 6 deletions content/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,22 +171,24 @@ async function toggleFeed(shown) {
let attempts = 0
let success = false
let className = 'scaffold-finite-scroll__content' // feed element css class
if (window.location.href != 'https://www.linkedin.com/feed/'){
if (window.location.href != 'https://www.linkedin.com/feed/') {
// dont hide this element on notifications & jobs page. Only hide on home feed instead.
return
}
while (!success && attempts < 50) {
await new Promise((resolve) => {
setTimeout(() => {
setTimeout(() => {
if (shown) {
document
.getElementsByClassName(className).item(0)
.classList.add('hide')
.getElementsByClassName(className)
.item(0)
.classList.add('hide')
console.log(`LinkOff: feed disabled`)
} else {
document
.getElementsByClassName(className).item(0)
.classList.remove('hide')
.getElementsByClassName(className)
.item(0)
.classList.remove('hide')
console.log(`LinkOff: feed enabled`)
}
success = true
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"scripts": {
"css-build": "node-sass --omit-source-map-url popup/popup.scss popup/popup.css",
"css-watch": "npm run css-build -- --watch",
"start": "npm run css-watch"
"start": "npm run css-watch",
"lint": "eslint . --ignore-path .eslintignore"
},
"devDependencies": {
"@creativebulma/bulma-divider": "^1.1.0",
Expand Down

0 comments on commit 6e2c446

Please sign in to comment.