Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3be68c0

Browse files
feat(graduated_tiered_pricing): add adrianliz typescript solution (#56)
feat(graduated_tiered_pricing): add typescript solution
2 parents 3ff37e8 + 312ceeb commit 3be68c0

29 files changed

+30800
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = {
2+
parser: "@typescript-eslint/parser",
3+
extends: [
4+
"plugin:@typescript-eslint/recommended",
5+
"plugin:prettier/recommended",
6+
],
7+
plugins: ["eslint-plugin-html", "simple-import-sort", "import"],
8+
parserOptions: {
9+
ecmaVersion: 12,
10+
sourceType: "module",
11+
},
12+
rules: {
13+
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
14+
"simple-import-sort/imports": "error",
15+
"simple-import-sort/exports": "error",
16+
"import/first": "error",
17+
"import/newline-after-import": "error",
18+
"import/no-duplicates": "error",
19+
},
20+
ignorePatterns: ["webpack.*.js"],
21+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Dependency directories
9+
node_modules/
10+
11+
# Optional npm cache directory
12+
.npm
13+
14+
# Optional eslint cache
15+
.eslintcache
16+
17+
# Output of 'npm pack'
18+
*.tgz
19+
20+
# Yarn Integrity file
21+
.yarn-integrity
22+
23+
# dotenv environment variables file
24+
.env
25+
.env.test
26+
27+
# Build output
28+
dist
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 CodelyTV
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Product pricing: TypeScript
2+
3+
TypeScript codebase for the [Graduated Product pricing](../../README.md) exercise.
4+
5+
## Setup
6+
7+
```
8+
# install dependencies
9+
npm install
10+
```
11+
12+
## Testing
13+
14+
### Unit Testing
15+
16+
```
17+
npm run test
18+
```
19+
20+
### E2E Testing
21+
22+
```
23+
# run in dev mode on port 8080
24+
npm run dev
25+
26+
# open Cypress to run tests on dev mode
27+
npm run cy:open
28+
29+
# open Cypress on CLI
30+
npm run cy:run
31+
```
32+
33+
## Running the app
34+
35+
```
36+
# install dependencies
37+
npm install
38+
39+
# run in dev mode on port 8080
40+
npm run dev
41+
42+
# generate production build
43+
npm run build
44+
45+
# run generated content in dist folder on port 8080
46+
npm run start
47+
```
48+
49+
## Linting
50+
51+
```
52+
# run linter
53+
npm run lint
54+
55+
# fix lint issues
56+
npm run lint:fix
57+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"useBuiltIns": "usage",
7+
"corejs": "3.9.1"
8+
}
9+
]
10+
]
11+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"baseUrl": "http://localhost:8080",
3+
"video": false
4+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "hello@cypress.io",
4+
"body": "Fixtures are a great way to mock data for responses to routes"
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
describe("The Home Page", () => {
2+
it("successfully loads", () => {
3+
cy.visit("/");
4+
cy.findByRole("heading", { name: /productpricing/i }).should("exist");
5+
});
6+
});
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/// <reference types="cypress" />
2+
// ***********************************************************
3+
// This example plugins/index.js can be used to load plugins
4+
//
5+
// You can change the location of this file or turn off loading
6+
// the plugins file with the 'pluginsFile' configuration option.
7+
//
8+
// You can read more here:
9+
// https://on.cypress.io/plugins-guide
10+
// ***********************************************************
11+
12+
// This function is called when a project is opened or re-opened (e.g. due to
13+
// the project's config changing)
14+
15+
/**
16+
* @type {Cypress.PluginConfig}
17+
*/
18+
// eslint-disable-next-line no-unused-vars
19+
module.exports = (on, config) => {
20+
// `on` is used to hook into various events Cypress emits
21+
// `config` is the resolved Cypress config
22+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// ***********************************************
2+
// This example commands.js shows you how to
3+
// create various custom commands and overwrite
4+
// existing commands.
5+
//
6+
// For more comprehensive examples of custom
7+
// commands please read more here:
8+
// https://on.cypress.io/custom-commands
9+
// ***********************************************
10+
//
11+
//
12+
// -- This is a parent command --
13+
// Cypress.Commands.add('login', (email, password) => { ... })
14+
//
15+
//
16+
// -- This is a child command --
17+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
18+
//
19+
//
20+
// -- This is a dual command --
21+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
22+
//
23+
//
24+
// -- This will overwrite an existing command --
25+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
26+
27+
import "@testing-library/cypress/add-commands";

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /