@qvaroo/configs 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -170,6 +170,39 @@ src/
170
170
 
171
171
  ---
172
172
 
173
+ ## ⛔️ Local Enforcement (Pre-commit Hooks)
174
+
175
+ To ensure developers fix errors **before** they commit, set up [Husky](https://typicode.github.io/husky/).
176
+
177
+ 1. **Install Husky & Lint-staged**:
178
+ ```bash
179
+ npm install --save-dev husky lint-staged
180
+ npx husky init
181
+ ```
182
+
183
+ 2. **Configure Pre-commit Hook**:
184
+ Update `.husky/pre-commit` to run lint-staged:
185
+ ```bash
186
+ npx lint-staged
187
+ ```
188
+
189
+ 3. **Update `package.json`**:
190
+ Add the configuration to check only changed files:
191
+ ```json
192
+ {
193
+ "lint-staged": {
194
+ "src/**/*.{ts,tsx,js}": [
195
+ "eslint --fix",
196
+ "prettier --write"
197
+ ]
198
+ }
199
+ }
200
+ ```
201
+
202
+ > Now, if a developer tries to commit code with errors, **git will reject the commit** until fixed.
203
+
204
+ ---
205
+
173
206
  ## 🔧 CI/CD Integration
174
207
 
175
208
  ### GitHub Actions
package/index.d.ts CHANGED
@@ -2,3 +2,8 @@ export declare const eslint: import('eslint').Linter.Config;
2
2
  export declare const eslintReact: import('eslint').Linter.Config;
3
3
  export declare const eslintNode: import('eslint').Linter.Config;
4
4
  export declare const prettier: import('prettier').Config;
5
+
6
+ export declare const namingConventions: Record<string, any>;
7
+ export declare const codeQuality: Record<string, any>;
8
+ export declare const architecture: Record<string, any>;
9
+ export declare const spellcheck: Record<string, any>;
package/index.js CHANGED
@@ -8,4 +8,10 @@ module.exports = {
8
8
  eslintReact: require('./eslint/react'),
9
9
  eslintNode: require('./eslint/node'),
10
10
  prettier: require('./prettier'),
11
+
12
+ // Individual Rule Sets
13
+ namingConventions: require('./eslint/rules/naming-conventions'),
14
+ codeQuality: require('./eslint/rules/code-quality'),
15
+ architecture: require('./eslint/rules/architecture'),
16
+ spellcheck: require('./eslint/rules/spellcheck'),
11
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvaroo/configs",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Centralized Qvaroo coding standards, ESLint, Prettier, and TypeScript configurations for TypeScript frontend projects",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",