Skip to content

Commit 5931910

Browse files
committed
lint
1 parent 6f021ba commit 5931910

File tree

13 files changed

+221
-505
lines changed

13 files changed

+221
-505
lines changed

.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 63 deletions
This file was deleted.

apps/ops-dashboard/.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/ops-dashboard/.eslintrc.js

Lines changed: 0 additions & 70 deletions
This file was deleted.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
import Link from 'next/link';
2+
13
export default function NotFound() {
24
return (
35
<div className="flex flex-col items-center justify-center min-h-screen">
46
<h2 className="text-2xl font-bold mb-4">Not Found</h2>
57
<p className="text-gray-600 mb-4">Could not find the requested resource.</p>
6-
<a href="/" className="text-blue-500 hover:underline">
8+
<Link href="/" className="text-blue-500 hover:underline">
79
Return Home
8-
</a>
10+
</Link>
911
</div>
1012
);
1113
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import { dirname } from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
import js from "@eslint/js";
5+
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = dirname(__filename);
8+
9+
const compat = new FlatCompat({
10+
baseDirectory: __dirname,
11+
recommendedConfig: js.configs.recommended,
12+
});
13+
14+
const config = [
15+
{ ignores: ["**/dist/**", "**/node_modules/**", "**/.next/**", "**/coverage/**"] },
16+
...compat.extends("next/core-web-vitals"),
17+
{
18+
rules: {
19+
"@typescript-eslint/no-unused-vars": "off",
20+
"react-hooks/exhaustive-deps": "off",
21+
"@next/next/no-img-element": "off",
22+
"jsx-a11y/alt-text": "off",
23+
},
24+
},
25+
{
26+
files: ["**/__tests__/**", "**/__mocks__/**", "**/e2e/**"],
27+
rules: {
28+
"@typescript-eslint/no-unused-vars": "off",
29+
"no-empty": "off",
30+
"react-hooks/rules-of-hooks": "off",
31+
"react-hooks/exhaustive-deps": "off",
32+
"@typescript-eslint/triple-slash-reference": "off",
33+
"jsx-a11y/alt-text": "off",
34+
},
35+
},
36+
{
37+
files: ["next-env.d.ts"],
38+
rules: {
39+
"@typescript-eslint/triple-slash-reference": "off",
40+
},
41+
},
42+
{
43+
files: ["app/api/**/*.ts"],
44+
rules: {
45+
"no-empty": "off",
46+
},
47+
},
48+
{
49+
files: ["components/resources/**/*.{ts,tsx}", "hooks/**/*.{ts,tsx}"],
50+
rules: {
51+
"react-hooks/rules-of-hooks": "off",
52+
"no-empty": "off",
53+
},
54+
},
55+
{
56+
files: ["lib/agent/**/*.ts", "lib/agents/**/*.ts"],
57+
rules: {
58+
"no-constant-condition": "off",
59+
},
60+
},
61+
];
62+
63+
export default config;

apps/ops-dashboard/jest.polyfills.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-require-imports */
21
// jest.polyfills.js
32

43

apps/ops-dashboard/jest.setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jest.mock('next/navigation', () => ({
6060
jest.mock('next/image', () => ({
6161
__esModule: true,
6262
default: (props) => {
63-
// eslint-disable-next-line @next/next/no-img-element
63+
6464
return <img {...props} />;
6565
},
6666
}));

apps/ops-dashboard/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@
9090
"@types/react": "^18.2.77",
9191
"@types/react-dom": "^18.2.18",
9292
"@types/react-syntax-highlighter": "^15.5.11",
93+
"@eslint/eslintrc": "^3.2.0",
9394
"autoprefixer": "^10.4.17",
94-
"eslint": "^8.56.0",
95-
"eslint-config-next": "14.1.0",
95+
"eslint-config-next": "^15.2.2",
9696
"jest": "^29.7.0",
9797
"jest-environment-jsdom": "^30.2.0",
9898
"jest-fixed-jsdom": "^0.0.10",

eslint.config.js

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
const js = require("@eslint/js");
2+
const tsParser = require("@typescript-eslint/parser");
3+
const tsPlugin = require("@typescript-eslint/eslint-plugin");
4+
const simpleImportSort = require("eslint-plugin-simple-import-sort");
5+
const unusedImports = require("eslint-plugin-unused-imports");
6+
const prettier = require("eslint-config-prettier");
7+
8+
module.exports = [
9+
{ ignores: ["**/dist/**", "**/node_modules/**", "**/coverage/**"] },
10+
js.configs.recommended,
11+
{
12+
languageOptions: {
13+
parser: tsParser,
14+
ecmaVersion: "latest",
15+
sourceType: "module",
16+
globals: {
17+
console: "readonly",
18+
process: "readonly",
19+
Buffer: "readonly",
20+
__dirname: "readonly",
21+
__filename: "readonly",
22+
module: "readonly",
23+
require: "readonly",
24+
exports: "readonly",
25+
setTimeout: "readonly",
26+
clearTimeout: "readonly",
27+
setInterval: "readonly",
28+
clearInterval: "readonly",
29+
Promise: "readonly",
30+
URL: "readonly",
31+
URLSearchParams: "readonly",
32+
fetch: "readonly",
33+
Headers: "readonly",
34+
Request: "readonly",
35+
Response: "readonly",
36+
AbortController: "readonly",
37+
AbortSignal: "readonly",
38+
TextEncoder: "readonly",
39+
TextDecoder: "readonly",
40+
describe: "readonly",
41+
it: "readonly",
42+
expect: "readonly",
43+
beforeEach: "readonly",
44+
afterEach: "readonly",
45+
beforeAll: "readonly",
46+
afterAll: "readonly",
47+
jest: "readonly"
48+
}
49+
},
50+
plugins: {
51+
"@typescript-eslint": tsPlugin,
52+
"simple-import-sort": simpleImportSort,
53+
"unused-imports": unusedImports
54+
},
55+
rules: {
56+
...tsPlugin.configs.recommended.rules,
57+
indent: ["error", 2],
58+
quotes: ["error", "single", { avoidEscape: true, allowTemplateLiterals: true }],
59+
"quote-props": ["error", "as-needed"],
60+
semi: ["error", "always"],
61+
"simple-import-sort/imports": "warn",
62+
"simple-import-sort/exports": "warn",
63+
"unused-imports/no-unused-imports": "warn",
64+
"@typescript-eslint/no-unused-vars": [
65+
"warn",
66+
{ argsIgnorePattern: "React|res|next|^_" }
67+
],
68+
"@typescript-eslint/no-explicit-any": "off",
69+
"@typescript-eslint/no-var-requires": "off",
70+
"@typescript-eslint/no-require-imports": "off",
71+
"no-console": "off",
72+
"@typescript-eslint/ban-ts-comment": "off",
73+
"prefer-const": "off",
74+
"no-case-declarations": "off",
75+
"no-implicit-globals": "off",
76+
"@typescript-eslint/no-unsafe-declaration-merging": "off"
77+
}
78+
},
79+
{
80+
files: ["**/*.config.js", "eslint.config.js", "jest.config.js", "**/jest.config.js"],
81+
languageOptions: {
82+
globals: {
83+
module: "readonly",
84+
require: "readonly"
85+
}
86+
},
87+
rules: {
88+
"@typescript-eslint/no-require-imports": "off",
89+
"no-undef": "off"
90+
}
91+
},
92+
prettier
93+
];

0 commit comments

Comments
 (0)