20
.eslintrc
20
.eslintrc
@ -6,10 +6,7 @@
|
||||
"plugin:import/warnings",
|
||||
"plugin:flowtype/recommended"
|
||||
],
|
||||
"plugins": [
|
||||
"prettier",
|
||||
"flowtype"
|
||||
],
|
||||
"plugins": ["prettier", "flowtype"],
|
||||
"rules": {
|
||||
"eqeqeq": 2,
|
||||
"no-unused-vars": 2,
|
||||
@ -22,7 +19,7 @@
|
||||
"import/no-unresolved": [
|
||||
"error",
|
||||
{
|
||||
"ignore": [ "slate-drop-or-paste-images" ]
|
||||
"ignore": ["slate-drop-or-paste-images"]
|
||||
}
|
||||
],
|
||||
// Flow
|
||||
@ -33,14 +30,8 @@
|
||||
"annotationStyle": "line"
|
||||
}
|
||||
],
|
||||
"flowtype/space-after-type-colon": [
|
||||
2,
|
||||
"always"
|
||||
],
|
||||
"flowtype/space-before-type-colon": [
|
||||
2,
|
||||
"never"
|
||||
],
|
||||
"flowtype/space-after-type-colon": [2, "always"],
|
||||
"flowtype/space-before-type-colon": [2, "never"],
|
||||
// Enforce that code is formatted with prettier.
|
||||
"prettier/prettier": [
|
||||
"error",
|
||||
@ -65,7 +56,8 @@
|
||||
"SLACK_REDIRECT_URI": true,
|
||||
"DEPLOYMENT": true,
|
||||
"BASE_URL": true,
|
||||
"BUGSNAG_KEY": true,
|
||||
"afterAll": true,
|
||||
"Bugsnag": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
3
app.json
3
app.json
@ -45,6 +45,9 @@
|
||||
},
|
||||
"URL": {
|
||||
"required": true
|
||||
},
|
||||
"BUGSNAG_KEY": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"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_KEY: string;
|
||||
declare var BASE_URL: string;
|
||||
declare var BUGSNAG_KEY: ?string;
|
||||
declare var DEPLOYMENT: string;
|
||||
declare var Bugsnag: any;
|
||||
|
@ -65,8 +65,8 @@ if (process.env.NODE_ENV === 'development') {
|
||||
app.use(logger());
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
bugsnag.register('ad7a85f99b1b9324a31e16732cdf3192');
|
||||
if (process.env.NODE_ENV === 'production' && process.env.BUGSNAG_KEY) {
|
||||
bugsnag.register(process.env.BUGSNAG_KEY);
|
||||
app.on('error', bugsnag.koaHandler);
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,6 @@
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</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_KEY: JSON.stringify(process.env.SLACK_KEY),
|
||||
BASE_URL: JSON.stringify(process.env.URL),
|
||||
BUGSNAG_KEY: JSON.stringify(process.env.BUGSNAG_KEY),
|
||||
DEPLOYMENT: JSON.stringify(process.env.DEPLOYMENT || 'hosted'),
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user