@synergyerp/frontend-standards 1.1.4 → 1.2.0

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.
Files changed (2) hide show
  1. package/eslint.config.js +44 -0
  2. package/package.json +1 -1
package/eslint.config.js CHANGED
@@ -149,6 +149,50 @@ export default tseslint.config(
149
149
  ignore: ['^[A-Z].*\\.tsx$'],
150
150
  },
151
151
  ],
152
+ 'no-restricted-syntax': [
153
+ 'error',
154
+ {
155
+ selector: "VariableDeclarator[id.name='data']",
156
+ message:
157
+ "Variable name 'data' is banned (FRONTEND_STANDARDS.md Section 5.2). Use a descriptive name like 'users', 'response', etc.",
158
+ },
159
+ {
160
+ selector: "VariableDeclarator[id.name='temp']",
161
+ message:
162
+ "Variable name 'temp' is banned. Use a descriptive name like 'formattedDate'.",
163
+ },
164
+ {
165
+ selector: "VariableDeclarator[id.name='arr']",
166
+ message:
167
+ "Variable name 'arr' is banned. Use a descriptive name like 'permissions'.",
168
+ },
169
+ {
170
+ selector: "VariableDeclarator[id.name='obj']",
171
+ message:
172
+ "Variable name 'obj' is banned. Use a descriptive name like 'config'.",
173
+ },
174
+ {
175
+ selector: "VariableDeclarator[id.name='str']",
176
+ message:
177
+ "Variable name 'str' is banned. Use a descriptive name like 'message'.",
178
+ },
179
+ {
180
+ selector: "VariableDeclarator[id.name='result']",
181
+ message:
182
+ "Variable name 'result' is banned. Use a descriptive name like 'validationResult'.",
183
+ },
184
+ {
185
+ selector: "VariableDeclarator[id.name='myVar']",
186
+ message:
187
+ "Variable name 'myVar' is banned. Use a descriptive name like 'username'.",
188
+ },
189
+ {
190
+ selector:
191
+ "FunctionDeclaration[id.name='handle'], FunctionExpression[id.name='handle']",
192
+ message:
193
+ "Function name 'handle' is banned. Use a descriptive name like 'handleFormSubmit'.",
194
+ },
195
+ ],
152
196
 
153
197
  // ===== REACT =====
154
198
  'react/jsx-pascal-case': ['error', { allowAllCaps: true }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergyerp/frontend-standards",
3
- "version": "1.1.4",
3
+ "version": "1.2.0",
4
4
  "description": "SynergyERP frontend standards — ESLint, Prettier, commitlint, Husky, Vitest, TypeScript configs, modularization enforcement, and PR templates.",
5
5
  "private": false,
6
6
  "type": "module",