Skip to content

Commit b943c8b

Browse files
committed
modify initial setup for development environment
1 parent 213b119 commit b943c8b

File tree

5 files changed

+318
-95
lines changed

5 files changed

+318
-95
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"@babel/react"
55
],
66
"plugins": [
7-
"@babel/plugin-transform-runtime"
7+
"@babel/plugin-transform-runtime",
8+
"@babel/plugin-proposal-class-properties"
89
]
910
}
1011

.eslintrc

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
{
2-
"extends": ["react-app", "plugin:jsx-a11y/recommended"],
2+
"extends": ["airbnb"],
33
"parser": "babel-eslint",
4-
"plugins": ["jsx-a11y"],
4+
"plugins": [
5+
"react",
6+
"jsx-a11y",
7+
"import"
8+
],
9+
"env": {
10+
"browser": true
11+
},
512
"rules": {
613
"indent": ["error", 4],
714
"quotes": ["error", "double"],
@@ -12,6 +19,10 @@
1219
"camelcase": "error",
1320
"no-return-assign": "off",
1421
"no-noninteractive-element-to-interactive-role": "off",
15-
"no-console": ["error", { "allow": ["log", "error", "warn"] }]
22+
"no-console": ["error", { "allow": ["log", "error", "warn"] }],
23+
"react/jsx-indent" : ["error", 4],
24+
"react/jsx-indent-props" : ["error", 4],
25+
"import/no-extraneous-dependencies": "off",
26+
"react/destructuring-assignment": "off"
1627
}
1728
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
},
3737
"devDependencies": {
3838
"@babel/core": "^7.0.0",
39+
"@babel/plugin-proposal-class-properties": "^7.0.0",
3940
"@babel/plugin-transform-runtime": "^7.0.0",
4041
"@babel/preset-env": "^7.0.0",
4142
"@babel/preset-react": "^7.0.0",
4243
"@material-ui/core": "^3.0.2",
43-
"babel-eslint": "^9.0.0",
44+
"babel-eslint": "^7.2.3",
4445
"babel-loader": "^8.0.2",
45-
"eslint": "^5.5.0",
46-
"eslint-config-react-app": "^2.1.0",
47-
"eslint-plugin-flowtype": "^2.50.0",
46+
"eslint": "^4.1.1",
47+
"eslint-config-airbnb": "^17.1.0",
4848
"eslint-plugin-import": "^2.14.0",
4949
"eslint-plugin-jsx-a11y": "^6.1.1",
5050
"eslint-plugin-react": "^7.11.1",

rollup.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import babel from "rollup-plugin-babel";
22
import pkg from "./package.json";
33

4+
const external = id => !id.startsWith("/") && !id.startsWith(".");
45
const getBabelOptions = () => ({
56
runtimeHelpers: true,
67
plugins: ["@babel/transform-runtime"]
@@ -14,5 +15,6 @@ export default {
1415
},
1516
plugins: [
1617
babel(getBabelOptions()),
17-
]
18+
],
19+
external
1820
}

0 commit comments

Comments
 (0)