@ceylar/ada 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/eslint.config.mjs +1 -5
- package/package.json +1 -1
- package/src/cli/commands/init.ts +7 -1
- package/src/index.ts +3 -1
package/eslint.config.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import js from '@eslint/js';
|
|
2
|
+
|
|
2
3
|
import react from 'eslint-plugin-react';
|
|
3
4
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
4
5
|
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
@@ -20,16 +21,11 @@ export default ts.config(
|
|
|
20
21
|
'prefer-const': 'error',
|
|
21
22
|
'no-else-return': 'error',
|
|
22
23
|
|
|
23
|
-
'react-hooks/exhaustive-deps': 'off',
|
|
24
|
-
|
|
25
|
-
'no-console': 'warn',
|
|
26
|
-
|
|
27
24
|
'simple-import-sort/exports': 'error',
|
|
28
25
|
'simple-import-sort/imports': [
|
|
29
26
|
'error',
|
|
30
27
|
{
|
|
31
28
|
groups: [
|
|
32
|
-
['^react', '^@?\\w'],
|
|
33
29
|
['^@(([\\/.]?\\w)|assets|test-utils)'],
|
|
34
30
|
['^\\u0000'],
|
|
35
31
|
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
|
package/package.json
CHANGED
package/src/cli/commands/init.ts
CHANGED
|
@@ -91,7 +91,13 @@ const init: AppCommand<typeof initSchema> = {
|
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
Object.entries(rest)
|
|
94
|
+
const initOptions = Object.entries(rest);
|
|
95
|
+
|
|
96
|
+
if (initOptions.length === 0) {
|
|
97
|
+
return logger.error('Specify at least one of the instrument to setup.');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
initOptions.forEach(([key, value]) => {
|
|
95
101
|
if (value) {
|
|
96
102
|
setupFunctionsDictionary[key as keyof typeof rest](manager);
|
|
97
103
|
}
|
package/src/index.ts
CHANGED
|
@@ -11,7 +11,9 @@ program.name('ada');
|
|
|
11
11
|
program.version(packageJSON.version);
|
|
12
12
|
|
|
13
13
|
Object.values(commands).map((command) => {
|
|
14
|
-
const currentCommand = program.command(command.name, {
|
|
14
|
+
const currentCommand = program.command(command.name, {
|
|
15
|
+
isDefault: command.isDefault
|
|
16
|
+
});
|
|
15
17
|
|
|
16
18
|
currentCommand.description(command.description);
|
|
17
19
|
|