Skip to content

Commit a547139

Browse files
committed
feat: React Typecript Starter
0 parents  commit a547139

25 files changed

+12544
-0
lines changed

.babelrc

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"presets": [
3+
"@babel/typescript",
4+
"@babel/preset-react",
5+
[
6+
"@babel/preset-env",
7+
{
8+
"modules": false,
9+
"targets": {
10+
"browsers": ["last 2 versions"]
11+
},
12+
"useBuiltIns": "entry",
13+
"corejs": "3.0.0"
14+
}
15+
]
16+
],
17+
"plugins": [
18+
[
19+
"react-css-modules",
20+
{
21+
"webpackHotModuleReloading": true,
22+
"filetypes": {
23+
".scss": {
24+
"syntax": "postcss-scss"
25+
}
26+
},
27+
"generateScopedName": "[path]___[name]__[local]"
28+
}
29+
],
30+
"emotion",
31+
"lodash",
32+
"@babel/plugin-syntax-dynamic-import",
33+
"@babel/plugin-proposal-class-properties",
34+
"@babel/plugin-proposal-throw-expressions",
35+
"@babel/plugin-proposal-function-bind",
36+
[
37+
"react-hot-loader/babel",
38+
{
39+
"safetyNet": false
40+
}
41+
]
42+
]
43+
}

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
webpack

.eslintrc

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"extends": [
3+
"airbnb",
4+
"plugin:@typescript-eslint/recommended",
5+
"prettier",
6+
"prettier/@typescript-eslint"
7+
],
8+
"parser": "@typescript-eslint/parser",
9+
"plugins": [
10+
"babel",
11+
"import",
12+
"react",
13+
"compat",
14+
"promise",
15+
"prettier",
16+
"@typescript-eslint"
17+
],
18+
"env": {
19+
"node": false,
20+
"browser": true
21+
},
22+
"parserOptions": {
23+
"ecmaVersion": 2017,
24+
"sourceType": "module",
25+
"jsx": true
26+
},
27+
"settings": {
28+
"react": {
29+
"pragma": "React",
30+
"version": "16.8"
31+
},
32+
"import/resolver": {
33+
"node": {
34+
"paths": ["."],
35+
"extensions": [".js", ".ts", ".tsx"]
36+
}
37+
}
38+
},
39+
"rules": {
40+
"curly": [2, "all"],
41+
"indent": ["error", 2, { "SwitchCase": 1 }],
42+
"arrow-body-style": ["error", "as-needed"],
43+
"arrow-parens": 0,
44+
"no-underscore-dangle": 0,
45+
"comma-dangle": ["error", "never"],
46+
"no-use-before-define": "error",
47+
"no-console": "error",
48+
"no-plusplus": 0,
49+
"no-minusminus": 0,
50+
"no-unused-expressions": 0,
51+
"no-unused-vars": ["error", { "ignoreRestSiblings": true }],
52+
"object-curly-newline": 0,
53+
"function-paren-newline": 0,
54+
"no-return-await": 0,
55+
"max-params": ["error", 5],
56+
"max-depth": ["error", 3],
57+
"promise/always-return": "error",
58+
"promise/catch-or-return": "error",
59+
"promise/param-names": "error",
60+
"promise/no-return-wrap": "error",
61+
"@typescript-eslint/explicit-function-return-type": "off",
62+
"@typescript-eslint/explicit-member-accessibility": "off",
63+
"@typescript-eslint/no-explicit-any": 0,
64+
"@typescript-eslint/no-unused-vars": [
65+
"error",
66+
{ "ignoreRestSiblings": true }
67+
],
68+
"prettier/prettier": ["error"],
69+
"react/prop-types": "off",
70+
"react/jsx-filename-extension": "off"
71+
}
72+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.postcssrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"map": false,
3+
"plugins": {
4+
"postcss-plugin": {}
5+
}
6+
}

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"parser": "typescript"
4+
}

0 commit comments

Comments
 (0)