Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/master
Browse files Browse the repository at this point in the history
  • Loading branch information
NIKaragu authored Sep 13, 2024
2 parents 6a42943 + 71cd46f commit 06cd23d
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 14 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ on:
jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -31,4 +34,4 @@ jobs:
run: npm install

- name: Run ESLint
run: npm run lint
run: npm run lint
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ export default tseslint.config({
},
})
```
## Instructions
- Install Prettier Extention and use this [VSCode settings](https://mate-academy.github.io/fe-program/tools/vscode/settings.json) to enable format on save.
- Replace `<your_account>` with your Github username in the [DEMO LINK](https://<your_account>.github.io/react_redux-list-of-todos/)
- Follow the [React task guideline](https://github.com/mate-academy/react_task-guideline#react-tasks-guideline)
21 changes: 17 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@ import tseslint from 'typescript-eslint';
import pluginReact from 'eslint-plugin-react';

export default [
{ rules: { 'react/react-in-jsx-scope': 'off' } },
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
{ files: ['**/*.js'], languageOptions: { sourceType: 'script' } },
{ languageOptions: { globals: globals.browser } },
{
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
languageOptions: {
sourceType: 'module',
globals: globals.browser,
},
rules: {
'react/react-in-jsx-scope': 'off', // Вимкнути правило для імпорту React
'react/jsx-uses-react': 'off',
},
settings: {
react: {
version: 'detect', // Автоматично визначати версію React
},
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
Expand All @@ -24,3 +36,4 @@ export default [
},
{ignores: ['build/', 'dist/assets/index-CnMgUSrV.js', 'node_modules']},
];

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"globals": "^15.9.0",
"husky": "^9.1.6",
"prettier": "^3.3.3",
"typescript": "^5.5.3",
"typescript": "^5.6.2",
"typescript-eslint": "^8.5.0",
"vite": "^5.4.1"
},
Expand Down
10 changes: 6 additions & 4 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"allowImportingTsExtensions": false, // Вимикаємо, бо noEmit не встановлено
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"noEmit": false, // Переконатися, що noEmit встановлено в false
"jsx": "react-jsx",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"composite": true // Додаємо composite
},
"include": ["src"]
"include": ["src"],
"exclude": ["node_modules"]
}
12 changes: 11 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"files": [],
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"jsx": "react-jsx",
"strict": true,
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src"],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,

/* Important for project references */
"composite": true, // Додано для підтримки референсів
"emitDeclarationOnly": true, // Змінив на emitDeclarationOnly

/* Linting */
"strict": true,
Expand Down

0 comments on commit 06cd23d

Please sign in to comment.