Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit 2ed1136

Browse files
authored
Merge pull request #66 from react-boilerplate/dev
React Boilerplate Typescript v4.1
2 parents b41e79b + c08daa4 commit 2ed1136

File tree

185 files changed

+10102
-11540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+10102
-11540
lines changed

.all-contributorsrc

Lines changed: 18 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"projectName": "react-boilerplate",
3-
"projectOwner": "react-boilerplate",
2+
"projectName": "react-boilerplate-typescript",
3+
"projectOwner": "react-boilerplate-typescript",
44
"repoType": "github",
55
"repoHost": "https://github.com",
66
"files": [
@@ -10,10 +10,10 @@
1010
"commit": true,
1111
"contributors": [
1212
{
13-
"login": "mxstbr",
14-
"name": "Max Stoiber",
15-
"avatar_url": "https://avatars0.githubusercontent.com/u/7525670?v=4",
16-
"profile": "https://mxstbr.com",
13+
"login": "Can-Sahin",
14+
"name": "Can Sahin",
15+
"avatar_url": "https://avatars2.githubusercontent.com/u/33245689?v=4",
16+
"profile": "https://github.com/Can-Sahin",
1717
"contributions": [
1818
"code",
1919
"doc",
@@ -23,152 +23,26 @@
2323
]
2424
},
2525
{
26-
"login": "julienben",
27-
"name": "Julien Benchetrit",
28-
"avatar_url": "https://avatars2.githubusercontent.com/u/8948127?v=4",
29-
"profile": "https://julien.engineering/",
30-
"contributions": [
31-
"code",
32-
"question",
33-
"doc",
34-
"review",
35-
"maintenance"
36-
]
37-
},
38-
{
39-
"login": "gretzky",
40-
"name": "Sara Federico",
41-
"avatar_url": "https://avatars1.githubusercontent.com/u/15176096?v=4",
42-
"profile": "http://sarafederi.co",
43-
"contributions": [
44-
"code",
45-
"review",
46-
"question",
47-
"doc",
48-
"maintenance"
49-
]
50-
},
51-
{
52-
"login": "justingreenberg",
53-
"name": "Justin Greenberg",
54-
"avatar_url": "https://avatars1.githubusercontent.com/u/1539088?v=4",
55-
"profile": "https://justingreenberg.com",
26+
"login": "GrayStrider",
27+
"name": "Gray Strider",
28+
"avatar_url": "https://avatars0.githubusercontent.com/u/43771776?s=460&v=4",
29+
"profile": "https://github.com/GrayStrider",
5630
"contributions": [
5731
"code",
32+
"tool",
5833
"review"
5934
]
6035
},
6136
{
62-
"login": "jwinn",
63-
"name": "Jon Winn",
64-
"avatar_url": "https://avatars3.githubusercontent.com/u/891726?v=4",
65-
"profile": "https://github.com/jwinn",
66-
"contributions": [
67-
"code",
68-
"review"
69-
]
70-
},
71-
{
72-
"login": "Mensae",
73-
"name": "Johan Meester",
74-
"avatar_url": "https://avatars2.githubusercontent.com/u/474743?v=4",
75-
"profile": "https://meester-johan.info/",
76-
"contributions": [
77-
"code",
78-
"test",
79-
"doc"
80-
]
81-
},
82-
{
83-
"login": "Dattaya",
84-
"name": "Yaroslav Kiliba",
85-
"avatar_url": "https://avatars3.githubusercontent.com/u/387256?v=4",
86-
"profile": "https://github.com/Dattaya",
87-
"contributions": [
88-
"code"
89-
]
90-
},
91-
{
92-
"login": "gihrig",
93-
"name": "Glen Ihrig",
94-
"avatar_url": "https://avatars2.githubusercontent.com/u/1481063?v=4",
95-
"profile": "https://github.com/gihrig",
96-
"contributions": [
97-
"code"
98-
]
99-
},
100-
{
101-
"login": "somus",
102-
"name": "Somasundaram Ayyappan",
103-
"avatar_url": "https://avatars3.githubusercontent.com/u/1802828?v=4",
104-
"profile": "https://github.com/somus",
105-
"contributions": [
106-
"code"
107-
]
108-
},
109-
{
110-
"login": "oliverturner",
111-
"name": "Oliver Turner",
112-
"avatar_url": "https://avatars0.githubusercontent.com/u/21795?v=4",
113-
"profile": "https://www.codedsignal.co.uk/",
114-
"contributions": [
115-
"code"
116-
]
117-
},
118-
{
119-
"login": "samit4me",
120-
"name": "Samuel Sharpe",
121-
"avatar_url": "https://avatars3.githubusercontent.com/u/3248531?v=4",
122-
"profile": "https://github.com/samit4me",
123-
"contributions": [
124-
"code"
125-
]
126-
},
127-
{
128-
"login": "KarandikarMihir",
129-
"name": "Mihir Karandikar",
130-
"avatar_url": "https://avatars3.githubusercontent.com/u/17466938?v=4",
131-
"profile": "https://karandikarmihir.github.io/",
132-
"contributions": [
133-
"code"
134-
]
135-
},
136-
{
137-
"login": "v",
138-
"name": "Vaibhav Verma",
139-
"avatar_url": "https://avatars2.githubusercontent.com/u/627846?v=4",
140-
"profile": "http://www.vverma.net",
141-
"contributions": [
142-
"code"
143-
]
144-
},
145-
{
146-
"login": "sedubois",
147-
"name": "Sébastien Dubois",
148-
"avatar_url": "https://avatars1.githubusercontent.com/u/4217871?v=4",
149-
"profile": "https://imagineclarity.com",
150-
"contributions": [
151-
"code"
152-
]
153-
},
154-
{
155-
"login": "chaintng",
156-
"name": "Chainarong Tangsurakit",
157-
"avatar_url": "https://avatars2.githubusercontent.com/u/2979072?v=4",
158-
"profile": "https://www.chaintng.com",
159-
"contributions": [
160-
"code"
161-
]
162-
},
163-
{
164-
"login": "amilajack",
165-
"name": "Amila Welihinda",
166-
"avatar_url": "https://avatars1.githubusercontent.com/u/6374832?v=4",
167-
"profile": "https://amilajack.com",
37+
"login": "rajatkantinandi",
38+
"name": "Rajat Kanti Nandi",
39+
"avatar_url": "https://avatars1.githubusercontent.com/u/17743895?v=4",
40+
"profile": "https://twitter.com/rajatkantinandi",
16841
"contributions": [
169-
"code"
42+
"tool"
17043
]
17144
}
17245
],
173-
"contributorsPerLine": 8
46+
"contributorsPerLine": 8,
47+
"commitConvention": "none"
17448
}

.eslintignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
internals/scripts
2+
internals/generators
3+
internals/templates
4+
server/
5+
*.html
6+
node_modules
7+
coverage
8+
build
9+
node_modules

.eslintrc.js

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,21 @@ const prettierOptions = JSON.parse(
66
);
77

88
module.exports = {
9-
parser: 'babel-eslint',
10-
extends: ['airbnb', 'prettier', 'prettier/react'],
11-
plugins: ['prettier', 'redux-saga', 'react', 'react-hooks', 'jsx-a11y'],
9+
parser: '@typescript-eslint/parser',
10+
extends: [
11+
'airbnb-typescript',
12+
'prettier',
13+
'prettier/react',
14+
'prettier/@typescript-eslint'
15+
],
16+
plugins: [
17+
'prettier',
18+
'redux-saga',
19+
'react',
20+
'react-hooks',
21+
'jsx-a11y',
22+
'@typescript-eslint',
23+
],
1224
env: {
1325
jest: true,
1426
browser: true,
@@ -21,19 +33,47 @@ module.exports = {
2133
ecmaFeatures: {
2234
jsx: true,
2335
},
36+
project: './tsconfig.eslint.json',
2437
},
2538
rules: {
39+
'jsx-no-lambda': 0,
40+
semi: [2, 'always'],
41+
'@typescript-eslint/interface-name-prefix': 0,
42+
'@typescript-eslint/no-empty-interface': 0,
43+
'object-shorthand': [0, 'never'],
44+
quotes: [2, 'single'],
45+
'@typescript-eslint/no-var-requires': 0,
46+
'member-ordering': 0,
47+
'object-literal-sort-keys': 0,
48+
'no-shadowed-variable': 0,
49+
'no-consecutive-blank-lines': 0,
50+
'no-string-literal': 0,
51+
'jsx-no-multiline-js': 0,
52+
'jsx-boolean-value': 0,
53+
'arrow-parens': 0,
54+
'no-implicit-dependencies': 0,
55+
'no-submodule-imports': 0,
56+
'no-case-declarations': 1,
57+
'@typescript-eslint/no-empty-function': 0,
58+
'@typescript-eslint/ban-ts-ignore': 1,
59+
'@typescript-eslint/indent': 0,
60+
'jsx-alignment': 0,
61+
'jsx-wrap-multiline': 0,
62+
'@typescript-eslint/camelcase': 0,
2663
'prettier/prettier': ['error', prettierOptions],
2764
'arrow-body-style': [2, 'as-needed'],
2865
'class-methods-use-this': 0,
66+
'import/order': 0,
2967
'import/imports-first': 0,
3068
'import/newline-after-import': 0,
3169
'import/no-dynamic-require': 0,
3270
'import/no-extraneous-dependencies': 0,
3371
'import/no-named-as-default': 0,
34-
'import/no-unresolved': 2,
72+
'import/no-unresolved': [2, { caseSensitive: false }], // ts already checks case sensitive imports
3573
'import/no-webpack-loader-syntax': 0,
3674
'import/prefer-default-export': 0,
75+
'import/no-cycle': 1,
76+
'no-param-reassign': 1,
3777
indent: [
3878
2,
3979
2,
@@ -60,7 +100,6 @@ module.exports = {
60100
'newline-per-chained-call': 0,
61101
'no-confusing-arrow': 0,
62102
'no-console': 1,
63-
'no-unused-vars': 2,
64103
'no-use-before-define': 0,
65104
'prefer-template': 2,
66105
'react/destructuring-assignment': 0,
@@ -70,7 +109,9 @@ module.exports = {
70109
'react/jsx-first-prop-new-line': [2, 'multiline'],
71110
'react/jsx-filename-extension': 0,
72111
'react/jsx-no-target-blank': 0,
112+
'react/jsx-props-no-spreading': 0,
73113
'react/jsx-uses-vars': 2,
114+
'react/prop-types': 0,
74115
'react/require-default-props': 0,
75116
'react/require-extension': 0,
76117
'react/self-closing-comp': 0,
@@ -80,10 +121,18 @@ module.exports = {
80121
'require-yield': 0,
81122
},
82123
settings: {
124+
'import/parsers': {
125+
'@typescript-eslint/parser': ['.ts', '.tsx'],
126+
},
83127
'import/resolver': {
84128
webpack: {
85129
config: './internals/webpack/webpack.prod.babel.js',
86130
},
131+
typescript: {
132+
alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
133+
directory: './tsconfig.json',
134+
},
87135
},
136+
'import/ignore': ['types'], // Weirdly eslint cannot resolve exports in types folder (try removing this later)
88137
},
89138
};

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Global owners
2+
* @Can-Sahin

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact = true

.prettierrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"useTabs": false,
55
"semi": true,
66
"singleQuote": true,
7-
"trailingComma": "all"
7+
"trailingComma": "all",
8+
"arrowParens": "avoid"
89
}

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
language: node_js
22

33
node_js:
4-
- 'node'
5-
- 'lts/*'
4+
- "node"
5+
- "lts/*"
66

77
services:
88
- xvfb
99

1010
script:
11-
# - node ./internals/scripts/generate-templates-for-linting
11+
- node ./internals/scripts/generate-templates-for-linting
1212
- npm test -- --maxWorkers=4
1313
- npm run build
1414

@@ -20,7 +20,7 @@ notifications:
2020
email:
2121
on_failure: change
2222

23-
after_success: 'npm run coveralls'
23+
after_success: "npm run coveralls"
2424

2525
cache:
2626
directories:

0 commit comments

Comments
 (0)