refactor(backend): standardize errors and simplify configuration and test setup
This commit is contained in:
1 parent
1535c19b8c
commit
138666a7bb
92 files changed
+3994
-210
No files matched your search
@@ -0,0 +1,25 @@
|
||||
rules:
|
||||
- id: frontend-no-dynamic-code
|
||||
languages: [javascript, typescript]
|
||||
message: Avoid eval and Function constructors. Use explicit functions and JSON.parse for data.
|
||||
severity: ERROR
|
||||
pattern-either:
|
||||
- pattern: eval(...)
|
||||
- pattern: new Function(...)
|
||||
- pattern: Function(...)
|
||||
|
||||
- id: frontend-no-document-write
|
||||
languages: [javascript, typescript]
|
||||
message: Avoid document.write and document.writeln. Render content through React.
|
||||
severity: ERROR
|
||||
pattern-either:
|
||||
- pattern: document.write(...)
|
||||
- pattern: document.writeln(...)
|
||||
|
||||
- id: frontend-no-inner-html-assignment
|
||||
languages: [javascript, typescript]
|
||||
message: Avoid direct innerHTML assignments. Use textContent or React rendering.
|
||||
severity: ERROR
|
||||
pattern-either:
|
||||
- pattern: $TARGET.innerHTML = $VALUE
|
||||
- pattern: $TARGET.innerHTML += $VALUE
|
||||
Reference in new issue
Block a user