Skip to content

Commit e4ae3b6

Browse files
authored
Implement timeout between requests to avoid rate limits (#38)
1 parent 281003b commit e4ae3b6

File tree

10 files changed

+2313
-297
lines changed

10 files changed

+2313
-297
lines changed

.github/workflows/code-quality.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'Code quality'
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v5
13+
- uses: actions/setup-node@v6
14+
with:
15+
node-version: lts/*
16+
- name: 'Code Quality'
17+
run: |
18+
node -v
19+
yarn
20+
yarn prettier
21+
yarn lint
22+
yarn tsc
23+
env:
24+
CURRENCY_API_ENPOINT_TOKEN: ${{ secrets.CURRENCY_API_ENPOINT_TOKEN }}
25+
MONGODB_URI: ${{ secrets.MONGODB_URI }}

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"jsxSingleQuote": false,
88
"trailingComma": "none",
99
"bracketSpacing": true,
10-
"jsxBracketSameLine": false,
10+
"bracketSameLine": false,
1111
"arrowParens": "avoid",
1212
"proseWrap": "preserve"
1313
}

README.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -32,54 +32,54 @@
3232
<!-- AUTO-GENERATED-CONTENT:START (customTransform) -->
3333
| Name | Downloads |
3434
| ---------------------------------------------------------------------------------------- | ----------- |
35-
| [@three11/accordion](https://www.npmjs.com/package/@three11/accordion) | 611 |
36-
| [@three11/animate-top-offset](https://www.npmjs.com/package/@three11/animate-top-offset) | 481 |
37-
| [@three11/debounce](https://www.npmjs.com/package/@three11/debounce) | 1591 |
38-
| [@three11/dom-helpers](https://www.npmjs.com/package/@three11/dom-helpers) | 566 |
35+
| [@three11/accordion](https://www.npmjs.com/package/@three11/accordion) | 630 |
36+
| [@three11/animate-top-offset](https://www.npmjs.com/package/@three11/animate-top-offset) | 480 |
37+
| [@three11/debounce](https://www.npmjs.com/package/@three11/debounce) | 1614 |
38+
| [@three11/dom-helpers](https://www.npmjs.com/package/@three11/dom-helpers) | 580 |
3939
| [@three11/extract-query-arg](https://www.npmjs.com/package/@three11/extract-query-arg) | 586 |
40-
| [@three11/infinite-scroll](https://www.npmjs.com/package/@three11/infinite-scroll) | 945 |
41-
| [@three11/istouch](https://www.npmjs.com/package/@three11/istouch) | 2663 |
42-
| [@three11/optisize](https://www.npmjs.com/package/@three11/optisize) | 2348 |
43-
| [@three11/scrollspy](https://www.npmjs.com/package/@three11/scrollspy) | 660 |
44-
| [animateme](https://www.npmjs.com/package/animateme) | 11839 |
45-
| [async-array-prototype](https://www.npmjs.com/package/async-array-prototype) | 10020 |
46-
| [attr-i18n](https://www.npmjs.com/package/attr-i18n) | 9704 |
47-
| [create-pwa](https://www.npmjs.com/package/create-pwa) | 10592 |
48-
| [create-react-app-ts](https://www.npmjs.com/package/create-react-app-ts) | 1425 |
49-
| [dator](https://www.npmjs.com/package/dator) | 10165 |
50-
| [gitlab-calendar](https://www.npmjs.com/package/gitlab-calendar) | 10513 |
51-
| [hover-media-query](https://www.npmjs.com/package/hover-media-query) | 10357 |
52-
| [html-head-component](https://www.npmjs.com/package/html-head-component) | 10987 |
53-
| [html5-form-validator](https://www.npmjs.com/package/html5-form-validator) | 10172 |
54-
| [introscroll](https://www.npmjs.com/package/introscroll) | 10178 |
55-
| [itcss](https://www.npmjs.com/package/itcss) | 11677 |
56-
| [itscss](https://www.npmjs.com/package/itscss) | 13814 |
57-
| [lastfm-ts-api](https://www.npmjs.com/package/lastfm-ts-api) | 13769 |
58-
| [localga](https://www.npmjs.com/package/localga) | 10295 |
59-
| [node-mysql-client](https://www.npmjs.com/package/node-mysql-client) | 145 |
60-
| [npm-maintainer](https://www.npmjs.com/package/npm-maintainer) | 9754 |
61-
| [pass-score](https://www.npmjs.com/package/pass-score) | 10848 |
62-
| [postcss-watch-folder](https://www.npmjs.com/package/postcss-watch-folder) | 16737 |
63-
| [random-splice](https://www.npmjs.com/package/random-splice) | 10229 |
64-
| [react-accordion-ts](https://www.npmjs.com/package/react-accordion-ts) | 19353 |
65-
| [react-dropper](https://www.npmjs.com/package/react-dropper) | 9869 |
66-
| [react-round-carousel](https://www.npmjs.com/package/react-round-carousel) | 15522 |
67-
| [react-svg-donuts](https://www.npmjs.com/package/react-svg-donuts) | 11177 |
68-
| [round-carousel-component](https://www.npmjs.com/package/round-carousel-component) | 13892 |
69-
| [scriptex-socials](https://www.npmjs.com/package/scriptex-socials) | 15439 |
70-
| [scss-goodies](https://www.npmjs.com/package/scss-goodies) | 14655 |
71-
| [simple-calendar-widget](https://www.npmjs.com/package/simple-calendar-widget) | 13997 |
72-
| [svg-symbol-sprite](https://www.npmjs.com/package/svg-symbol-sprite) | 802753 |
73-
| [svg64](https://www.npmjs.com/package/svg64) | 601022 |
74-
| [svgo-add-viewbox](https://www.npmjs.com/package/svgo-add-viewbox) | 170578 |
75-
| [svgo-viewbox](https://www.npmjs.com/package/svgo-viewbox) | 19692 |
76-
| [touchsweep](https://www.npmjs.com/package/touchsweep) | 50101 |
77-
| [typed-usa-states](https://www.npmjs.com/package/typed-usa-states) | 1295945 |
78-
| [universal-github-client](https://www.npmjs.com/package/universal-github-client) | 10566 |
79-
| [webpack-mpa](https://www.npmjs.com/package/webpack-mpa) | 2411 |
80-
| [webpack-mpa-next](https://www.npmjs.com/package/webpack-mpa-next) | 1295 |
81-
| [webpack-mpa-ts](https://www.npmjs.com/package/webpack-mpa-ts) | 1159 |
82-
| **Sum** | **3283097** |
40+
| [@three11/infinite-scroll](https://www.npmjs.com/package/@three11/infinite-scroll) | 972 |
41+
| [@three11/istouch](https://www.npmjs.com/package/@three11/istouch) | 2656 |
42+
| [@three11/optisize](https://www.npmjs.com/package/@three11/optisize) | 2359 |
43+
| [@three11/scrollspy](https://www.npmjs.com/package/@three11/scrollspy) | 662 |
44+
| [animateme](https://www.npmjs.com/package/animateme) | 11742 |
45+
| [async-array-prototype](https://www.npmjs.com/package/async-array-prototype) | 9956 |
46+
| [attr-i18n](https://www.npmjs.com/package/attr-i18n) | 9639 |
47+
| [create-pwa](https://www.npmjs.com/package/create-pwa) | 10540 |
48+
| [create-react-app-ts](https://www.npmjs.com/package/create-react-app-ts) | 1455 |
49+
| [dator](https://www.npmjs.com/package/dator) | 10101 |
50+
| [gitlab-calendar](https://www.npmjs.com/package/gitlab-calendar) | 10479 |
51+
| [hover-media-query](https://www.npmjs.com/package/hover-media-query) | 10300 |
52+
| [html-head-component](https://www.npmjs.com/package/html-head-component) | 10909 |
53+
| [html5-form-validator](https://www.npmjs.com/package/html5-form-validator) | 10106 |
54+
| [introscroll](https://www.npmjs.com/package/introscroll) | 10116 |
55+
| [itcss](https://www.npmjs.com/package/itcss) | 11607 |
56+
| [itscss](https://www.npmjs.com/package/itscss) | 13711 |
57+
| [lastfm-ts-api](https://www.npmjs.com/package/lastfm-ts-api) | 13727 |
58+
| [localga](https://www.npmjs.com/package/localga) | 10235 |
59+
| [node-mysql-client](https://www.npmjs.com/package/node-mysql-client) | 144 |
60+
| [npm-maintainer](https://www.npmjs.com/package/npm-maintainer) | 9689 |
61+
| [pass-score](https://www.npmjs.com/package/pass-score) | 10771 |
62+
| [postcss-watch-folder](https://www.npmjs.com/package/postcss-watch-folder) | 16570 |
63+
| [random-splice](https://www.npmjs.com/package/random-splice) | 10164 |
64+
| [react-accordion-ts](https://www.npmjs.com/package/react-accordion-ts) | 19273 |
65+
| [react-dropper](https://www.npmjs.com/package/react-dropper) | 9805 |
66+
| [react-round-carousel](https://www.npmjs.com/package/react-round-carousel) | 15327 |
67+
| [react-svg-donuts](https://www.npmjs.com/package/react-svg-donuts) | 11090 |
68+
| [round-carousel-component](https://www.npmjs.com/package/round-carousel-component) | 13825 |
69+
| [scriptex-socials](https://www.npmjs.com/package/scriptex-socials) | 15256 |
70+
| [scss-goodies](https://www.npmjs.com/package/scss-goodies) | 14532 |
71+
| [simple-calendar-widget](https://www.npmjs.com/package/simple-calendar-widget) | 13933 |
72+
| [svg-symbol-sprite](https://www.npmjs.com/package/svg-symbol-sprite) | 830927 |
73+
| [svg64](https://www.npmjs.com/package/svg64) | 611202 |
74+
| [svgo-add-viewbox](https://www.npmjs.com/package/svgo-add-viewbox) | 171690 |
75+
| [svgo-viewbox](https://www.npmjs.com/package/svgo-viewbox) | 19497 |
76+
| [touchsweep](https://www.npmjs.com/package/touchsweep) | 49713 |
77+
| [typed-usa-states](https://www.npmjs.com/package/typed-usa-states) | 1305691 |
78+
| [universal-github-client](https://www.npmjs.com/package/universal-github-client) | 10478 |
79+
| [webpack-mpa](https://www.npmjs.com/package/webpack-mpa) | 2367 |
80+
| [webpack-mpa-next](https://www.npmjs.com/package/webpack-mpa-next) | 1299 |
81+
| [webpack-mpa-ts](https://www.npmjs.com/package/webpack-mpa-ts) | 1162 |
82+
| **Sum** | **3329567** |
8383
<!-- AUTO-GENERATED-CONTENT:END -->
8484

8585
## License

badge.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schemaVersion": 1,
33
"label": "NPM",
4-
"message": "3283097 Downloads",
4+
"message": "3329567 Downloads",
55
"color": "orange",
66
"style": "for-the-badge",
77
"namedLogo": "npm"

eslint.config.mjs

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import path from 'node:path';
2+
import { fileURLToPath } from 'node:url';
3+
4+
import js from '@eslint/js';
5+
import globals from 'globals';
6+
import tsParser from '@typescript-eslint/parser';
7+
import tsESLint from '@typescript-eslint/eslint-plugin';
8+
import importPlugin from 'eslint-plugin-import';
9+
import promisePlugin from 'eslint-plugin-promise';
10+
import perfectionist from 'eslint-plugin-perfectionist';
11+
import prettierExtends from 'eslint-config-prettier';
12+
13+
const __filename = fileURLToPath(import.meta.url);
14+
const __dirname = path.dirname(__filename);
15+
16+
export default [
17+
{
18+
files: ['./index.ts'],
19+
plugins: {
20+
'@typescript-eslint': tsESLint,
21+
perfectionist,
22+
import: importPlugin,
23+
promise: promisePlugin
24+
},
25+
languageOptions: {
26+
globals: {
27+
...globals.node
28+
},
29+
parser: tsParser,
30+
ecmaVersion: 'latest',
31+
sourceType: 'module',
32+
parserOptions: {
33+
project: 'tsconfig.json',
34+
tsconfigRootDir: __dirname
35+
}
36+
},
37+
rules: {
38+
...js.configs.recommended.rules,
39+
...prettierExtends.rules,
40+
...tsESLint.configs.recommended.rules,
41+
...importPlugin.configs.recommended.rules,
42+
...promisePlugin.configs.recommended.rules,
43+
'perfectionist/sort-objects': [
44+
'error',
45+
{
46+
type: 'natural',
47+
order: 'asc'
48+
}
49+
],
50+
'sort-vars': 'error',
51+
'perfectionist/sort-jsx-props': 'error',
52+
'perfectionist/sort-interfaces': 'error',
53+
'perfectionist/sort-object-types': 'error',
54+
'perfectionist/sort-imports': [
55+
'error',
56+
{
57+
type: 'natural',
58+
order: 'asc',
59+
newlinesBetween: 'always',
60+
groups: ['builtin', 'external', 'internal']
61+
}
62+
],
63+
'perfectionist/sort-named-imports': [
64+
'error',
65+
{
66+
type: 'natural',
67+
order: 'asc'
68+
}
69+
],
70+
'perfectionist/sort-union-types': [
71+
'error',
72+
{
73+
type: 'natural',
74+
order: 'asc'
75+
}
76+
],
77+
'@typescript-eslint/consistent-type-imports': 'error'
78+
}
79+
}
80+
];

index.mjs

Lines changed: 0 additions & 106 deletions
This file was deleted.

0 commit comments

Comments
 (0)