This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { test, expect } from "@playwright/test"; | |
import { auto } from "auto-playwright"; | |
test("auto add items to shopping cart", async ({ page }) => { | |
test.setTimeout(120000); | |
await page.goto("https://getyourfckingsocks.com/about/"); | |
await page.waitForLoadState("domcontentloaded"); | |
// `auto` can query data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import path from 'path'; | |
import { Configuration } from 'webpack'; | |
import HtmlWebpackPlugin from 'html-webpack-plugin'; | |
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; | |
import ESLintPlugin from 'eslint-webpack-plugin'; | |
import { CleanWebpackPlugin } from 'clean-webpack-plugin'; | |
import 'webpack-dev-server'; // Imported just to avoid type error in configuration | |
const config: Configuration = { | |
mode: 'production', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import path from 'path'; | |
import { Configuration, HotModuleReplacementPlugin } from 'webpack'; | |
import HtmlWebpackPlugin from 'html-webpack-plugin'; | |
import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; | |
import ESLintPlugin from 'eslint-webpack-plugin'; | |
import 'webpack-dev-server'; // Imported just to avoid type error in configuration | |
const config: Configuration = { | |
mode: 'development', | |
output: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>React TS Boilerplate App</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is required to avoid eslint command being stuck in the process. | |
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
parser: '@typescript-eslint/parser', | |
parserOptions: { | |
ecmaVersion: 2018, | |
sourceType: 'module', | |
}, | |
plugins: ['@typescript-eslint', 'react-hooks'], | |
extends: [ | |
'plugin:react/recommended', | |
'plugin:react-hooks/recommended', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// The presets add a pre-defined set of plugins latest for latest JavaScript syntax, react and typescript. | |
{ | |
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"], | |
"plugins": [ | |
[ | |
// A plugin that enables the re-use of Babel's injected helper code to save on codesize. | |
"@babel/plugin-transform-runtime", | |
{ | |
// Adds required corejs polyfills to your production code. | |
"corejs": { "version": 3, "proposals": true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"lib": ["dom", "dom.iterable", "esnext"], | |
"allowJs": true, | |
"allowSyntheticDefaultImports": true, | |
"skipLibCheck": true, | |
"esModuleInterop": true, | |
"strict": true, | |
"forceConsistentCasingInFileNames": true, | |
"moduleResolution": "node", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
semi: true, | |
trailingComma: 'all', | |
singleQuote: true, | |
printWidth: 100, | |
tabWidth: 2, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dependencies | |
/node_modules | |
# testing | |
/coverage | |
# production | |
/build | |
/dist |
NewerOlder