Skip to content

Commit 31ad1eb

Browse files
committed
feat: complete 3-week improvement sequence
Week 1: Code Quality Infrastructure - Add ESLint configuration (.eslintrc.js) with modern JavaScript rules - Add Prettier configuration (.prettierrc, .prettierignore) - Add EditorConfig (.editorconfig) for consistent editor settings - Update package.json scripts for linting, formatting, and quality checks - Fix ESLint issues in existing command runners and utilities Week 2: JavaScript/TypeScript Language Support - Add JavaScript/TypeScript config wizard (languages/javascript/config-wizard.js) - Add JavaScript/TypeScript tool detector (languages/javascript/tool-detector.js) - Add JavaScript command runner (scripts/javascript/command-runner.js) - Add 7 command files: - /js-setup - Interactive project configuration - /js-test - Run tests (Jest, Mocha, Vitest) - /js-lint - Run ESLint code quality checks - /js-build - Build JavaScript/TypeScript projects - /js-dev - Start development server - /ts-typecheck - TypeScript type checking - /ts-build - TypeScript compilation - Add comprehensive documentation (commands/js-setup.md) Week 3: Language Addition Guide - Create LANGUAGE-ADDITION-GUIDE.md with step-by-step instructions - Document consistent patterns for adding new languages - Provide code templates and best practices - Enable scalable addition of future language support Key Improvements: - All 62 existing tests continue to pass - Consistent architecture across all language implementations - Cross-platform support maintained - Enhanced error handling with recovery suggestions - Framework detection (React, Vue, Angular, Next.js, etc.) - Shared utilities integration across all languages
1 parent 74eabb7 commit 31ad1eb

86 files changed

Lines changed: 8439 additions & 4971 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
14+
[*.{js,jsx,ts,tsx}]
15+
indent_size = 2
16+
17+
[*.md]
18+
trim_trailing_whitespace = false
19+
max_line_length = 80
20+
21+
[*.json]
22+
indent_size = 2
23+
24+
[*.yml]
25+
indent_size = 2
26+
27+
[*.sh]
28+
indent_size = 2
29+
30+
[Makefile]
31+
indent_style = tab

.eslintrc.js

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
module.exports = {
2+
env: {
3+
node: true,
4+
es2022: true,
5+
},
6+
extends: ["eslint:recommended"],
7+
parserOptions: {
8+
ecmaVersion: "latest",
9+
sourceType: "module",
10+
},
11+
rules: {
12+
// Best practices
13+
"no-console": "off", // We use console.log in CLI tools
14+
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
15+
"no-var": "error",
16+
"prefer-const": "error",
17+
18+
// Code style
19+
"arrow-spacing": ["error", { before: true, after: true }],
20+
"block-spacing": "error",
21+
"brace-style": ["error", "1tbs", { allowSingleLine: true }],
22+
"comma-dangle": ["error", "always-multiline"],
23+
"comma-spacing": ["error", { before: false, after: true }],
24+
"eol-last": ["error", "always"],
25+
indent: ["error", 2, { SwitchCase: 1 }],
26+
"key-spacing": ["error", { beforeColon: false, afterColon: true }],
27+
"keyword-spacing": ["error", { before: true, after: true }],
28+
"linebreak-style": ["error", "unix"],
29+
"no-multiple-empty-lines": ["error", { max: 1, maxEOF: 0 }],
30+
"no-trailing-spaces": "error",
31+
"object-curly-spacing": ["error", "always"],
32+
quotes: [
33+
"error",
34+
"single",
35+
{ avoidEscape: true, allowTemplateLiterals: true },
36+
],
37+
semi: ["error", "always"],
38+
"space-before-blocks": "error",
39+
"space-before-function-paren": [
40+
"error",
41+
{
42+
anonymous: "always",
43+
named: "never",
44+
asyncArrow: "always",
45+
},
46+
],
47+
"space-infix-ops": "error",
48+
49+
// ES6+ features
50+
"arrow-parens": ["error", "always"],
51+
"no-duplicate-imports": "error",
52+
"prefer-arrow-callback": "error",
53+
"prefer-template": "error",
54+
"template-curly-spacing": ["error", "never"],
55+
},
56+
overrides: [
57+
{
58+
files: ["**/*.test.js", "**/tests/**/*.js"],
59+
env: {
60+
jest: true,
61+
},
62+
rules: {
63+
"no-console": "off",
64+
},
65+
},
66+
{
67+
files: ["scripts/**/*.js", "hooks/**/*.js"],
68+
rules: {
69+
"no-console": "off", // CLI scripts need console output
70+
},
71+
},
72+
],
73+
ignorePatterns: [
74+
"node_modules/",
75+
"dist/",
76+
"build/",
77+
"coverage/",
78+
"*.min.js",
79+
"examples/**/*",
80+
],
81+
};

.prettierignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules/
2+
dist/
3+
build/
4+
coverage/
5+
*.min.js
6+
examples/
7+
package-lock.json
8+
yarn.lock
9+
pnpm-lock.yaml
10+
bun.lockb

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"bracketSpacing": true,
8+
"arrowParens": "always",
9+
"endOfLine": "lf"
10+
}

0 commit comments

Comments
 (0)