Skip to content

Commit 9793b80

Browse files
committed
update deps and add eslint for the ui package
1 parent 3cf3d6b commit 9793b80

File tree

5 files changed

+493
-458
lines changed

5 files changed

+493
-458
lines changed

packages/ui/eslint.config.js

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import { FlatCompat } from '@eslint/eslintrc';
2+
import js from '@eslint/js';
3+
import tsEslint from '@typescript-eslint/eslint-plugin';
4+
import tsParser from '@typescript-eslint/parser';
5+
import { fileURLToPath } from 'url';
6+
import { dirname } from 'path';
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = dirname(__filename);
10+
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
});
15+
16+
export default [
17+
// Extend Next.js config using compat
18+
...compat.extends('next/core-web-vitals', 'next/typescript'),
19+
20+
{
21+
files: ['**/*.{js,jsx,ts,tsx}'],
22+
languageOptions: {
23+
parser: tsParser,
24+
parserOptions: {
25+
ecmaVersion: 'latest',
26+
sourceType: 'module',
27+
ecmaFeatures: {
28+
jsx: true,
29+
},
30+
},
31+
},
32+
plugins: {
33+
'@typescript-eslint': tsEslint,
34+
},
35+
rules: {
36+
// TypeScript specific rules
37+
'@typescript-eslint/no-unused-vars': [
38+
'error',
39+
{
40+
argsIgnorePattern: '^_',
41+
varsIgnorePattern: '^_',
42+
},
43+
],
44+
'@typescript-eslint/no-explicit-any': 'warn',
45+
46+
// General JavaScript rules
47+
'prefer-const': 'error',
48+
'no-var': 'error',
49+
'no-console': 'warn',
50+
'no-debugger': 'error',
51+
'no-duplicate-imports': 'error',
52+
},
53+
settings: {
54+
react: {
55+
version: 'detect',
56+
},
57+
},
58+
},
59+
60+
{
61+
ignores: [
62+
'node_modules/',
63+
'.next/',
64+
'out/',
65+
'build/',
66+
'dist/',
67+
],
68+
},
69+
];

packages/ui/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

packages/ui/next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ const nextConfig = {
66
transpilePackages: ['@mosaic/sdk'],
77
};
88

9-
module.exports = nextConfig;
9+
export default nextConfig;

packages/ui/package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@mosaic/ui",
33
"version": "0.1.0",
4+
"type": "module",
45
"private": true,
56
"scripts": {
67
"dev": "next dev",
@@ -16,20 +17,25 @@
1617
"class-variance-authority": "^0.7.0",
1718
"clsx": "^2.0.0",
1819
"lucide-react": "^0.294.0",
19-
"next": "14.0.4",
20+
"next": "15.4.5",
2021
"next-themes": "^0.2.1",
2122
"react": "^18.2.0",
2223
"react-dom": "^18.2.0",
2324
"tailwind-merge": "^2.0.0",
2425
"tailwindcss-animate": "^1.0.7"
2526
},
2627
"devDependencies": {
28+
"@eslint/eslintrc": "^3.2.0",
29+
"@eslint/js": "^9.32.0",
2730
"@types/node": "^20.10.0",
2831
"@types/react": "^18.2.39",
2932
"@types/react-dom": "^18.2.17",
33+
"@typescript-eslint/eslint-plugin": "^8.34.0",
34+
"@typescript-eslint/parser": "^8.34.0",
3035
"autoprefixer": "^10.4.16",
31-
"eslint": "^8.54.0",
32-
"eslint-config-next": "14.0.4",
36+
"eslint": "^9.32.0",
37+
"eslint-config-next": "15.4.5",
38+
"eslint-plugin-import": "^2.32.0",
3339
"postcss": "^8.4.32",
3440
"tailwindcss": "^3.3.6",
3541
"typescript": "^5.3.2"

0 commit comments

Comments
 (0)