Skip to content

Commit

Permalink
Merge pull request #2 from anuraghazra/master
Browse files Browse the repository at this point in the history
[pull] master from anuraghazra:master
  • Loading branch information
tifandotme authored Apr 23, 2024
2 parents 32001d9 + af9b2c8 commit abad647
Show file tree
Hide file tree
Showing 90 changed files with 4,483 additions and 3,626 deletions.
61 changes: 30 additions & 31 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Possible Errors (overrides from recommended set)

// "no-extra-parens": "error",
// "no-unexpected-multiline": "error",
"no-unexpected-multiline": "error",

// All JSDoc comments must be valid

Expand All @@ -39,7 +39,7 @@
}],
"block-scoped-var": "warn",
"consistent-return": "error",
// "curly": "error",
"curly": "error",
// "default-case": "warn",

// the dot goes with the property when doing multiline
Expand All @@ -48,8 +48,8 @@
// "dot-notation": "warn",
// "eqeqeq": [ "error", "smart" ],
// "guard-for-in": "warn",
// "no-alert": "error",
// "no-caller": "error",
"no-alert": "error",
"no-caller": "error",
// "no-case-declarations": "warn",
// "no-div-regex": "warn",
// "no-else-return": "warn",
Expand Down Expand Up @@ -94,12 +94,12 @@

// Produce warnings when something is commented as TODO or FIXME

// "no-warning-comments": [ "warn", {
// "terms": [ "TODO", "FIXME" ],
// "location": "start"
// }],
// "no-with": "warn",
// "radix": "warn",
"no-warning-comments": [ "warn", {
"terms": [ "TODO", "FIXME" ],
"location": "start"
}],
"no-with": "warn",
"radix": "warn",
// "vars-on-top": "error",

// Enforces the style of wrapped functions
Expand All @@ -113,7 +113,7 @@

// "init-declarations": [ "error", "always" ],
// "no-catch-shadow": "warn",
// "no-delete-var": "error",
"no-delete-var": "error",
// "no-label-var": "error",
// "no-shadow-restricted-names": "error",
// "no-shadow": "warn",
Expand All @@ -128,7 +128,7 @@

// Disallow hoisting - let & const don't allow hoisting anyhow

// "no-use-before-define": "error",
"no-use-before-define": "error",

// Node.js and CommonJS

Expand All @@ -150,15 +150,15 @@
// "arrow-body-style": [ "error", "always" ],
// "arrow-parens": [ "error", "always" ],
// "arrow-spacing": [ "error", { "before": true, "after": true }],
// "constructor-super": "error",
"constructor-super": "error",
// "generator-star-spacing": [ "error", "before" ],
// "no-arrow-condition": "error",
// "no-class-assign": "error",
// "no-const-assign": "error",
// "no-dupe-class-members": "error",
// "no-this-before-super": "error",
"no-class-assign": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-this-before-super": "error",
// "no-var": "warn",
"object-shorthand": [ "warn" ]
"object-shorthand": [ "warn" ],
// "prefer-arrow-callback": "warn",
// "prefer-spread": "warn",
// "prefer-template": "warn",
Expand Down Expand Up @@ -193,38 +193,37 @@
// "no-continue": "off",
// "no-inline-comments": "off",
// "no-lonely-if": "warn",
// "no-mixed-spaces-and-tabs": "warn",
// "no-multiple-empty-lines": "warn",
// "no-negated-condition": "off",
"no-mixed-spaces-and-tabs": "warn",
"no-multiple-empty-lines": "warn",
"no-negated-condition": "warn",
// "no-nested-ternary": "warn",
// "no-new-object": "warn",
// "no-plusplus": "off",
// "no-spaced-func": "warn",
// "no-ternary": "off",
// "no-trailing-spaces": "warn",
// "no-underscore-dangle": "warn",
// "no-unneeded-ternary": "warn",
"no-unneeded-ternary": "warn",
// "object-curly-spacing": [ "warn", "always" ],
// "one-var": "off",
// "operator-assignment": [ "warn", "never" ],
// "operator-linebreak": [ "warn", "after" ],
// "padded-blocks": [ "warn", "never" ],
// "quote-props": [ "warn", "consistent-as-needed" ],
// "quotes": [ "warn", "single" ],
// "require-jsdoc": [ "warn", {
// "require": {
// "FunctionDeclaration": true,
// "MethodDefinition": true,
// "ClassDeclaration": false
// }
// }],
"require-jsdoc": [ "warn", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": false
}
}],
// "semi-spacing": [ "warn", { "before": false, "after": true }],
// "semi": [ "error", "always" ],
// "sort-vars": "off",
// "space-after-keywords": [ "warn", "always" ],
"keyword-spacing": ["error", { "before": true, "after": true }]
// "space-before-blocks": [ "warn", "always" ],
// "space-before-function-paren": [ "warn", "never" ],
// "space-before-keywords": [ "warn", "always" ],
// "space-in-parens": [ "warn", "never" ],
// "space-infix-ops": [ "warn", { "int32Hint": true } ],
// "space-return-throw-case": "error",
Expand Down
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,20 @@ updates:
schedule:
interval: weekly
open-pull-requests-limit: 10
commit-message:
prefix: "build(deps)"
prefix-development: "build(deps-dev)"
reviewers:
- "qwerty541"

# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
commit-message:
prefix: "ci(deps)"
prefix-development: "ci(deps-dev)"
reviewers:
- "qwerty541"
124 changes: 86 additions & 38 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,95 @@
themes: themes/index.js
doc-translation: docs/*
themes:
- changed-files:
- any-glob-to-any-file:
- themes/index.js

doc-translation:
- changed-files:
- any-glob-to-any-file:
- docs/*

card-i18n:
- src/translations.js
- src/common/I18n.js
- changed-files:
- any-glob-to-any-file:
- src/translations.js
- src/common/I18n.js

documentation:
- readme.md
- CONTRIBUTING.md
- CODE_OF_CONDUCT.md
- SECURITY.md
- changed-files:
- any-glob-to-any-file:
- readme.md
- CONTRIBUTING.md
- CODE_OF_CONDUCT.md
- SECURITY.md

dependencies:
- package.json
- package-lock.json
- changed-files:
- any-glob-to-any-file:
- package.json
- package-lock.json

lang-card:
- api/top-langs.js
- src/cards/top-languages-card.js
- src/fetchers/top-languages-fetcher.js
- tests/fetchTopLanguages.test.js
- tests/renderTopLanguagesCard.test.js
- changed-files:
- any-glob-to-any-file:
- api/top-langs.js
- src/cards/top-languages-card.js
- src/fetchers/top-languages-fetcher.js
- tests/fetchTopLanguages.test.js
- tests/renderTopLanguagesCard.test.js
- tests/top-langs.test.js

repo-card:
- api/pin.js
- src/cards/repo-card.js
- src/fetchers/repo-fetcher.js
- tests/fetchRepo.test.js
- tests/renderRepoCard.test.js
- changed-files:
- any-glob-to-any-file:
- api/pin.js
- src/cards/repo-card.js
- src/fetchers/repo-fetcher.js
- tests/fetchRepo.test.js
- tests/renderRepoCard.test.js
- tests/pin.test.js

stats-card:
- api/index.js
- src/cards/stats-card.js
- src/fetchers/stats-fetcher.js
- tests/fetchStats.test.js
- tests/renderStatsCard.test.js
- changed-files:
- any-glob-to-any-file:
- api/index.js
- src/cards/stats-card.js
- src/fetchers/stats-fetcher.js
- tests/fetchStats.test.js
- tests/renderStatsCard.test.js
- tests/api.test.js

wakatime-card:
- api/wakatime.js
- src/cards/wakatime-card.js
- src/fetchers/wakatime-fetcher.js
- tests/fetchWakatime.test.js
- tests/renderWakatimeCard.test.js
- changed-files:
- any-glob-to-any-file:
- api/wakatime.js
- src/cards/wakatime-card.js
- src/fetchers/wakatime-fetcher.js
- tests/fetchWakatime.test.js
- tests/renderWakatimeCard.test.js
- tests/wakatime.test.js

gist-card:
- api/gist.js
- src/cards/gist-card.js
- src/fetchers/gist-fetcher.js
- tests/fetchGist.test.js
- tests/renderGistCard.test.js
ranks: src/calculateRank.js
- changed-files:
- any-glob-to-any-file:
- api/gist.js
- src/cards/gist-card.js
- src/fetchers/gist-fetcher.js
- tests/fetchGist.test.js
- tests/renderGistCard.test.js
- tests/gist.test.js

ranks:
- changed-files:
- any-glob-to-any-file:
- src/calculateRank.js

ci:
- .github/workflows/*
- scripts/*
- changed-files:
- any-glob-to-any-file:
- .github/workflows/*
- scripts/*

infrastructure:
- changed-files:
- any-glob-to-any-file:
- .eslintrc.json
41 changes: 41 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Static code analysis workflow (CodeQL)"

on:
push:
branches:
- master
pull_request:
branches:
- master

permissions:
actions: read
checks: read
contents: read
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: write
statuses: read

jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@46a6823b81f2d7c67ddf123851eea88365bc8a67 # v2.13.5
with:
languages: javascript

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@46a6823b81f2d7c67ddf123851eea88365bc8a67 # v2.13.5
4 changes: 2 additions & 2 deletions .github/workflows/deploy-prep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
if: github.repository == 'anuraghazra/github-readme-stats'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Deployment Prep
run: python ./.github/workflows/deploy-prep.py
- uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
- uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
branch: vercel
create_branch: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Setup Node
uses: actions/setup-node@bea5baf987ba7aa777a8a0b4ace377a21c45c381 # v3.8.0
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ jobs:
name: Close empty issues
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 # NOTE: Retrieve issue templates.
# NOTE: Retrieve issue templates.
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Run empty issues closer action
uses: rickstaa/empty-issues-closer-action@2d870c990a004f4a2c9de2a0effa2665c7677d7d # v1.1.10
uses: rickstaa/empty-issues-closer-action@e96914613221511279ca25f50fd4acc85e331d99 # v1.1.74
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generate-theme-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
node-version: [18.x]

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Setup Node
uses: actions/setup-node@bea5baf987ba7aa777a8a0b4ace377a21c45c381 # v3.8.0
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/label-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
if: github.repository == 'anuraghazra/github-readme-stats'
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 # v4.3.0
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: true
Loading

0 comments on commit abad647

Please sign in to comment.