Skip to content

Commit ad9310c

Browse files
committed
Redux API implementation commit #1
1 parent 420f376 commit ad9310c

18 files changed

Lines changed: 26334 additions & 7798 deletions

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/node_modules
2+
/dist
3+
/.cache
4+
/.git
5+
/coverage

.eslintrc.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
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-namespace": 0,
24+
"@typescript-eslint/no-unused-vars": 0,
25+
"no-unused-vars": 0,
26+
"no-import-assign": 0,
27+
"no-async-promise-executor": 0,
28+
// indent: ["error", 2],
29+
indent: 0,
1530
"linebreak-style": ["error", "unix"],
1631
quotes: ["error", "double"],
1732
semi: ["error", "always"],

.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+
dist
5+
.cache

.husky/pre-commit

100755100644
File mode changed.

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/node_modules
2+
/dist
3+
/.cache
4+
/.git
5+
/coverage
6+

.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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
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+
],
6+
plugins: ["@babel/plugin-transform-runtime"],
37
};

coverage/badges.svg

Lines changed: 14 additions & 0 deletions
Loading

index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Redux implementation</title>
7+
</head>
8+
<body>
9+
<section>
10+
<p>Edit vendor: <input type="text" id="#vendorInput" /></p>
11+
<p>Edit model: <input type="text" id="#modelInput" /></p>
12+
<p><label id="#modelView">Model: ---</label></p>
13+
<p><label id="#vendorView">Vendor: ---</label></p>
14+
<p>
15+
Action and state logs provided by middleware functions:<br /><textarea
16+
cols="80"
17+
rows="25"
18+
id="#logs"
19+
></textarea>
20+
</p>
21+
</section>
22+
</body>
23+
<script src="src/bundle.ts"></script>
24+
</html>

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)