Skip to content

Commit 9795263

Browse files
committed
Refined formatting, added editor config
1 parent 552e991 commit 9795263

File tree

6 files changed

+42
-29
lines changed

6 files changed

+42
-29
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[*]
2+
charset = utf-8
3+
insert_final_newline = true
4+
trim_trailing_whitespace = false
5+
end_of_line = lf
6+
indent_style = tab
7+
indent_size = 2
8+
max_line_length = 120

.eslintrc.json

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
11
{
2-
"env": {
3-
"es2021": true,
4-
"node": true
5-
},
6-
"extends": "airbnb-base",
7-
"overrides": [
8-
],
9-
"parserOptions": {
10-
"ecmaVersion": "latest",
11-
"sourceType": "module"
12-
},
13-
"rules": {
14-
"max-classes-per-file": ["error", 2],
15-
"no-underscore-dangle": ["off"]
16-
}
17-
}
2+
"extends": [
3+
"standard"
4+
],
5+
"rules": {
6+
"indent": [
7+
"error",
8+
"tab",
9+
{ "SwitchCase": 1 }
10+
],
11+
"no-unused-vars": "off",
12+
"semi": ["error", "always"],
13+
"no-tabs": ["error", { "allowIndentationTabs": true }],
14+
"object-curly-spacing": ["error", "always"],
15+
"space-before-function-paren": ["error", {
16+
"anonymous": "never",
17+
"named": "never",
18+
"asyncArrow": "never"
19+
}],
20+
"no-trailing-spaces": [
21+
"error",
22+
{
23+
"skipBlankLines": true,
24+
"ignoreComments": true
25+
}
26+
]
27+
}
28+
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"@changesets/cli": "^2.23.0",
3434
"eslint": "^8.32.0",
3535
"eslint-config-airbnb-base": "^15.0.0",
36-
"eslint-plugin-import": "^2.27.5",
3736
"jsdoc-to-markdown": "^7.1.1",
3837
"nodemon": "^2.0.20"
3938
}

packages/launchpad/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ launchFromCli(import.meta, {
7070
break;
7171
}
7272
}
73-
7473
}).catch(err => {
7574
if (err) {
7675
console.error('Launch error', err);

packages/launchpad/lib/launchpad-core.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ export class LaunchpadCore {
4848
this._content = new LaunchpadContent(this._config.content, this._logger);
4949
this._monitor = new LaunchpadMonitor(this._config.monitor, this._logger);
5050

51-
this._commands.add(new Command({name: 'startup', callback: this._runStartup}));
52-
this._commands.add(new Command({name: 'shutdown', callback: this._runShutdown}));
53-
this._commands.add(new Command({name: 'start-apps', callback: this._runStartApps}));
54-
this._commands.add(new Command({name: 'stop-apps', callback: this._runStopApps}));
55-
this._commands.add(new Command({name: 'update-content', callback: this._runUpdateContent}));
51+
this._commands.add(new Command({ name: 'startup', callback: this._runStartup }));
52+
this._commands.add(new Command({ name: 'shutdown', callback: this._runShutdown }));
53+
this._commands.add(new Command({ name: 'start-apps', callback: this._runStartApps }));
54+
this._commands.add(new Command({ name: 'stop-apps', callback: this._runStopApps }));
55+
this._commands.add(new Command({ name: 'update-content', callback: this._runUpdateContent }));
5656

5757
this._commands.addCommandHooks(this._config.hooks);
5858

@@ -133,7 +133,6 @@ export class LaunchpadCore {
133133
this._logger.close();
134134

135135
process.exit(isNaN(+eventOrExitCode) ? 1 : +eventOrExitCode);
136-
137136
} catch (err) {
138137
this._logger.error('Unhandled exit exception:');
139138
this._logger.error(err);
@@ -191,10 +190,6 @@ export class LaunchpadCore {
191190
await this._runStartApps();
192191
}
193192
}
194-
195-
_initHooks() {
196-
// for (const hook)
197-
}
198193
}
199194

200-
export default LaunchpadCore;
195+
export default LaunchpadCore;

packages/launchpad/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@bluecadet/launchpad-monitor": "~1.6.0",
4949
"@bluecadet/launchpad-scaffold": "~1.6.0",
5050
"@bluecadet/launchpad-content": "~1.9.0",
51+
"auto-bind": "^5.0.1",
5152
"chalk": "^5.0.0",
5253
"fs-extra": "^10.0.0"
5354
},

0 commit comments

Comments
 (0)