Skip to content

Commit ac82a14

Browse files
committed
Added eslint cfg
1 parent f7a14a0 commit ac82a14

File tree

6 files changed

+54
-32
lines changed

6 files changed

+54
-32
lines changed

.eslintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
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+
"no-underscore-dangle": [
15+
"error",
16+
{
17+
"allow": true
18+
}
19+
]
20+
}
21+
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@
2828
"workspaces": [
2929
"./packages/*"
3030
],
31-
"dependencies": {
31+
"devDependencies": {
3232
"@changesets/changelog-github": "^0.4.6",
3333
"@changesets/cli": "^2.23.0",
34+
"eslint": "^8.32.0",
35+
"eslint-config-airbnb-base": "^15.0.0",
36+
"eslint-plugin-import": "^2.27.5",
3437
"jsdoc-to-markdown": "^7.1.1",
3538
"nodemon": "^2.0.20"
3639
}

packages/dashboard/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
import LaunchpadDashboard from "./lib/launchpad-dashboard.js";
4-
import DashboardOptions from "./lib/dashboard-options.js";
3+
import LaunchpadDashboard from './lib/launchpad-dashboard';
4+
import DashboardOptions from './lib/dashboard-options';
55

66
export default LaunchpadDashboard;
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import DashboardOptions from './dashboard-options.js';
1+
// import DashboardOptions from './dashboard-options.js';
22

3-
export class LaunchpadDashboard {
4-
5-
}
3+
export default class LaunchpadDashboard {
64

7-
export default LaunchpadDashboard;
5+
}

packages/scaffold/index.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,44 @@ import * as path from 'path';
66
import * as url from 'url';
77

88
export class LaunchpadScaffold {
9-
constructor({
10-
filepath = './setup.bat'
11-
} = {}) {
9+
constructor({
10+
filepath = './setup.bat',
11+
} = {}) {
1212
this.filepath = filepath;
13-
this._logger = LogManager.getInstance().getLogger('scaffold');
13+
this._logger = LogManager.getInstance().getLogger('scaffold');
1414
}
1515

1616
async start() {
1717
return new Promise((resolve, reject) => {
1818
// @see https://stackoverflow.com/a/50052194/782899
1919
const dir = path.dirname(url.fileURLToPath(import.meta.url));
20-
this._logger.info('Starting Launchpad Scaffold script...');
21-
sudo.exec(`start ${path.resolve(dir, this.filepath)}`, {
22-
name: 'Launchpad Scaffold'
23-
}, (error, stdout) => {
24-
if (error) {
25-
reject(error);
26-
} else {
27-
console.log(stdout);
28-
resolve();
29-
}
30-
})
20+
this._logger.info('Starting Launchpad Scaffold script...');
21+
sudo.exec(`start ${path.resolve(dir, this.filepath)}`, {
22+
name: 'Launchpad Scaffold',
23+
}, (error, stdout) => {
24+
if (error) {
25+
reject(error);
26+
} else {
27+
console.log(stdout);
28+
resolve();
29+
}
30+
});
3131
});
3232
}
3333
}
3434

3535
export const launch = async (config) => {
3636
const scaffold = new LaunchpadScaffold(config.scaffold || config);
3737
await scaffold.start();
38-
}
38+
};
3939

4040
launchFromCli(import.meta, {
41-
relativePaths: ["launchpad-scaffold/index.js", ".bin/launchpad-scaffold"],
41+
relativePaths: ['launchpad-scaffold/index.js', '.bin/launchpad-scaffold'],
4242
})
4343
.then(launch)
4444
.catch((err) => {
4545
if (err) {
46-
console.error("Launch error", err);
46+
console.error('Launch error', err);
4747
process.exit(1);
4848
}
4949
});

packages/utils/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
export { default as onExit } from './lib/on-exit.js';
2-
export { default as execScript } from './lib/exec-script.js';
3-
export { default as launchFromCli } from './lib/launch-from-cli.js';
4-
export { default as LogManager, Logger, LogOptions } from './lib/log-manager.js';
5-
export { default as ConfigManager } from './lib/config-manager.js';
6-
export { default as TaskQueue, TaskQueueOptions, Task } from './lib/task-queue.js';
1+
export { default as onExit } from './lib/on-exit';
2+
export { default as execScript } from './lib/exec-script';
3+
export { default as launchFromCli } from './lib/launch-from-cli';
4+
export { default as LogManager, Logger, LogOptions } from './lib/log-manager';
5+
export { default as ConfigManager } from './lib/config-manager';
6+
export { default as TaskQueue, TaskQueueOptions, Task } from './lib/task-queue';

0 commit comments

Comments
 (0)