Skip to content

Commit fff58cf

Browse files
committed
Homework for lection 44 (NodeJS app) commit #1
1 parent 420f376 commit fff58cf

File tree

11 files changed

+5663
-8123
lines changed

11 files changed

+5663
-8123
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules

.eslintrc.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
11
module.exports = {
2+
parser: "@typescript-eslint/parser",
3+
plugins: ["@typescript-eslint"],
24
env: {
35
browser: true,
46
es2021: true,
57
jest: true,
68
node: true,
79
},
8-
extends: ["eslint:recommended", "prettier"],
10+
extends: [
11+
"plugin:jest/recommended",
12+
"plugin:@typescript-eslint/recommended",
13+
"eslint:recommended",
14+
"prettier",
15+
],
916
parserOptions: {
1017
ecmaVersion: "latest",
1118
sourceType: "module",
1219
},
1320
rules: {
14-
indent: ["error", "tab"],
21+
"@typescript-eslint/no-var-requires": 0,
22+
"@typescript-eslint/no-empty-function": 0,
23+
"@typescript-eslint/no-explicit-any": 0,
24+
"no-import-assign": 0,
25+
// indent: ["error", 2],
1526
"linebreak-style": ["error", "unix"],
1627
quotes: ["error", "double"],
1728
semi: ["error", "always"],

.github/workflows/coverage.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Coverage
2+
3+
on: pull_request
4+
5+
jobs:
6+
coverage:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/setup-node@v2
10+
with:
11+
node-version: 14
12+
- uses: actions/checkout@v2
13+
- uses: artiomtr/jest-coverage-report-action@v2.0-rc.6
14+
with:
15+
github-token: ${{ secrets.GITHUB_TOKEN }}
16+
threshold: 60

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
coverage

jest.config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ module.exports = {
3434
// coverageProvider: "babel",
3535

3636
// A list of reporter names that Jest uses when writing coverage reports
37-
// coverageReporters: [
38-
// "json",
39-
// "text",
40-
// "lcov",
41-
// "clover"
42-
// ],
37+
coverageReporters: ["json", "text", "lcov", "json-summary", "clover"],
4338

4439
// An object that configures minimum threshold enforcement for coverage results
4540
// coverageThreshold: undefined,
@@ -99,6 +94,8 @@ module.exports = {
9994
// An enum that specifies notification mode. Requires { notify: true }
10095
// notifyMode: "failure-change",
10196

97+
preset: "ts-jest",
98+
10299
// A preset that is used as a base for Jest's configuration
103100
// preset: undefined,
104101

@@ -174,6 +171,9 @@ module.exports = {
174171

175172
// A map from regular expressions to paths to transformers
176173
// transform: undefined,
174+
transform: {
175+
"^.+\\.jsx?$": "babel-jest",
176+
},
177177

178178
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
179179
// transformIgnorePatterns: [

0 commit comments

Comments
 (0)