Skip to content

Commit

Permalink
Packages update + some todos + lintstagedrc
Browse files Browse the repository at this point in the history
  • Loading branch information
mvshmakov committed Oct 12, 2020
1 parent 563da36 commit c1130cb
Show file tree
Hide file tree
Showing 65 changed files with 8,486 additions and 8,712 deletions.
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,9 @@ dist
.pnp.*

# Custom
.DS_Store
.env

.idea
.history
src/__tests__/__coverage__

admin/.ipynb_checkpoints
admin/firebase-users-dumps

tsconfig.ts-check.json
21 changes: 21 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const fs = require("fs");

const generateTSConfig = (stagedFilenames) => {
const tsconfig = JSON.parse(fs.readFileSync("tsconfig.json", "utf8"));
tsconfig.include = stagedFilenames;
fs.writeFileSync("tsconfig.ts-check.json", JSON.stringify(tsconfig));
return "tsc --noEmit -p tsconfig.ts-check.json";
};

module.exports = {
"*.{js,ts}": [
"eslint --ext .js,.ts --fix --ignore-pattern '!.lintstagedrc'",
generateTSConfig,
"npm run type-check",
"npm run prettier:check",
"npm run lint",
"npm run test:coverage -- --passWithNoTests",
"npm audit fix",
"git add .",
],
};
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
[![devDependencies Status](https://david-dm.org/mvshmakov/hse-military-bot/master/dev-status.svg)](https://david-dm.org/mvshmakov/hse-military-bot/master?type=dev)

[Project website](https://hse-military-bot.herokuapp.com/)

[Documentation](https://mvshmakov.github.io/hse-military-bot/)

Simply access HSE Military Training Center schedule, prepare news for informating comrades and receive full pack of stickers with people you know well.
Simply access HSE Military Training Center schedule, prepare news for informing comrades and receive full pack of stickers with people you know well.
Stack of technologies used:

- Awesome [Telegraf](http://telegraf.js.org/) wrapper for [Telegram API](https://core.telegram.org/).
Expand All @@ -29,7 +30,7 @@ Stack of technologies used:

## To run an app on local machine:

##### 1) Run `npm i` to install all dependences.
##### 1) Run `npm i` to install all dependencies.

##### 2) Add an `.env` file in root directory with following fields:

Expand Down Expand Up @@ -103,6 +104,6 @@ TODO:

- Правильный хендл всех ошибок про асинхронщину (async/await)

Обязательно используем 14 ноду (хипдамп может не собраться)
Обязательно используем Node.js v14 (хипдамп может не собраться)
Разработка из-под впн (vpnbook)
jupyter lab (не notebook)
2 changes: 2 additions & 0 deletions configs/jest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"testEnvironment": "node",
"rootDir": "..",
"coveragePathIgnorePatterns": ["/node_modules/"],
"coverageDirectory": "<rootDir>/src/__tests__/__coverage__/",
"roots": ["<rootDir>/src/"],
"moduleFileExtensions": ["ts", "tsx", "js", "jsx"],
Expand Down
1 change: 0 additions & 1 deletion configs/pm2.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module.exports = {
{
name: "hse-military-bot",
script: "./dist/server.min.js",
instances: 1,
},
],
};
12,913 changes: 8,060 additions & 4,853 deletions package-lock.json

Large diffs are not rendered by default.

100 changes: 47 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,90 +56,84 @@
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,ts}": [
"npm run type-check",
"npm run prettier:check",
"npm run lint",
"npm run test:coverage -- --passWithNoTests"
]
},
"dependencies": {
"@sentry/node": "^5.16.1",
"@sentry/node": "^5.26.0",
"bot-metrica": "^1.0.2",
"commander": "^5.1.0",
"commander": "^6.1.0",
"compression": "^1.7.4",
"connect-timeout": "^1.9.0",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
"date-fns": "^2.12.0",
"date-fns": "^2.16.1",
"dotenv": "^8.2.0",
"exceljs": "^3.9.0",
"exceljs": "^4.1.1",
"express": "^4.17.1",
"express-rate-limit": "^5.1.3",
"express-request-id": "^1.4.1",
"express-validator": "^6.4.1",
"express-winston": "^4.0.3",
"firebase": "^7.14.2",
"firebase-admin": "^8.11.0",
"express-validator": "^6.6.1",
"express-winston": "^4.0.5",
"firebase": "^7.23.0",
"firebase-admin": "^9.2.0",
"google-news-rss": "^0.4.1",
"heapdump": "^0.3.15",
"helmet": "^3.22.0",
"helmet": "^4.1.1",
"make-error": "^1.3.6",
"node-fetch": "^2.6.0",
"pm2": "^4.4.0",
"node-fetch": "^2.6.1",
"pm2": "^4.5.0",
"pmx": "^1.6.7",
"response-time": "^2.3.2",
"serve-favicon": "^2.5.0",
"telegraf": "^3.38.0",
"telegraf-logger": "^3.0.0",
"winston": "^3.2.1"
"winston": "^3.3.3"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.6",
"@babel/node": "^7.8.7",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/preset-env": "^7.9.6",
"@babel/preset-typescript": "^7.9.0",
"@babel/cli": "^7.11.6",
"@babel/core": "^7.11.6",
"@babel/node": "^7.10.5",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-env": "^7.11.5",
"@babel/preset-typescript": "^7.10.4",
"@types/compression": "^1.7.0",
"@types/connect-timeout": "0.0.34",
"@types/cookie-parser": "^1.4.2",
"@types/cors": "^2.8.6",
"@types/express": "^4.17.6",
"@types/express-rate-limit": "^5.0.0",
"@types/cors": "^2.8.8",
"@types/domhandler": "^2.4.1",
"@types/express": "^4.17.8",
"@types/express-rate-limit": "^5.1.0",
"@types/express-request-id": "^1.4.1",
"@types/express-serve-static-core": "^4.17.13",
"@types/heapdump": "^0.3.1",
"@types/helmet": "^0.0.46",
"@types/htmlparser2": "^3.10.1",
"@types/jest": "^25.2.1",
"@types/node": "^13.13.5",
"@types/helmet": "^0.0.48",
"@types/htmlparser2": "^3.10.2",
"@types/jest": "^26.0.14",
"@types/node": "^14.11.8",
"@types/node-fetch": "^2.5.7",
"@types/response-time": "^2.3.4",
"@types/serve-favicon": "^2.5.0",
"@typescript-eslint/eslint-plugin": "^2.31.0",
"@typescript-eslint/parser": "^2.31.0",
"babel-jest": "^26.0.1",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"babel-jest": "^26.5.2",
"babel-loader": "^8.1.0",
"clean-webpack-plugin": "^3.0.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"file-loader": "^6.0.0",
"husky": "^4.2.5",
"image-webpack-loader": "^6.0.0",
"jest": "^26.0.1",
"jest-cli": "^26.0.1",
"lint-staged": "^10.2.2",
"nodemon": "^2.0.3",
"prettier": "^2.0.5",
"ts-loader": "^7.0.2",
"ts-node": "^8.10.1",
"typescript": "^3.8.3",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-prettier": "^3.1.4",
"file-loader": "^6.1.1",
"husky": "^4.3.0",
"image-webpack-loader": "^7.0.1",
"jest": "^26.5.3",
"jest-cli": "^26.5.3",
"lint-staged": "^10.4.0",
"nodemon": "^2.0.4",
"prettier": "^2.1.2",
"ts-loader": "^8.0.4",
"ts-node": "^9.0.0",
"typescript": "^4.0.3",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.43.0",
"webpack-bundle-analyzer": "^3.7.0",
"webpack-cli": "^3.3.11",
"webpack-node-externals": "^1.7.2"
"webpack-bundle-analyzer": "^3.9.0",
"webpack-cli": "^4.0.0",
"webpack-node-externals": "^2.5.2"
}
}
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ <h1 class="header__text">
<div>
<img
src="https://mc.yandex.ru/watch/57010849"
style="position: absolute; left: -9999px;"
style="position: absolute; left: -9999px"
alt=""
/>
</div>
Expand Down Expand Up @@ -158,7 +158,7 @@ <h1 class="header__text">
<path
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
fill="currentColor"
style="transform-origin: 130px 106px;"
style="transform-origin: 130px 106px"
class="octo-arm"
></path>
<path
Expand Down
11 changes: 0 additions & 11 deletions src/__tests__/__mocks__/schedule.mock.ts

This file was deleted.

15 changes: 0 additions & 15 deletions src/__tests__/schedule.spec.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/api/README.md

This file was deleted.

0 comments on commit c1130cb

Please sign in to comment.