feat: update to TS 7
This commit is contained in:
67
.oxlintrc.json
Normal file
67
.oxlintrc.json
Normal file
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||
"plugins": [
|
||||
"typescript",
|
||||
"react",
|
||||
"nextjs",
|
||||
"oxc"
|
||||
],
|
||||
"categories": {
|
||||
"correctness": "error"
|
||||
},
|
||||
"rules": {
|
||||
"no-alert": "warn",
|
||||
"no-console": ["warn", { "allow": ["warn", "error", "log"] }],
|
||||
"no-debugger": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-var": "error",
|
||||
"prefer-const": "error",
|
||||
"typescript/no-explicit-any": "error",
|
||||
"typescript/no-unsafe-assignment": "error",
|
||||
"typescript/no-unsafe-member-access": "error",
|
||||
"typescript/no-unsafe-call": "error",
|
||||
"typescript/no-unsafe-return": "error",
|
||||
"typescript/no-unsafe-argument": "error",
|
||||
"typescript/no-floating-promises": "error",
|
||||
"typescript/no-misused-promises": "error",
|
||||
"typescript/await-thenable": "error",
|
||||
"typescript/no-unnecessary-type-assertion": "error",
|
||||
"typescript/prefer-nullish-coalescing": "warn",
|
||||
"typescript/prefer-optional-chain": "warn",
|
||||
"typescript/no-redundant-type-constituents": "error",
|
||||
"typescript/no-non-null-assertion": "warn",
|
||||
"typescript/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"argsIgnorePattern": "^_",
|
||||
"varsIgnorePattern": "^_",
|
||||
"caughtErrorsIgnorePattern": "^_"
|
||||
}
|
||||
],
|
||||
"nextjs/no-html-link-for-pages": "error",
|
||||
"nextjs/no-img-element": "warn",
|
||||
"react/rules-of-hooks": "error",
|
||||
"react/exhaustive-deps": "warn",
|
||||
"react/react-in-jsx-scope": "off",
|
||||
"typescript/consistent-return": "off",
|
||||
"typescript/no-unsafe-type-assertion": "off",
|
||||
"typescript/no-unnecessary-template-expression": "off",
|
||||
"typescript/no-unnecessary-type-conversion": "off"
|
||||
},
|
||||
"options": {
|
||||
"typeAware": true
|
||||
},
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
"ignorePatterns": [
|
||||
".next/**",
|
||||
"out/**",
|
||||
"build/**",
|
||||
"next-env.d.ts",
|
||||
"src/shared/ui/chart.tsx",
|
||||
"src/shared/hooks/theme-message-listener.tsx"
|
||||
]
|
||||
}
|
||||
10
AGENTS.md
10
AGENTS.md
@@ -26,3 +26,13 @@
|
||||
| `/` | `src/app/page.tsx` — Fluw splash (placeholder, заменяется при старте продукта) |
|
||||
|
||||
Структура для нового кода: `src/widgets/` (композиции страниц), `src/features/` (сценарии), `src/entities/` (данные/контент), `src/shared/ui` (примитивы), `src/shared/lib` + `src/shared/hooks` (утилиты/хуки).
|
||||
|
||||
<!-- BEGIN:nextjs-agent-rules -->
|
||||
|
||||
# This is NOT the Next.js you know
|
||||
|
||||
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
|
||||
|
||||
This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
|
||||
|
||||
<!-- END:nextjs-agent-rules -->
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
import reactPlugin from "@eslint-react/eslint-plugin"
|
||||
import nextPlugin from "@next/eslint-plugin-next"
|
||||
import tsPlugin from "@typescript-eslint/eslint-plugin"
|
||||
import tsParser from "@typescript-eslint/parser"
|
||||
import reactHooks from "eslint-plugin-react-hooks"
|
||||
|
||||
const config = [
|
||||
{
|
||||
ignores: [
|
||||
".next/**",
|
||||
"out/**",
|
||||
"build/**",
|
||||
"next-env.d.ts",
|
||||
"src/shared/ui/chart.tsx",
|
||||
"src/shared/hooks/theme-message-listener.tsx",
|
||||
],
|
||||
},
|
||||
{
|
||||
files: ["**/*.{js,jsx,mjs,ts,tsx,mts,cts}"],
|
||||
...nextPlugin.configs["core-web-vitals"],
|
||||
},
|
||||
...tsPlugin.configs["flat/recommended"],
|
||||
{
|
||||
files: ["**/*.{ts,tsx}"],
|
||||
languageOptions: {
|
||||
parser: tsParser,
|
||||
parserOptions: {
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module",
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
project: "./tsconfig.json",
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["**/*.{jsx,tsx}"],
|
||||
name: "@eslint-react/recommended",
|
||||
plugins: {
|
||||
"@eslint-react": reactPlugin,
|
||||
},
|
||||
rules: reactPlugin.configs.recommended.rules,
|
||||
},
|
||||
{
|
||||
files: ["**/*.{ts,tsx}"],
|
||||
plugins: {
|
||||
"react-hooks": reactHooks,
|
||||
},
|
||||
rules: {
|
||||
...reactHooks.configs.flat["recommended-latest"].rules,
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
argsIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
caughtErrorsIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-unsafe-assignment": "error",
|
||||
"@typescript-eslint/no-unsafe-member-access": "error",
|
||||
"@typescript-eslint/no-unsafe-call": "error",
|
||||
"@typescript-eslint/no-unsafe-return": "error",
|
||||
"@typescript-eslint/no-unsafe-argument": "error",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"@typescript-eslint/no-floating-promises": "error",
|
||||
"@typescript-eslint/no-misused-promises": "error",
|
||||
"@typescript-eslint/await-thenable": "error",
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "warn",
|
||||
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
||||
"@typescript-eslint/prefer-optional-chain": "warn",
|
||||
"@typescript-eslint/no-unnecessary-condition": "off",
|
||||
"@typescript-eslint/no-redundant-type-constituents": "error",
|
||||
"@typescript-eslint/ban-ts-comment": [
|
||||
"off",
|
||||
{
|
||||
"ts-expect-error": "allow-with-description",
|
||||
"ts-ignore": true,
|
||||
"ts-nocheck": true,
|
||||
"ts-check": false,
|
||||
},
|
||||
],
|
||||
"no-unused-vars": "off",
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"react-hooks/exhaustive-deps": "warn",
|
||||
"no-console": ["warn", { allow: ["warn", "error", "log"] }],
|
||||
"no-debugger": "error",
|
||||
"no-alert": "warn",
|
||||
"no-var": "error",
|
||||
"prefer-const": "error",
|
||||
"prefer-arrow-callback": "warn",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-unreachable": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-useless-return": "error",
|
||||
"no-useless-escape": "error",
|
||||
"no-constant-condition": "error",
|
||||
"no-empty": "warn",
|
||||
"no-extra-semi": "error",
|
||||
"no-func-assign": "error",
|
||||
"no-inner-declarations": "error",
|
||||
"no-irregular-whitespace": "error",
|
||||
"no-obj-calls": "error",
|
||||
"no-sparse-arrays": "error",
|
||||
"no-undef": "off",
|
||||
"no-unexpected-multiline": "error",
|
||||
"no-unreachable-loop": "error",
|
||||
"use-isnan": "error",
|
||||
"valid-typeof": "error",
|
||||
"@next/next/no-html-link-for-pages": "error",
|
||||
"@next/next/no-img-element": "warn",
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["**/*.{jsx,tsx}"],
|
||||
rules: {
|
||||
"@eslint-react/no-missing-component-display-name": "warn",
|
||||
"@eslint-react/dom-no-unknown-property": "error",
|
||||
"@eslint-react/no-missing-key": "error",
|
||||
"@eslint-react/no-duplicate-key": "error",
|
||||
"@eslint-react/no-array-index-key": "off",
|
||||
"@eslint-react/dom-no-dangerously-set-innerhtml": "off",
|
||||
"@eslint-react/no-direct-mutation-state": "error",
|
||||
"@eslint-react/no-nested-component-definitions": "off",
|
||||
"@eslint-react/no-use-context": "off",
|
||||
"@eslint-react/no-context-provider": "off",
|
||||
"@eslint-react/use-state": "off",
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
export default config
|
||||
@@ -3,6 +3,9 @@ const nextConfig = {
|
||||
/* config options here */
|
||||
// Оптимизация бандла
|
||||
experimental: {
|
||||
useTypeScriptCli: true,
|
||||
turbopackFileSystemCacheForDev: true,
|
||||
turbopackMemoryEviction: "auto",
|
||||
optimizePackageImports: [
|
||||
"lucide-react",
|
||||
"@radix-ui/react-accordion",
|
||||
|
||||
19
package.json
19
package.json
@@ -2,11 +2,16 @@
|
||||
"name": "tungulov-space",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@11.15.1",
|
||||
"engines": {
|
||||
"node": ">=24.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "eslint"
|
||||
"lint": "oxlint --threads=2 --deny-warnings",
|
||||
"lint:fix": "oxlint --threads=2 --type-aware --fix"
|
||||
},
|
||||
"dependencies": {
|
||||
"@base-ui/react": "^1.4.1",
|
||||
@@ -46,7 +51,7 @@
|
||||
"framer-motion": "^12.38.0",
|
||||
"input-otp": "^1.4.2",
|
||||
"lucide-react": "^1.14.0",
|
||||
"next": "16.2.5",
|
||||
"next": "16.3.0",
|
||||
"next-themes": "^0.4.6",
|
||||
"radix-ui": "^1.4.3",
|
||||
"react": "^19.2.6",
|
||||
@@ -61,18 +66,14 @@
|
||||
"zod": "^4.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint-react/eslint-plugin": "^5.7.4",
|
||||
"@next/eslint-plugin-next": "^16.2.5",
|
||||
"@tailwindcss/postcss": "^4.2.4",
|
||||
"@types/node": "^25.6.0",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.59.2",
|
||||
"@typescript-eslint/parser": "^8.59.2",
|
||||
"eslint": "^10.3.0",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"oxlint": "1.78.0",
|
||||
"oxlint-tsgolint": "7.0.2001",
|
||||
"tailwindcss": "^4.2.4",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"typescript": "^6.0.3"
|
||||
"typescript": "7.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
2382
pnpm-lock.yaml
generated
2382
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
2
pnpm-workspace.yaml
Normal file
2
pnpm-workspace.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
overrides:
|
||||
electron-to-chromium: 1.5.404
|
||||
@@ -26,11 +26,12 @@ export default function Home() {
|
||||
>
|
||||
<div className="mb-8 flex items-center gap-3 text-left">
|
||||
<FluwSquareIcon />
|
||||
|
||||
<div>
|
||||
<div className="text-sm font-semibold tracking-normal text-white">
|
||||
<div className="text-sm font-semibold tracking-normal text-foreground">
|
||||
Fluw template
|
||||
</div>
|
||||
<div className="text-xs text-white/45">
|
||||
<div className="text-xs text-muted-foreground ">
|
||||
Пустой шаблон приложения для быстрого старта
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -22,10 +22,9 @@
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*",
|
||||
"./src/*",
|
||||
"./*"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user