Moved Bugsnag token into envvar

This commit is contained in:
Jori Lallo
2017-10-15 16:51:25 -07:00
parent d4dc6f2a28
commit 275e754bf1
3 changed files with 9 additions and 16 deletions

View File

@@ -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,6 +56,7 @@
"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
} }

View File

@@ -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;

View File

@@ -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);
} }