Skip to content

Commit 6bd6ee8

Browse files
author
my
committed
Homework for lection 26 commit #1
1 parent 420f376 commit 6bd6ee8

19 files changed

Lines changed: 20305 additions & 6691 deletions

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/node_modules
2+
/public
3+
/dev

.eslintrc.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
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+
"no-unused-vars": 0,
22+
"@typescript-eslint/no-unused-vars": 0,
23+
"@typescript-eslint/no-var-requires": 0,
24+
"@typescript-eslint/no-empty-function": 0,
25+
"no-import-assign": 0,
26+
indent: ["error", 2],
1527
"linebreak-style": ["error", "unix"],
1628
quotes: ["error", "double"],
1729
semi: ["error", "always"],

.github/workflows/check.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PR check typescript project
2+
3+
on: pull_request
4+
5+
permissions:
6+
contents: write
7+
jobs:
8+
build-and-deploy:
9+
concurrency: ci-${{ github.ref }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Install and Build
16+
run: |
17+
npm ci
18+
npm run build-public-ts
19+
20+
# - name: Deploy
21+
# uses: JamesIves/github-pages-deploy-action@v4
22+
# with:
23+
# folder: public

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
node_modules
2+
coverage/*
3+
!coverage/badges.svg
4+
dev
5+
public

.stylelintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": [
3+
"stylelint-config-standard-scss",
4+
"stylelint-config-standard",
5+
"stylelint-config-prettier"
6+
]
7+
}

babel.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
module.exports = {
2-
presets: [["@babel/preset-env", { targets: { node: "current" } }]],
2+
presets: [
3+
"@babel/preset-typescript",
4+
["@babel/preset-env", { targets: { node: "current" } }],
5+
],
36
};

jest.config.js

Lines changed: 3 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

0 commit comments

Comments
 (0)