diff --git a/error.js b/error.js
deleted file mode 100644
index b8db645..0000000
--- a/error.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// Basic JS file with review issues
-
-import React, { useState } from 'react';
-
-// 1. Component không dùng prop types
-function Demo(props) {
- // 2. State không khởi tạo đúng kiểu
- const [count, setCount] = useState('0'); // Nên là số
-
- // 3. Hàm không dùng
- function unusedFunc() {
- return 'unused';
- }
-
- // 4. Truy cập props không tồn tại
- const name = props.username;
-
- // 5. Render mảng không có key
- const arr = [1,2,3];
- const list = arr.map(item =>
{item}
);
-
- // 6. Inline style sai cú pháp
- const style = { color: 'red', fontWeight: 500 };
-
- // 7. Sử dụng biến chưa khai báo
- let result = value + 1;
-
- // 8. Sử dụng setState sai
- setCount(count++);
-
- // 9. Return nhiều phần tử không bọc Fragment
- return (
-
- Test
- {list}
-
-
{name}
-
-
Unwrapped
- ) // Không bọc Fragment
-}
-
-// 10. Export sai kiểu
-export { Demo };
diff --git a/error.jsx b/error.jsx
deleted file mode 100644
index ea26867..0000000
--- a/error.jsx
+++ /dev/null
@@ -1,44 +0,0 @@
-// Basic JSX file with review issues
-
-import React, { useState } from 'react';
-
-// 1. Component không dùng prop types
-function MyComponent(props) {
- // 2. State không khởi tạo đúng kiểu
- const [count, setCount] = useState('0'); // Nên là số
-
- // 3. Hàm không dùng
- function unusedFunc() {
- return 'unused';
- }
-
- // 4. Truy cập props không tồn tại
- const name = props.username;
-
- // 5. Render mảng không có key
- const arr = [1,2,3];
- const list = arr.map(item =>
{item}
);
-
- // 6. Inline style sai cú pháp
- const style = { color: 'red', fontWeight: 500 };
-
- // 7. Sử dụng biến chưa khai báo
- let result = value + 1;
-
- // 8. Sử dụng setState sai
- setCount(count++);
-
- // 9. Return nhiều phần tử không bọc Fragment
- return (
-
- Test
- {list}
-
-
{name}
-
-
Unwrapped
- ) // Không bọc Fragment
-}
-
-// 10. Export sai kiểu
-export { MyComponent };
diff --git a/error.php b/error.php
deleted file mode 100644
index 8592bf9..0000000
--- a/error.php
+++ /dev/null
@@ -1,37 +0,0 @@
-db->createCommand("SELECT * FROM user WHERE id = $id")->queryOne();
-
- // 4. Không kiểm tra null
- echo $user['name'];
-
- // 5. Không dùng CSRF cho form
- echo '';
-
- // 6. Không validate dữ liệu
- $model = new \app\models\User();
- $model->name = $_POST['name'];
- $model->save();
-
- // 7. Hardcode đường dẫn
- require_once('/var/www/html/config.php');
-
- // 8. Không đóng kết nối DB
- // 9. Không xử lý exception
- throw new Exception('Error!');
-
- // 10. Hàm trả về giá trị không đúng
- return true;
- }
-}
diff --git a/error.ts b/error.ts
deleted file mode 100644
index 5ac9ee2..0000000
--- a/error.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-// Basic TypeScript file with review issues
-
-function add(a: number, b: number): number {
- return a + b // Missing semicolon, no type safety for return
-}
-
-const result = add('1', 2); // Passing string instead of number
-console.log(result)
-
-// 1. Unused variable
-let unusedVar: string;
-
-// 2. Function with wrong return type
-function getString(): number {
- return "hello" // Should return number
-}
-
-// 3. Variable declared but never used
-let neverUsed = 123;
-
-// 4. Type assertion error
-let x: any = "abc";
-let y: number = x as number; // Wrong assertion
-
-// 5. Shadowed variable
-let a = 5;
-function shadow() {
- let a = "shadowed";
- return a;
-}
-
-// 6. Function missing return type
-function noReturnType() {
- return true;
-}
-
-// 7. Incorrect interface usage
-interface User {
- name: string;
- age: number;
-}
-const user: User = { name: "A", age: "20" }; // age should be number
-
-// 8. Array with mixed types
-const arr: number[] = [1, "2", 3];
-
-// 9. Unreachable code
-function unreachable() {
- return 1;
- console.log("This will never run");
-}
-
-// 10. Using 'any' type unnecessarily
-function useAny(a: any, b: any): any {
- return a + b;
-}
diff --git a/error.tsx b/error.tsx
deleted file mode 100644
index d303a26..0000000
--- a/error.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-// Basic TSX file with review issues
-
-import React, { useState } from 'react';
-
-// 1. Không dùng prop types hoặc interface cho props
-type Props = { title?: string };
-function App(props: Props) {
- // 2. State sai kiểu
- const [count, setCount] = useState(0); // Nên là number
-
- // 3. Hàm không dùng
- function unusedFunc(): string {
- return 'unused';
- }
-
- // 4. Truy cập props không tồn tại
- const name = props.username;
-
- // 5. Render mảng không có key
- const arr = [1,2,3];
- const list = arr.map(item =>
{item}
);
-
- // 6. Inline style sai cú pháp
- const style = { color: 'red', fontWeight: 500 };
-
- // 7. Sử dụng biến chưa khai báo
- let result = value + 1;
-
- // 8. Sử dụng setState sai
- setCount(count++);
-
- // 9. Return nhiều phần tử không bọc Fragment
- return (
-