├── .env.example ├── .eslintrc ├── .gitignore ├── .husky └── pre-commit ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── babel.config.json ├── index.html ├── jest.config.ts ├── jest.setup.ts ├── package.json ├── postcss.config.js ├── public └── vite.svg ├── src ├── App.test.tsx ├── App.tsx ├── assets │ └── react.svg ├── globals.css ├── main.tsx └── vite-env.d.ts ├── tailwind.config.js ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts /.env.example: -------------------------------------------------------------------------------- 1 | # .env.development | .env.staging | .env.production 2 | 3 | # VITE_ prefix is required 4 | 5 | # how to use (1 OR 2): 6 | # (1) import.meta.env.VITE_DISCORD 7 | # (2) process.env.VITE_DISCORD 8 | 9 | # example 10 | # VITE_DISCORD=https://bit.ly/GentlemanProgramming 11 | # VITE_WIKI=https://bit.ly/gentleman-wiki 12 | # VITE_GITHUB=https://github.com/joer9514 -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2022": true, 5 | "node": true, 6 | "jest": true 7 | }, 8 | "globals": { "JSX": true }, 9 | "settings": { 10 | "react": { "version": "detect" } 11 | }, 12 | "extends": [ 13 | "standard-with-typescript", 14 | "plugin:react/recommended", 15 | "plugin:react-hooks/recommended", 16 | "plugin:react/jsx-runtime", 17 | "plugin:prettier/recommended" 18 | ], 19 | "parser": "@typescript-eslint/parser", 20 | "overrides": [], 21 | "parserOptions": { 22 | "ecmaFeatures": { 23 | "jsx": true 24 | }, 25 | "ecmaVersion": "latest", 26 | "sourceType": "module", 27 | "project": ["./tsconfig.json"] 28 | }, 29 | "plugins": ["react", "react-refresh"], 30 | "rules": { 31 | "@typescript-eslint/explicit-function-return-type": "off", 32 | "@typescript-eslint/triple-slash-reference": "off", 33 | "@typescript-eslint/strict-boolean-expressions": "off", 34 | "@typescript-eslint/no-floating-promises": "off", 35 | "@typescript-eslint/no-confusing-void-expression": "off", 36 | "react-hooks/exhaustive-deps": "off" 37 | }, 38 | "ignorePatterns": [ 39 | "node_modules", 40 | "dist", 41 | "vite.config.ts", 42 | "jest.config.ts", 43 | "jest.setup.ts", 44 | ".eslintrc", 45 | "tailwind.config.js", 46 | "postcss.config.js" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.toptal.com/developers/gitignore/api/windows,macos,linux,visualstudiocode,webstorm,node,react,sass,sublimetext 2 | # Edit at https://www.toptal.com/developers/gitignore?templates=windows,macos,linux,visualstudiocode,webstorm,node,react,sass,sublimetext 3 | 4 | ### Linux ### 5 | *~ 6 | 7 | # temporary files which can be created if a process still has a handle open of a deleted file 8 | .fuse_hidden* 9 | 10 | # KDE directory preferences 11 | .directory 12 | 13 | # Linux trash folder which might appear on any partition or disk 14 | .Trash-* 15 | 16 | # .nfs files are created when an open file is removed but is still being accessed 17 | .nfs* 18 | 19 | ### macOS ### 20 | # General 21 | .DS_Store 22 | .AppleDouble 23 | .LSOverride 24 | 25 | # Icon must end with two \r 26 | Icon 27 | 28 | 29 | # Thumbnails 30 | ._* 31 | 32 | # Files that might appear in the root of a volume 33 | .DocumentRevisions-V100 34 | .fseventsd 35 | .Spotlight-V100 36 | .TemporaryItems 37 | .Trashes 38 | .VolumeIcon.icns 39 | .com.apple.timemachine.donotpresent 40 | 41 | # Directories potentially created on remote AFP share 42 | .AppleDB 43 | .AppleDesktop 44 | Network Trash Folder 45 | Temporary Items 46 | .apdisk 47 | 48 | ### macOS Patch ### 49 | # iCloud generated files 50 | *.icloud 51 | 52 | ### Node ### 53 | # Logs 54 | logs 55 | *.log 56 | npm-debug.log* 57 | package-lock.json 58 | yarn-debug.log* 59 | yarn-error.log* 60 | yarn.lock 61 | lerna-debug.log* 62 | .pnpm-debug.log* 63 | pnpm-lock.yaml 64 | 65 | # Diagnostic reports (https://nodejs.org/api/report.html) 66 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 67 | 68 | # Runtime data 69 | pids 70 | *.pid 71 | *.seed 72 | *.pid.lock 73 | 74 | # Directory for instrumented libs generated by jscoverage/JSCover 75 | lib-cov 76 | 77 | # Coverage directory used by tools like istanbul 78 | coverage 79 | *.lcov 80 | 81 | # nyc test coverage 82 | .nyc_output 83 | 84 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 85 | .grunt 86 | 87 | # Bower dependency directory (https://bower.io/) 88 | bower_components 89 | 90 | # node-waf configuration 91 | .lock-wscript 92 | 93 | # Compiled binary addons (https://nodejs.org/api/addons.html) 94 | build/Release 95 | 96 | # Dependency directories 97 | node_modules/ 98 | jspm_packages/ 99 | 100 | # Snowpack dependency directory (https://snowpack.dev/) 101 | web_modules/ 102 | 103 | # TypeScript cache 104 | *.tsbuildinfo 105 | 106 | # Optional npm cache directory 107 | .npm 108 | 109 | # Optional eslint cache 110 | .eslintcache 111 | 112 | # Optional stylelint cache 113 | .stylelintcache 114 | 115 | # Microbundle cache 116 | .rpt2_cache/ 117 | .rts2_cache_cjs/ 118 | .rts2_cache_es/ 119 | .rts2_cache_umd/ 120 | 121 | # Optional REPL history 122 | .node_repl_history 123 | 124 | # Output of 'npm pack' 125 | *.tgz 126 | 127 | # Yarn Integrity file 128 | .yarn-integrity 129 | 130 | # dotenv environment variable files 131 | .env 132 | .env.local 133 | 134 | .env.development 135 | .env.development.local 136 | 137 | .env.production 138 | .env.production.local 139 | 140 | .env.staging 141 | .env.staging.local 142 | 143 | .env.test 144 | .env.test.local 145 | 146 | # parcel-bundler cache (https://parceljs.org/) 147 | .cache 148 | .parcel-cache 149 | 150 | # Next.js build output 151 | .next 152 | out 153 | 154 | # Nuxt.js build / generate output 155 | .nuxt 156 | dist 157 | 158 | # Gatsby files 159 | .cache/ 160 | # Comment in the public line in if your project uses Gatsby and not Next.js 161 | # https://nextjs.org/blog/next-9-1#public-directory-support 162 | # public 163 | 164 | # vuepress build output 165 | .vuepress/dist 166 | 167 | # vuepress v2.x temp and cache directory 168 | .temp 169 | 170 | # Docusaurus cache and generated files 171 | .docusaurus 172 | 173 | # Serverless directories 174 | .serverless/ 175 | 176 | # FuseBox cache 177 | .fusebox/ 178 | 179 | # DynamoDB Local files 180 | .dynamodb/ 181 | 182 | # TernJS port file 183 | .tern-port 184 | 185 | # Stores VSCode versions used for testing VSCode extensions 186 | .vscode-test 187 | 188 | # yarn v2 189 | .yarn/cache 190 | .yarn/unplugged 191 | .yarn/build-state.yml 192 | .yarn/install-state.gz 193 | .pnp.* 194 | 195 | ### Node Patch ### 196 | # Serverless Webpack directories 197 | .webpack/ 198 | 199 | # Optional stylelint cache 200 | 201 | # SvelteKit build / generate output 202 | .svelte-kit 203 | 204 | ### react ### 205 | .DS_* 206 | **/*.backup.* 207 | **/*.back.* 208 | 209 | node_modules 210 | 211 | *.sublime* 212 | 213 | psd 214 | thumb 215 | sketch 216 | 217 | ### Sass ### 218 | .sass-cache/ 219 | *.css.map 220 | *.sass.map 221 | *.scss.map 222 | 223 | ### SublimeText ### 224 | # Cache files for Sublime Text 225 | *.tmlanguage.cache 226 | *.tmPreferences.cache 227 | *.stTheme.cache 228 | 229 | # Workspace files are user-specific 230 | *.sublime-workspace 231 | 232 | # Project files should be checked into the repository, unless a significant 233 | # proportion of contributors will probably not be using Sublime Text 234 | # *.sublime-project 235 | 236 | # SFTP configuration file 237 | sftp-config.json 238 | sftp-config-alt*.json 239 | 240 | # Package control specific files 241 | Package Control.last-run 242 | Package Control.ca-list 243 | Package Control.ca-bundle 244 | Package Control.system-ca-bundle 245 | Package Control.cache/ 246 | Package Control.ca-certs/ 247 | Package Control.merged-ca-bundle 248 | Package Control.user-ca-bundle 249 | oscrypto-ca-bundle.crt 250 | bh_unicode_properties.cache 251 | 252 | # Sublime-github package stores a github token in this file 253 | # https://packagecontrol.io/packages/sublime-github 254 | GitHub.sublime-settings 255 | 256 | ### VisualStudioCode ### 257 | .vscode/* 258 | !.vscode/settings.json 259 | !.vscode/tasks.json 260 | !.vscode/launch.json 261 | !.vscode/extensions.json 262 | !.vscode/*.code-snippets 263 | 264 | # Local History for Visual Studio Code 265 | .history/ 266 | 267 | # Built Visual Studio Code Extensions 268 | *.vsix 269 | 270 | ### VisualStudioCode Patch ### 271 | # Ignore all local history of files 272 | .history 273 | .ionide 274 | 275 | ### WebStorm ### 276 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 277 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 278 | 279 | # User-specific stuff 280 | .idea/**/workspace.xml 281 | .idea/**/tasks.xml 282 | .idea/**/usage.statistics.xml 283 | .idea/**/dictionaries 284 | .idea/**/shelf 285 | 286 | # AWS User-specific 287 | .idea/**/aws.xml 288 | 289 | # Generated files 290 | .idea/**/contentModel.xml 291 | 292 | # Sensitive or high-churn files 293 | .idea/**/dataSources/ 294 | .idea/**/dataSources.ids 295 | .idea/**/dataSources.local.xml 296 | .idea/**/sqlDataSources.xml 297 | .idea/**/dynamic.xml 298 | .idea/**/uiDesigner.xml 299 | .idea/**/dbnavigator.xml 300 | 301 | # Gradle 302 | .idea/**/gradle.xml 303 | .idea/**/libraries 304 | 305 | # Gradle and Maven with auto-import 306 | # When using Gradle or Maven with auto-import, you should exclude module files, 307 | # since they will be recreated, and may cause churn. Uncomment if using 308 | # auto-import. 309 | # .idea/artifacts 310 | # .idea/compiler.xml 311 | # .idea/jarRepositories.xml 312 | # .idea/modules.xml 313 | # .idea/*.iml 314 | # .idea/modules 315 | # *.iml 316 | # *.ipr 317 | 318 | # CMake 319 | cmake-build-*/ 320 | 321 | # Mongo Explorer plugin 322 | .idea/**/mongoSettings.xml 323 | 324 | # File-based project format 325 | *.iws 326 | 327 | # IntelliJ 328 | out/ 329 | 330 | # mpeltonen/sbt-idea plugin 331 | .idea_modules/ 332 | 333 | # JIRA plugin 334 | atlassian-ide-plugin.xml 335 | 336 | # Cursive Clojure plugin 337 | .idea/replstate.xml 338 | 339 | # SonarLint plugin 340 | .idea/sonarlint/ 341 | 342 | # Crashlytics plugin (for Android Studio and IntelliJ) 343 | com_crashlytics_export_strings.xml 344 | crashlytics.properties 345 | crashlytics-build.properties 346 | fabric.properties 347 | 348 | # Editor-based Rest Client 349 | .idea/httpRequests 350 | 351 | # Android studio 3.1+ serialized cache file 352 | .idea/caches/build_file_checksums.ser 353 | 354 | ### WebStorm Patch ### 355 | # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 356 | 357 | # *.iml 358 | # modules.xml 359 | # .idea/misc.xml 360 | # *.ipr 361 | 362 | # Sonarlint plugin 363 | # https://plugins.jetbrains.com/plugin/7973-sonarlint 364 | .idea/**/sonarlint/ 365 | 366 | # SonarQube Plugin 367 | # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin 368 | .idea/**/sonarIssues.xml 369 | 370 | # Markdown Navigator plugin 371 | # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced 372 | .idea/**/markdown-navigator.xml 373 | .idea/**/markdown-navigator-enh.xml 374 | .idea/**/markdown-navigator/ 375 | 376 | # Cache file creation bug 377 | # See https://youtrack.jetbrains.com/issue/JBR-2257 378 | .idea/$CACHE_FILE$ 379 | 380 | # CodeStream plugin 381 | # https://plugins.jetbrains.com/plugin/12206-codestream 382 | .idea/codestream.xml 383 | 384 | # Azure Toolkit for IntelliJ plugin 385 | # https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij 386 | .idea/**/azureSettings.xml 387 | 388 | ### Windows ### 389 | # Windows thumbnail cache files 390 | Thumbs.db 391 | Thumbs.db:encryptable 392 | ehthumbs.db 393 | ehthumbs_vista.db 394 | 395 | # Dump file 396 | *.stackdump 397 | 398 | # Folder config file 399 | [Dd]esktop.ini 400 | 401 | # Recycle Bin used on file shares 402 | $RECYCLE.BIN/ 403 | 404 | # Windows Installer files 405 | *.cab 406 | *.msi 407 | *.msix 408 | *.msm 409 | *.msp 410 | 411 | # Windows shortcuts 412 | *.lnk 413 | 414 | # End of https://www.toptal.com/developers/gitignore/api/windows,macos,linux,visualstudiocode,webstorm,node,react,sass,sublimetext -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | *lock* 4 | index.html -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "singleQuote": true, 4 | "jsxSingleQuote": true, 5 | "printWidth": 80, 6 | "plugins": ["prettier-plugin-tailwindcss"] 7 | } 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Jose Espinosa 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React-professional-configuration 2 | 3 | ### FREE 4 | 5 | Welcome to the most professional React configuration template you can find! 6 | 7 | This project is set up so that you only focus on the coding as I have done all the dirty work for you. You can play with the settings if you wish, but I recommend that you don't as it has very advanced and perfectly calculated settings. 8 | 9 | ## How to use this template 10 | 11 | At the top right, right where the clone button is, there is a new button so you can use this template completely from ZERO in your new project. 12 | 13 | ## How to install 14 | 15 | ```bash 16 | npm i 17 | ``` 18 | 19 | ```bash 20 | npm run dev 21 | ``` 22 | 23 | ## How to test 24 | 25 | ```bash 26 | npm run test 27 | ``` 28 | 29 | ```bash 30 | npm run test:watch 31 | ``` 32 | 33 | ## :bulb:Configurations: 34 | 35 | - React 36 | - react-swc 37 | - TypeScript 38 | - Vite 39 | - Tailwindcss 40 | - Postcss 41 | - Jest 42 | - Testing Library 43 | - Babel (for jest) 44 | - Husky 45 | - Eslint 46 | - standard js 47 | - Prettier 48 | - Clsx 49 | 50 | ## License 51 | 52 | ```txt 53 | MIT License 54 | 55 | Copyright (c) 2023 Jose Espinosa 56 | 57 | Permission is hereby granted, free of charge, to any person obtaining a copy 58 | of this software and associated documentation files (the "Software"), to deal 59 | in the Software without restriction, including without limitation the rights 60 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 61 | copies of the Software, and to permit persons to whom the Software is 62 | furnished to do so, subject to the following conditions: 63 | 64 | The above copyright notice and this permission notice shall be included in all 65 | copies or substantial portions of the Software. 66 | 67 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 68 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 69 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 70 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 71 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 72 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 73 | SOFTWARE. 74 | ``` 75 | 76 | ## Author 77 | 78 | [Jose Espinosa](https://github.com/joer9514) 79 | -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@babel/preset-env", { "targets": { "esmodules": true } }], 4 | ["@babel/preset-react", { "runtime": "automatic" }], 5 | ["@babel/preset-typescript"] 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 |