@hatem427/code-guard-ci 3.5.4 → 3.5.5
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/config/angular.config.ts +24 -24
- package/config/guidelines.config.ts +152 -68
- package/config/nextjs.config.ts +46 -1
- package/dist/config/angular.config.js +24 -22
- package/dist/config/angular.config.js.map +1 -1
- package/dist/config/guidelines.config.d.ts.map +1 -1
- package/dist/config/guidelines.config.js +139 -77
- package/dist/config/guidelines.config.js.map +1 -1
- package/dist/config/nextjs.config.d.ts.map +1 -1
- package/dist/config/nextjs.config.js +39 -1
- package/dist/config/nextjs.config.js.map +1 -1
- package/dist/scripts/cli.js +400 -115
- package/dist/scripts/cli.js.map +1 -1
- package/package.json +1 -1
- package/scripts/cli.ts +434 -125
package/config/angular.config.ts
CHANGED
|
@@ -15,17 +15,17 @@ import { registerRules, Rule } from './guidelines.config';
|
|
|
15
15
|
const angularRules: Rule[] = [
|
|
16
16
|
// ── Lifecycle ──────────────────────────────────────────────────────────
|
|
17
17
|
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
18
|
+
// {
|
|
19
|
+
// id: 'angular-no-ngoninit',
|
|
20
|
+
// label: 'Avoid ngOnInit for simple initialization',
|
|
21
|
+
// description:
|
|
22
|
+
// 'Prefer constructor injection and field initializers. Use ngOnInit only when you need DOM access or @Input values. Modern Angular recommends inject() + signals.',
|
|
23
|
+
// severity: 'warning',
|
|
24
|
+
// fileExtensions: ['ts'],
|
|
25
|
+
// pattern: /ngOnInit\s*\(\s*\)/g,
|
|
26
|
+
// applicableTo: ['angular'],
|
|
27
|
+
// category: 'Angular Lifecycle',
|
|
28
|
+
// },
|
|
29
29
|
|
|
30
30
|
// ── Deprecated APIs ────────────────────────────────────────────────────
|
|
31
31
|
|
|
@@ -142,7 +142,7 @@ const angularRules: Rule[] = [
|
|
|
142
142
|
label: 'Use async pipe or toSignal() instead of manual subscribe',
|
|
143
143
|
description:
|
|
144
144
|
'Manual .subscribe() in components leads to memory leaks. Use the async pipe in templates or convert to signals with toSignal().',
|
|
145
|
-
severity: '
|
|
145
|
+
severity: 'info',
|
|
146
146
|
fileExtensions: ['ts'],
|
|
147
147
|
pattern: /\.subscribe\s*\(/g,
|
|
148
148
|
applicableTo: ['angular'],
|
|
@@ -302,24 +302,24 @@ const angularRules: Rule[] = [
|
|
|
302
302
|
|
|
303
303
|
// ── Best Practices ─────────────────────────────────────────────────────
|
|
304
304
|
|
|
305
|
-
{
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
},
|
|
305
|
+
// {
|
|
306
|
+
// id: 'angular-standalone-components',
|
|
307
|
+
// label: 'Prefer standalone components',
|
|
308
|
+
// description:
|
|
309
|
+
// 'Use standalone components (Angular 14+) instead of NgModules for simpler and more maintainable code.',
|
|
310
|
+
// severity: 'info',
|
|
311
|
+
// fileExtensions: ['ts'],
|
|
312
|
+
// pattern: /@Component\s*\([^)]*\)(?![\s\S]*standalone\s*:\s*true)/g,
|
|
313
|
+
// applicableTo: ['angular'],
|
|
314
|
+
// category: 'Best Practices',
|
|
315
|
+
// },
|
|
316
316
|
|
|
317
317
|
{
|
|
318
318
|
id: 'angular-strict-templates',
|
|
319
319
|
label: 'Enable strict template checking',
|
|
320
320
|
description:
|
|
321
321
|
'Use strictTemplates: true in tsconfig.json for better type safety in templates.',
|
|
322
|
-
severity: '
|
|
322
|
+
severity: 'warning',
|
|
323
323
|
fileExtensions: ['ts'],
|
|
324
324
|
pattern: null,
|
|
325
325
|
applicableTo: ['angular'],
|
|
@@ -75,17 +75,17 @@ export const sharedRules: Rule[] = [
|
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
id: 'max-component-lines',
|
|
78
|
-
label: 'Component size ≤
|
|
79
|
-
description: 'Components should not exceed
|
|
80
|
-
severity: '
|
|
78
|
+
label: 'Component size ≤ 500 lines',
|
|
79
|
+
description: 'Components should not exceed 500 lines. Split large components into smaller, focused ones.',
|
|
80
|
+
severity: 'warning',
|
|
81
81
|
fileExtensions: ['ts', 'tsx', 'jsx'],
|
|
82
82
|
pattern: null,
|
|
83
83
|
customCheck: (file) => {
|
|
84
|
-
if (file.lineCount >
|
|
84
|
+
if (file.lineCount > 500) {
|
|
85
85
|
return [
|
|
86
86
|
{
|
|
87
87
|
line: null,
|
|
88
|
-
message: `File has ${file.lineCount} lines (max
|
|
88
|
+
message: `File has ${file.lineCount} lines (max 500). Consider splitting into smaller components.`,
|
|
89
89
|
},
|
|
90
90
|
];
|
|
91
91
|
}
|
|
@@ -194,73 +194,73 @@ export const sharedRules: Rule[] = [
|
|
|
194
194
|
category: 'Code Quality',
|
|
195
195
|
},
|
|
196
196
|
|
|
197
|
-
{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
197
|
+
// {
|
|
198
|
+
// id: 'no-magic-numbers',
|
|
199
|
+
// label: 'Avoid magic numbers',
|
|
200
|
+
// description: 'Use named constants instead of magic numbers for better code readability.',
|
|
201
|
+
// severity: 'info',
|
|
202
|
+
// fileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
203
|
+
// pattern: null,
|
|
204
|
+
// customCheck: (file) => {
|
|
205
|
+
// const violations: Array<{ line: number | null; message: string }> = [];
|
|
206
|
+
// const lines = file.lines;
|
|
207
207
|
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
// for (let i = 0; i < lines.length; i++) {
|
|
209
|
+
// const line = lines[i].trim();
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
// // ── Skip lines where numbers are expected ──
|
|
212
212
|
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
// // Skip JSX/HTML attributes (width={100}, height={20}, colspan={3}, etc.)
|
|
214
|
+
// if (/\w+=\{?\d+\}?/.test(line) && /<|className|style|width|height|cols|rows|span|size|max|min|step|tabIndex|priority/.test(line)) continue;
|
|
215
215
|
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
// // Skip Tailwind / CSS class strings (w-64, p-4, mt-8, grid-cols-3, etc.)
|
|
217
|
+
// if (/className|class\s*=/.test(line)) continue;
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
// // Skip JSX return / render lines (pure template markup)
|
|
220
|
+
// if (/^\s*</.test(line) || /return\s*\(/.test(line)) continue;
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
// // Skip import/export statements
|
|
223
|
+
// if (/^\s*(import|export)\s/.test(line)) continue;
|
|
224
224
|
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
// // Skip comments
|
|
226
|
+
// if (/^\s*(\/\/|\/\*|\*)/.test(line)) continue;
|
|
227
227
|
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
// // Skip common safe patterns
|
|
229
|
+
// if (/setTimeout|setInterval|Array\(|\.length|\.indexOf|\.slice|\.substring|port|status|code|index|Math\.|\.toFixed/.test(line)) continue;
|
|
230
230
|
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
// // Skip array access like arr[0], arr[2]
|
|
232
|
+
// if (/\[\d+\]/.test(line)) continue;
|
|
233
233
|
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
// // Skip enums and object literals with number values
|
|
235
|
+
// if (/^\s*\w+\s*:\s*\d+/.test(line) && !/const|let|var/.test(line)) continue;
|
|
236
236
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
237
|
+
// // ── Only flag: assignments with raw numbers (const x = 365, let y = 86400)
|
|
238
|
+
// // and comparisons/returns with unexplained numbers
|
|
239
|
+
// const isAssignment = /(?:const|let|var)\s+\w+\s*=\s*.*\d{2,}/.test(line);
|
|
240
|
+
// const isComparison = /[><=!]+\s*\d{3,}|if\s*\(.*\d{3,}/.test(line);
|
|
241
|
+
// const isReturn = /return\s+\d{3,}/.test(line);
|
|
242
242
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
243
|
+
// if (isAssignment || isComparison || isReturn) {
|
|
244
|
+
// // Extract the magic number
|
|
245
|
+
// const match = line.match(/(?<![\w.#-])\d{3,}(?![\w.px%remsvhw-])/);
|
|
246
|
+
// if (match) {
|
|
247
|
+
// // Skip common acceptable numbers
|
|
248
|
+
// const num = parseInt(match[0], 10);
|
|
249
|
+
// if ([100, 200, 300, 400, 404, 500, 1000, 1024, 2048].includes(num)) continue;
|
|
250
250
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
251
|
+
// violations.push({
|
|
252
|
+
// line: i + 1,
|
|
253
|
+
// message: `Magic number found: ${match[0]}. Consider using a named constant.`,
|
|
254
|
+
// });
|
|
255
|
+
// }
|
|
256
|
+
// }
|
|
257
|
+
// }
|
|
258
258
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
},
|
|
259
|
+
// return violations.slice(0, 3); // Limit to 3 to avoid spam
|
|
260
|
+
// },
|
|
261
|
+
// applicableTo: [],
|
|
262
|
+
// category: 'Code Quality',
|
|
263
|
+
// },
|
|
264
264
|
|
|
265
265
|
// NOTE: 'prefer-template-literals' removed — covered by ESLint 'prefer-template' rule
|
|
266
266
|
|
|
@@ -275,16 +275,16 @@ export const sharedRules: Rule[] = [
|
|
|
275
275
|
category: 'Modern Syntax',
|
|
276
276
|
},
|
|
277
277
|
|
|
278
|
-
{
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
},
|
|
278
|
+
// {
|
|
279
|
+
// id: 'prefer-early-return',
|
|
280
|
+
// label: 'Prefer early returns',
|
|
281
|
+
// description: 'Use early returns to avoid deep nesting and improve code readability.',
|
|
282
|
+
// severity: 'info',
|
|
283
|
+
// fileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
284
|
+
// pattern: null,
|
|
285
|
+
// applicableTo: [],
|
|
286
|
+
// category: 'Code Quality',
|
|
287
|
+
// },
|
|
288
288
|
|
|
289
289
|
// NOTE: 'no-var-keyword' removed — covered by ESLint 'no-var' rule
|
|
290
290
|
|
|
@@ -298,6 +298,90 @@ export const sharedRules: Rule[] = [
|
|
|
298
298
|
applicableTo: [],
|
|
299
299
|
category: 'Modern Syntax',
|
|
300
300
|
},
|
|
301
|
+
|
|
302
|
+
{
|
|
303
|
+
id: 'function-formatting',
|
|
304
|
+
label: 'Function formatting conventions',
|
|
305
|
+
description:
|
|
306
|
+
'Functions must have a blank line before them, no space before (), and a space before and after {}.',
|
|
307
|
+
severity: 'error',
|
|
308
|
+
fileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
|
309
|
+
pattern: null,
|
|
310
|
+
customCheck: (file) => {
|
|
311
|
+
const violations: Array<{ line: number | null; message: string }> = [];
|
|
312
|
+
const lines: string[] = file.lines;
|
|
313
|
+
|
|
314
|
+
for (let i = 0; i < lines.length; i++) {
|
|
315
|
+
const line = lines[i];
|
|
316
|
+
const trimmed = line.trim();
|
|
317
|
+
|
|
318
|
+
// Skip empty lines, comments, imports, decorators
|
|
319
|
+
if (
|
|
320
|
+
!trimmed ||
|
|
321
|
+
trimmed.startsWith('//') ||
|
|
322
|
+
trimmed.startsWith('/*') ||
|
|
323
|
+
trimmed.startsWith('*') ||
|
|
324
|
+
trimmed.startsWith('@') ||
|
|
325
|
+
trimmed.startsWith('import ')
|
|
326
|
+
) continue;
|
|
327
|
+
|
|
328
|
+
// Detect named function declarations:
|
|
329
|
+
// function foo(), async function foo(), export function foo(), export default function foo()
|
|
330
|
+
const isFunctionDecl = /^\s*(export\s+)?(default\s+)?(async\s+)?function\s+\w+/.test(line);
|
|
331
|
+
|
|
332
|
+
// Detect arrow/regular function assignments:
|
|
333
|
+
// const foo = () =>, const foo = async () =>, const foo = function() {}
|
|
334
|
+
const isArrowAssign = /^\s*(export\s+)?(const|let|var)\s+\w+\s*=\s*(async\s+)?(\(|function\s*\()/.test(line);
|
|
335
|
+
|
|
336
|
+
if (!isFunctionDecl && !isArrowAssign) continue;
|
|
337
|
+
|
|
338
|
+
// ── Check 1: Blank line before function ──────────────────────────
|
|
339
|
+
// Allowed to have no blank line: when preceded by opening brace, another decorator,
|
|
340
|
+
// a comment line, or when it is the very first meaningful line in the file
|
|
341
|
+
if (i > 0) {
|
|
342
|
+
const prevTrimmed = lines[i - 1].trim();
|
|
343
|
+
const isAllowedPrev =
|
|
344
|
+
prevTrimmed === '' || // blank line — correct
|
|
345
|
+
prevTrimmed === '{' || // opening brace of class/block
|
|
346
|
+
prevTrimmed === '(' || // opening paren
|
|
347
|
+
prevTrimmed.startsWith('//') ||
|
|
348
|
+
prevTrimmed.startsWith('/*') ||
|
|
349
|
+
prevTrimmed.startsWith('*') ||
|
|
350
|
+
prevTrimmed.startsWith('@'); // decorator on previous line
|
|
351
|
+
|
|
352
|
+
if (!isAllowedPrev) {
|
|
353
|
+
violations.push({
|
|
354
|
+
line: i + 1,
|
|
355
|
+
message: `Missing blank line before function declaration. Previous line: "${prevTrimmed.substring(0, 60)}"`,
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// ── Check 2: No space before () ──────────────────────────────────
|
|
361
|
+
// Catches: function foo (...) — space between name and paren
|
|
362
|
+
if (isFunctionDecl && /function\s+\w+\s+\(/.test(line)) {
|
|
363
|
+
violations.push({
|
|
364
|
+
line: i + 1,
|
|
365
|
+
message: 'No space allowed before (). Use `function name()` not `function name ()`.',
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// ── Check 3: Space before { ──────────────────────────────────────
|
|
370
|
+
// Catches: function foo(){ or () => { missing space
|
|
371
|
+
// Note: Prettier handles this, so only flag if Prettier isn't running
|
|
372
|
+
if (/\)\{/.test(line)) {
|
|
373
|
+
violations.push({
|
|
374
|
+
line: i + 1,
|
|
375
|
+
message: 'Missing space before `{`. Use `) {` not `){`.',
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return violations.slice(0, 10);
|
|
381
|
+
},
|
|
382
|
+
applicableTo: [],
|
|
383
|
+
category: 'Code Style',
|
|
384
|
+
},
|
|
301
385
|
];
|
|
302
386
|
|
|
303
387
|
// ── Rule registry (populated by project-specific configs) ───────────────────
|
package/config/nextjs.config.ts
CHANGED
|
@@ -87,7 +87,7 @@ const nextjsRules: Rule[] = [
|
|
|
87
87
|
label: 'API routes must have error handling',
|
|
88
88
|
description:
|
|
89
89
|
'All API route handlers (GET, POST, etc.) must wrap logic in try/catch and return proper error responses.',
|
|
90
|
-
severity: '
|
|
90
|
+
severity: 'info',
|
|
91
91
|
fileExtensions: ['ts', 'js'],
|
|
92
92
|
pattern: null,
|
|
93
93
|
customCheck: (file) => {
|
|
@@ -118,6 +118,51 @@ const nextjsRules: Rule[] = [
|
|
|
118
118
|
category: 'Next.js API Routes',
|
|
119
119
|
},
|
|
120
120
|
|
|
121
|
+
// ── Sharp optimizer ───────────────────────────────────────────────────
|
|
122
|
+
|
|
123
|
+
{
|
|
124
|
+
id: 'nextjs-require-sharp',
|
|
125
|
+
label: 'Install sharp for image optimization',
|
|
126
|
+
description:
|
|
127
|
+
'Next.js requires the "sharp" package for optimized image processing in production. Add it as a dependency: npm install sharp',
|
|
128
|
+
severity: 'warning',
|
|
129
|
+
fileExtensions: ['json'],
|
|
130
|
+
pattern: null,
|
|
131
|
+
customCheck: (file) => {
|
|
132
|
+
const violations: Array<{ line: number | null; message: string }> = [];
|
|
133
|
+
|
|
134
|
+
// Only check package.json at the project root
|
|
135
|
+
const basename = file.relativePath.split('/').pop() || '';
|
|
136
|
+
if (basename !== 'package.json') return [];
|
|
137
|
+
|
|
138
|
+
let pkg: Record<string, any>;
|
|
139
|
+
try {
|
|
140
|
+
pkg = JSON.parse(file.content);
|
|
141
|
+
} catch {
|
|
142
|
+
return [];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const allDeps = {
|
|
146
|
+
...pkg.dependencies,
|
|
147
|
+
...pkg.devDependencies,
|
|
148
|
+
...pkg.peerDependencies,
|
|
149
|
+
...pkg.optionalDependencies,
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
if (!allDeps['sharp']) {
|
|
153
|
+
violations.push({
|
|
154
|
+
line: null,
|
|
155
|
+
message:
|
|
156
|
+
'Missing "sharp" package. Next.js uses sharp for production image optimization. Run: npm install sharp',
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return violations;
|
|
161
|
+
},
|
|
162
|
+
applicableTo: ['nextjs'],
|
|
163
|
+
category: 'Next.js Performance',
|
|
164
|
+
},
|
|
165
|
+
|
|
121
166
|
// ── Metadata ──────────────────────────────────────────────────────────
|
|
122
167
|
|
|
123
168
|
{
|
|
@@ -15,16 +15,17 @@ exports.angularRules = void 0;
|
|
|
15
15
|
const guidelines_config_1 = require("./guidelines.config");
|
|
16
16
|
const angularRules = [
|
|
17
17
|
// ── Lifecycle ──────────────────────────────────────────────────────────
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
// {
|
|
19
|
+
// id: 'angular-no-ngoninit',
|
|
20
|
+
// label: 'Avoid ngOnInit for simple initialization',
|
|
21
|
+
// description:
|
|
22
|
+
// 'Prefer constructor injection and field initializers. Use ngOnInit only when you need DOM access or @Input values. Modern Angular recommends inject() + signals.',
|
|
23
|
+
// severity: 'warning',
|
|
24
|
+
// fileExtensions: ['ts'],
|
|
25
|
+
// pattern: /ngOnInit\s*\(\s*\)/g,
|
|
26
|
+
// applicableTo: ['angular'],
|
|
27
|
+
// category: 'Angular Lifecycle',
|
|
28
|
+
// },
|
|
28
29
|
// ── Deprecated APIs ────────────────────────────────────────────────────
|
|
29
30
|
{
|
|
30
31
|
id: 'angular-no-ng-deep',
|
|
@@ -121,7 +122,7 @@ const angularRules = [
|
|
|
121
122
|
id: 'angular-use-async-pipe',
|
|
122
123
|
label: 'Use async pipe or toSignal() instead of manual subscribe',
|
|
123
124
|
description: 'Manual .subscribe() in components leads to memory leaks. Use the async pipe in templates or convert to signals with toSignal().',
|
|
124
|
-
severity: '
|
|
125
|
+
severity: 'info',
|
|
125
126
|
fileExtensions: ['ts'],
|
|
126
127
|
pattern: /\.subscribe\s*\(/g,
|
|
127
128
|
applicableTo: ['angular'],
|
|
@@ -248,21 +249,22 @@ const angularRules = [
|
|
|
248
249
|
category: 'Performance',
|
|
249
250
|
},
|
|
250
251
|
// ── Best Practices ─────────────────────────────────────────────────────
|
|
251
|
-
{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
252
|
+
// {
|
|
253
|
+
// id: 'angular-standalone-components',
|
|
254
|
+
// label: 'Prefer standalone components',
|
|
255
|
+
// description:
|
|
256
|
+
// 'Use standalone components (Angular 14+) instead of NgModules for simpler and more maintainable code.',
|
|
257
|
+
// severity: 'info',
|
|
258
|
+
// fileExtensions: ['ts'],
|
|
259
|
+
// pattern: /@Component\s*\([^)]*\)(?![\s\S]*standalone\s*:\s*true)/g,
|
|
260
|
+
// applicableTo: ['angular'],
|
|
261
|
+
// category: 'Best Practices',
|
|
262
|
+
// },
|
|
261
263
|
{
|
|
262
264
|
id: 'angular-strict-templates',
|
|
263
265
|
label: 'Enable strict template checking',
|
|
264
266
|
description: 'Use strictTemplates: true in tsconfig.json for better type safety in templates.',
|
|
265
|
-
severity: '
|
|
267
|
+
severity: 'warning',
|
|
266
268
|
fileExtensions: ['ts'],
|
|
267
269
|
pattern: null,
|
|
268
270
|
applicableTo: ['angular'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular.config.js","sourceRoot":"","sources":["../../config/angular.config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,2DAA0D;AAE1D,MAAM,YAAY,GAAW;IAC3B,0EAA0E;IAE1E;
|
|
1
|
+
{"version":3,"file":"angular.config.js","sourceRoot":"","sources":["../../config/angular.config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,2DAA0D;AAE1D,MAAM,YAAY,GAAW;IAC3B,0EAA0E;IAE1E,IAAI;IACJ,+BAA+B;IAC/B,uDAAuD;IACvD,iBAAiB;IACjB,yKAAyK;IACzK,yBAAyB;IACzB,4BAA4B;IAC5B,oCAAoC;IACpC,+BAA+B;IAC/B,mCAAmC;IACnC,KAAK;IAEL,0EAA0E;IAE1E;QACE,EAAE,EAAE,oBAAoB;QACxB,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,+FAA+F;QACjG,QAAQ,EAAE,OAAO;QACjB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC;QACrD,OAAO,EAAE,YAAY;QACrB,YAAY,EAAE,CAAC,SAAS,CAAC;QACzB,QAAQ,EAAE,yBAAyB;KACpC;IAED;QACE,EAAE,EAAE,0BAA0B;QAC9B,KAAK,EAAE,iDAAiD;QACxD,WAAW,EACT,wJAAwJ;QAC1J,QAAQ,EAAE,SAAS;QACnB,cAAc,EAAE,CAAC,IAAI,CAAC;QACtB,OAAO,EAAE,eAAe;QACxB,YAAY,EAAE,CAAC,SAAS,CAAC;QACzB,QAAQ,EAAE,yBAAyB;KACpC;IAED;QACE,EAAE,EAA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