Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript", "next/babel"]
}
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Thumbs.db
build/
dist/
out/
distWebpack/
distNext/

# Vite
.vite/
Expand Down
33 changes: 0 additions & 33 deletions .prettierrc.js

This file was deleted.

33 changes: 33 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"bracketSpacing": true,
"bracketSameLine": false,
"jsxSingleQuote": false,
"arrowParens": "always",
"endOfLine": "auto",
"overrides": [
{
"files": ["*.{ts,tsx}"],
"options": {
"parser": "typescript"
}
},
{
"files": ["*.json"],
"options": {
"tabWidth": 2
}
},
{
"files": ["*.css", "*.scss"],
"options": {
"singleQuote": false
}
}
]
}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,10 @@
[![TypeScript](https://img.shields.io/badge/lang-typescript-blue)](https://www.typescriptlang.org/)

Практические задания курса "Прочные основы создания React-приложений" в [Академии Цифра](https://academy.udmr.ru/)

##Задание 2.1##
1) Создать компонент Tabs (использовать Chakra UI)
2) Создать компонент Button (использовать AntD)
3) Создать компонент Rating (использовать MUI)
4) Создать компонент Calendar (использовать Mantine)
5) Создать компонент Modal (использовать Radix UI + Tailwind)
19 changes: 18 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import reactHooks from 'eslint-plugin-react-hooks';
import jsxRuntime from 'eslint-plugin-react/configs/jsx-runtime.js';
import unicorn from 'eslint-plugin-unicorn';
import prettierPlugin from 'eslint-plugin-prettier';
import nextPlugin from '@next/eslint-plugin-next';

export default [
js.configs.recommended,
Expand All @@ -17,6 +18,10 @@ export default [
...jsxRuntime,
files: ['**/*.{ts,tsx}'],
languageOptions: {
globals: {
...globals.browser,
...globals.es2021,
},
parser: typescriptParser,
parserOptions: {
project: './tsconfig.json',
Expand Down Expand Up @@ -47,6 +52,18 @@ export default [
},
},

// Конфигурация для Next.js
{
files: ['**/*.{js,jsx,ts,tsx}'],
plugins: {
'@next/next': nextPlugin,
},
rules: {
...nextPlugin.configs.recommended.rules,
// Дополнительные правила для Next.js
},
},

// Общие правила для всех файлов
{
plugins: {
Expand Down Expand Up @@ -83,6 +100,6 @@ export default [

// Игнорирование конфигурационных файлов
{
ignores: ['**/*.config.js', '**/*.rc.js', '.prettierrc.js', '.eslintrc.js'],
ignores: ['**/*.config.js', '**/*.rc.js', '.prettierrc.json', '.eslintrc.js'],
},
];
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>React + TS App</title>
</head>
<body>
<div id="root"></div>
<!-- Для Webpack скрипт добавится автоматически -->
<!-- Для Vite используется тип module -->
<script type="module" src="./src/index.tsx"></script>
</body>
</html>
5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
27 changes: 27 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import path from 'path';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export', // для статического экспорта
distDir: 'distNext', // папка сборки Next.js
images: {
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
'@': path.resolve(__dirname, 'src'),
};
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
return config;
},
};

export default nextConfig;
Loading