Skip to content

Commit 45a3fdf

Browse files
committed
chore: update prep for releasing ESM and yargs-based CLI as version 2.0
1 parent 2cae1fd commit 45a3fdf

File tree

11 files changed

+165
-121
lines changed

11 files changed

+165
-121
lines changed

.changeset/cuddly-ants-look.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@smartthings/cli": major
3+
---
4+
5+
refactor to use yargs

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727
parserOptions: {
2828
ecmaVersion: 2019,
2929
tsconfigRootDir: __dirname,
30-
project: ['./tsconfig.json', './tsconfig-test.json'],
30+
project: ['./tsconfig.json'],
3131
},
3232
rules: {
3333
indent: 'off',

.github/copilot-instructions.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# TypeScript Project Coding Standards
2+
3+
You are an expert TypeScript developer. When generating code for this project, adhere to the following naming conventions and architectural rules.
4+
5+
## General Guidelines
6+
- **Respond Specifically to Prompts**: Never do things not explicitly requested.
7+
8+
## Variable Naming Rules
9+
- **No Single-Letter Variables:** Never use single-letter variable names (e.g., `i`, `e`, `v`, `k`, `v`).
10+
- **Descriptive Naming:** Use clear, descriptive names that convey the intent and data type of the variable.
11+
- **Loop Iterators:** Instead of `i`, use `index`. Instead of `e`, use a specific name like `user` or `account`.
12+
- **Error Handling:** Use `error` instead of `e` in catch blocks.
13+
14+
## TypeScript Best Practices
15+
- **Strict Typing:** Avoid the `any` type if at all possible. Use `unknown` if the type is truly dynamic, or define proper `Interfaces` and `Types`.
16+
- **Functional Approach:** Prefer `map`, `filter`, and `reduce` over traditional `for` loops where readability is maintained.
17+
- **Explicit Returns:** Always define explicit return types for functions to ensure type safety across the boundary.
18+
19+
## Examples
20+
21+
### Incorrect
22+
```typescript
23+
const data = list.map(x => x.id);
24+
25+
try {
26+
// ...
27+
} catch (e) {
28+
console.error(e);
29+
}

0 commit comments

Comments
 (0)