Skip to content

Commit

Permalink
feat: added vite + react + ts example TET-345 (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-potepa authored Nov 24, 2023
1 parent a345733 commit 3d14b5f
Show file tree
Hide file tree
Showing 20 changed files with 6,379 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
'plugin:storybook/recommended',
'@virtuslab/eslint-config-tetrisly',
],
ignorePatterns: ['examples/**/*'],
rules: {
'@typescript-eslint/no-use-before-define': [
2,
Expand Down
3 changes: 3 additions & 0 deletions examples/react-vite-ts/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@virtuslab/eslint-config-tetrisly'],
};
24 changes: 24 additions & 0 deletions examples/react-vite-ts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
4 changes: 4 additions & 0 deletions examples/react-vite-ts/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"printWidth": 80
}
4 changes: 4 additions & 0 deletions examples/react-vite-ts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Tetrisly + React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with Tetrisly for React, HMR and Tetrisly ESLint rules.

19 changes: 19 additions & 0 deletions examples/react-vite-ts/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;450;600&display=swap"
rel="stylesheet"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tetrisly + React + TypeScript + Vite</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 3d14b5f

Please sign in to comment.