Skip to content

Commit 21d672b

Browse files
committed
2 parents 07a9b3f + 97d4340 commit 21d672b

File tree

10 files changed

+70
-39
lines changed

10 files changed

+70
-39
lines changed

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: 🐛 Bug report
3+
about: Report to bug or error!
4+
---
5+
6+
## Description
7+
8+
### Bug Environment
9+
10+
### Current
11+
12+
### Expected
13+
14+
### Reference

.github/ISSUE_TEMPLATE/Enhancement.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: 🌈 Enhancement
3+
about: Things you might want to try to improve or add to in your extension.
4+
---
5+
6+
## Description
7+
8+
### Request Feature
9+
10+
### Reference

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
![cra-template-unicorn_logo](./assets/logo.png)
1+
<div align="center">
2+
<img src="./assets/logo.png" width="520px">
3+
</div>
4+
25

36
# cra-template-unicorn
47

@@ -28,16 +31,18 @@ yarn create react-app my-app --template unicorn
2831

2932
## In this template
3033

34+
- [TypeScript 3.7.x version](https://github.com/microsoft/TypeScript)
3135
- [craco](https://github.com/gsoft-inc/craco)
3236
- [redux-toolkit](https://github.com/reduxjs/redux-toolkit)
33-
- [react-redux](https://github.com/reduxjs/react-redux)
37+
- [react-redux 7.1.x](https://github.com/reduxjs/react-redux)
3438
- [react-router](https://github.com/ReactTraining/react-router)
3539

3640
## Support
3741

42+
- Support absolute path with TypeScript
3843
- Support VSCode Integration
3944
- Support reset.css
40-
- Support absolute path
45+
- Support prettier
4146
- Customize config with craco
4247
- Customize eslint config > [link](https://create-react-app.dev/docs/advanced-configuration)
4348

@@ -46,7 +51,8 @@ yarn create react-app my-app --template unicorn
4651
Give a ⭐️ if this project helped you!
4752

4853
<div align="center">
49-
50-
<sub><sup>Written by <a href="https://github.com/JaeYeopHan">@Jbee</a></sup></sub><small>✌</small>
51-
54+
<sub>
55+
<sup>Written by <a href="https://github.com/JaeYeopHan">@Jbee</a></sup>
56+
</sub>
57+
<small>✌</small>
5258
</div>

template/.vscode/settings.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"eslint.options": {
66
"extensions": [".html", ".ts", ".js", ".tsx"]
77
},
8-
"editor.codeActionsOnSave": {
9-
"source.fixAll.eslint": true
10-
},
118
"files.autoSaveDelay": 500,
129
"eslint.packageManager": "yarn",
13-
"typescript.tsdk": "node_modules/typescript/lib"
10+
"typescript.tsdk": "node_modules/typescript/lib",
11+
"editor.codeActionsOnSave": {
12+
"source.fixAll.eslint": true
13+
}
1414
}

template/src/components/App.test.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import React from "react";
2-
import { render } from "@testing-library/react";
3-
import App from "./App";
1+
import { render } from '@testing-library/react'
2+
import React from 'react'
43

5-
test("renders learn react link", () => {
6-
const { getByText } = render(<App />);
7-
const linkElement = getByText(/learn react/i);
8-
expect(linkElement).toBeInTheDocument();
9-
});
4+
import App from './App'
5+
6+
test('renders learn react link', () => {
7+
const { getByText } = render(<App />)
8+
const linkElement = getByText(/learn react/i)
9+
expect(linkElement).toBeInTheDocument()
10+
})

template/src/components/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react";
1+
import React from 'react'
22

33
export default () => {
44
return (
@@ -11,5 +11,5 @@ export default () => {
1111
cra-template-unicorn
1212
</a>
1313
</h1>
14-
);
15-
};
14+
)
15+
}

template/src/features/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { combineReducers } from "@reduxjs/toolkit";
2-
import { configureStore } from "@reduxjs/toolkit";
1+
import { combineReducers } from '@reduxjs/toolkit'
2+
import { configureStore } from '@reduxjs/toolkit'
33

4-
const rootReducer = combineReducers({});
4+
const rootReducer = combineReducers({})
55

6-
const store = configureStore({ reducer: rootReducer });
6+
const store = configureStore({ reducer: rootReducer })
77

8-
export type RootState = ReturnType<typeof rootReducer>;
9-
export default store;
8+
export type RootState = ReturnType<typeof rootReducer>
9+
export default store

template/src/index.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import React from "react";
2-
import ReactDOM from "react-dom";
3-
import { Provider } from "react-redux";
4-
import { Router } from "react-router-dom";
1+
import React from 'react'
2+
import ReactDOM from 'react-dom'
3+
import { Provider } from 'react-redux'
4+
import { Router } from 'react-router-dom'
55

6-
import App from "@/components/App";
7-
import store from "@/features";
8-
import history from "@/utils/history";
6+
import App from '@/components/App'
7+
import store from '@/features'
8+
import history from '@/utils/history'
99

1010
ReactDOM.render(
1111
<Provider store={store}>
1212
<Router history={history}>
1313
<App />
1414
</Router>
1515
</Provider>,
16-
document.getElementById("root")
17-
);
16+
document.getElementById('root'),
17+
)

template/src/setupTests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// allows you to do things like:
33
// expect(element).toHaveTextContent(/react/i)
44
// learn more: https://github.com/testing-library/jest-dom
5-
import '@testing-library/jest-dom/extend-expect';
5+
import '@testing-library/jest-dom/extend-expect'

template/src/utils/history.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { createBrowserHistory } from "history";
1+
import { createBrowserHistory } from 'history'
22

3-
export default createBrowserHistory();
3+
export default createBrowserHistory()

0 commit comments

Comments
 (0)