20
.eslintrc
20
.eslintrc
@ -6,10 +6,7 @@
|
|||||||
"plugin:import/warnings",
|
"plugin:import/warnings",
|
||||||
"plugin:flowtype/recommended"
|
"plugin:flowtype/recommended"
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": ["prettier", "flowtype"],
|
||||||
"prettier",
|
|
||||||
"flowtype"
|
|
||||||
],
|
|
||||||
"rules": {
|
"rules": {
|
||||||
"eqeqeq": 2,
|
"eqeqeq": 2,
|
||||||
"no-unused-vars": 2,
|
"no-unused-vars": 2,
|
||||||
@ -22,7 +19,7 @@
|
|||||||
"import/no-unresolved": [
|
"import/no-unresolved": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
"ignore": [ "slate-drop-or-paste-images" ]
|
"ignore": ["slate-drop-or-paste-images"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// Flow
|
// Flow
|
||||||
@ -33,14 +30,8 @@
|
|||||||
"annotationStyle": "line"
|
"annotationStyle": "line"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"flowtype/space-after-type-colon": [
|
"flowtype/space-after-type-colon": [2, "always"],
|
||||||
2,
|
"flowtype/space-before-type-colon": [2, "never"],
|
||||||
"always"
|
|
||||||
],
|
|
||||||
"flowtype/space-before-type-colon": [
|
|
||||||
2,
|
|
||||||
"never"
|
|
||||||
],
|
|
||||||
// Enforce that code is formatted with prettier.
|
// Enforce that code is formatted with prettier.
|
||||||
"prettier/prettier": [
|
"prettier/prettier": [
|
||||||
"error",
|
"error",
|
||||||
@ -65,7 +56,8 @@
|
|||||||
"SLACK_REDIRECT_URI": true,
|
"SLACK_REDIRECT_URI": true,
|
||||||
"DEPLOYMENT": true,
|
"DEPLOYMENT": true,
|
||||||
"BASE_URL": true,
|
"BASE_URL": true,
|
||||||
|
"BUGSNAG_KEY": true,
|
||||||
"afterAll": true,
|
"afterAll": true,
|
||||||
"Bugsnag": true
|
"Bugsnag": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
app.json
3
app.json
@ -45,6 +45,9 @@
|
|||||||
},
|
},
|
||||||
"URL": {
|
"URL": {
|
||||||
"required": true
|
"required": true
|
||||||
|
},
|
||||||
|
"BUGSNAG_KEY": {
|
||||||
|
"required": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"formation": {},
|
"formation": {},
|
||||||
|
1
flow-typed/globals.js
vendored
1
flow-typed/globals.js
vendored
@ -3,5 +3,6 @@ declare var __DEV__: string;
|
|||||||
declare var SLACK_REDIRECT_URI: string;
|
declare var SLACK_REDIRECT_URI: string;
|
||||||
declare var SLACK_KEY: string;
|
declare var SLACK_KEY: string;
|
||||||
declare var BASE_URL: string;
|
declare var BASE_URL: string;
|
||||||
|
declare var BUGSNAG_KEY: ?string;
|
||||||
declare var DEPLOYMENT: string;
|
declare var DEPLOYMENT: string;
|
||||||
declare var Bugsnag: any;
|
declare var Bugsnag: any;
|
||||||
|
@ -65,8 +65,8 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
app.use(logger());
|
app.use(logger());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production' && process.env.BUGSNAG_KEY) {
|
||||||
bugsnag.register('ad7a85f99b1b9324a31e16732cdf3192');
|
bugsnag.register(process.env.BUGSNAG_KEY);
|
||||||
app.on('error', bugsnag.koaHandler);
|
app.on('error', bugsnag.koaHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,6 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
</body>
|
</body>
|
||||||
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-3.min.js" data-apikey="8165e2069605bc20ccd0792dbbfae7bf"></script>
|
<script src="//d2wy8f7a9ursnm.cloudfront.net/bugsnag-3.min.js" data-apikey="<%= BUGSNAG_KEY %>"></script>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -13,6 +13,7 @@ const definePlugin = new webpack.DefinePlugin({
|
|||||||
SLACK_REDIRECT_URI: JSON.stringify(process.env.SLACK_REDIRECT_URI),
|
SLACK_REDIRECT_URI: JSON.stringify(process.env.SLACK_REDIRECT_URI),
|
||||||
SLACK_KEY: JSON.stringify(process.env.SLACK_KEY),
|
SLACK_KEY: JSON.stringify(process.env.SLACK_KEY),
|
||||||
BASE_URL: JSON.stringify(process.env.URL),
|
BASE_URL: JSON.stringify(process.env.URL),
|
||||||
|
BUGSNAG_KEY: JSON.stringify(process.env.BUGSNAG_KEY),
|
||||||
DEPLOYMENT: JSON.stringify(process.env.DEPLOYMENT || 'hosted'),
|
DEPLOYMENT: JSON.stringify(process.env.DEPLOYMENT || 'hosted'),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user