-
-
Save adriancmiranda/984defc7dd9027bbe685b73bf15a6845 to your computer and use it in GitHub Desktop.
Revisions
-
rickyalmeidadev revised this gist
Feb 19, 2022 . 2 changed files with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ ```bash yarn create vite ``` File renamed without changes. -
rickyalmeidadev revised this gist
Feb 19, 2022 . 2 changed files with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ module.exports = { transform: { '^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/file-transformer.js', '^.+\\.(css|scss|sass|less)$': '<rootDir>/__mocks__/style-transformer.js', '^.+\\.(t|j)sx?$': [ '@swc/jest', { This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ { "lint": "eslint .", "lint:fix": "eslint . --fix", "test": "jest", "test:coverage": "jest --coverage && open coverage/lcov-report/index.html", "test:watch": "jest --watch" } -
rickyalmeidadev renamed this gist
Feb 19, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
rickyalmeidadev created this gist
Feb 19, 2022 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ { "env": { "browser": true, "es2021": true, "jest": true, "node": true }, "extends": [ "eslint:recommended", "plugin:react/recommended", "plugin:react-hooks/recommended", "plugin:testing-library/react", "plugin:jest-dom/recommended", "plugin:prettier/recommended" ], "parserOptions": { "ecmaFeatures": { "jsx": true }, "ecmaVersion": "latest", "sourceType": "module" }, "rules": { "react/react-in-jsx-scope": "off" }, "settings": { "react": { "version": "latest" } } } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ { "arrowParens": "avoid", "printWidth": 90, "singleQuote": true, "semi": false } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ ```bash yarn add --dev @swc/core @swc/jest @testing-library/jest-dom @testing-library/react @types/jest eslint eslint-config-prettier eslint-plugin-jest-dom eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-testing-library jest prettier ``` This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ module.exports = { process: () => "module.exports = 'test-file-stub'", } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ module.exports = { clearMocks: true, moduleNameMapper: { '^~/(.*)$': '<rootDir>/src/$1', }, setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], testEnvironment: 'jest-environment-jsdom', transform: { '^.+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/file-transformer.js', '^.+\\.(css|less)$': '<rootDir>/__mocks__/style-transformer.js', '^.+\\.(t|j)sx?$': [ '@swc/jest', { jsc: { parser: { syntax: 'ecmascript', jsx: true, }, transform: { react: { runtime: 'automatic', }, }, }, }, ], }, } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ import '@testing-library/jest-dom/extend-expect' This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ { "compilerOptions": { "baseUrl": ".", "paths": { "~/*": ["./src/*"] } } } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ module.exports = { process: () => 'module.exports = {}', } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ import react from '@vitejs/plugin-react' import path from 'node:path' export default { plugins: [react()], resolve: { alias: { '~': path.resolve(__dirname, 'src'), }, }, }