-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pakettien päivittäminen | antti/update-packages #60
base: main
Are you sure you want to change the base?
Changes from 61 commits
d927a38
bc8b7d9
7015d15
97fdb8e
e7f9739
13b9c74
16e086f
8ac9971
046c930
b45e952
bb0ad82
626b5df
cb430a8
583cf68
0f714cc
625f082
37fc468
48e9f37
4d44f2b
c9e7f7b
5349549
9dafd1d
0f3cc99
0bf8b11
148aeb0
05b2e18
6c0c903
9d11db1
5302753
90f08e2
ad1126f
616d940
7f336bc
70d5167
45c2b5d
eb9f5b9
2ca5d5c
28dd9fe
5c75de7
7fa6f73
2a4df4b
ea15d3b
b596690
0512334
757f5e2
3092188
ddd22cf
ec2e718
7818a6d
c61dda6
9c8f0a1
22b9c6d
44e146a
b1e912f
7d40537
e74251b
d3140ef
0eab8b1
d5543f6
6a936d4
fa92377
773ed65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
package.json | ||
|
||
PACKAGES NOT UPDATED, NOT WORKING AT THE MOMENT 19.09.2024 | ||
|
||
Minor Backwards-compatible features | ||
❯ ◯ typescript 5.4.5 → 5.6.2 | ||
Seuraavia paketteja ei ole päivitetty | ||
|
||
Major Potentially breaking API changes | ||
◯ @types/node 20.12.4 → 22.5.5 | ||
◯ @typescript-eslint/eslint-plugin 7.5.0 → 8.6.0 | ||
◯ eslint 8.57.0 → 9.10.0 | ||
❯ ◯ @prisma/client 5.20.0 → 6.2.1 | ||
◯ @types/node 20.12.4 → 22.10.6 | ||
◯ prisma 5.20.0 → 6.2.1 | ||
|
||
`@prisma/client`iä ja `prisma`a ei ole päivitetty, koska `lucia-auth`in peer-dependency ei tue vielä Prisma v6:sta. Kyseisestä asiasta on tehty PR https://github.com/lucia-auth/lucia/pull/1760 jos tuota ei ole korjattu helmikuuhun mennessä, korjataan itse tai keksitään jokin muu ratkaisu | ||
|
||
`@types/node`a ei ole päivitetty, koska pitänee seurata package.json:in node-versiota | ||
|
||
######################################################################### | ||
|
||
**Testaa näitä päivittämisen yhteydessä** | ||
|
||
- [] poista oma testaustietokanta ja lisää tietokanta uudelleen `npm run prisma db push` | ||
|
||
- [] kokeile ESLint ettei heitä virheitä | ||
|
||
- [] testaa sivu että normaalikäyttö toimii (rekistöröinti, kirjautuminen, lahjan (lisääminen, poistaminen, muokkaaminen), palaute) | ||
|
||
- [] API-endpointtien testaaminen | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ Content-Type: application/json | |
|
||
|
||
# GIFT REQUESTS | ||
### | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ###-merkit lisätty, jottei |
||
|
||
@giftUUID = cba86307-8f50-4038-bc79-c05cef4fafc1 | ||
|
||
|
@@ -72,6 +73,7 @@ DELETE {{baseUrl}}/gifts/{{giftUUID}} | |
|
||
# USER REQUESTS | ||
|
||
### | ||
@userUUID = 26ab195c-5f56-4831-bedd-07725e8012ff | ||
|
||
### | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isoin muutos tässä on se, että siirrytään
Käytin tämän tiedoston luomiseen ESLintin ohjetta https://eslint.org/docs/latest/use/configure/migration-guide. Tämä tiedosto tuli Tässä kesti erittäin kauan tehdä. Tämmöinen "konffaus" ei ole yhtään tuttua ja en oikein tiennyt mistä aloittaa / mitä pitää tehdä 😄 Omissa testeissä homma näytti toimivan, mutta katotaan mikä on lopputulos 🤣 Säilytin kaikki samat säännöt mitä meillä olikin. Yhden pienen muokkauksen tein, mutta siitä toisessa kommentissa lisää |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
import { fixupConfigRules } from '@eslint/compat'; | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import { configs as tsConfigs } from 'typescript-eslint'; | ||
|
||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
baseDirectory: __dirname, | ||
recommendedConfig: tsConfigs.recommendedTypeChecked, | ||
allConfig: tsConfigs.all, | ||
}); | ||
|
||
const eslintConfig = [ | ||
...fixupConfigRules([ | ||
...compat.config({ | ||
root: true, | ||
extends: [ | ||
'plugin:n/recommended', | ||
'plugin:import/recommended', | ||
'next/core-web-vitals', | ||
'plugin:prettier/recommended', | ||
], | ||
|
||
// espree (default parser) set here to prevent following error: Cannot serialize key "parse" in parser: Function values are not supported. | ||
parser: 'espree', | ||
// parserOptions added so import.meta.url can be used. Reference: https://github.com/eslint/eslint/discussions/16037#discussioncomment-2998062 | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 'latest', | ||
}, | ||
|
||
rules: { | ||
// No React component definitions allowed inside components | ||
'react/no-unstable-nested-components': 'warn', | ||
|
||
// Additional import rules | ||
'import/no-dynamic-require': 'error', | ||
'import/no-absolute-path': 'error', | ||
'import/no-useless-path-segments': 'warn', | ||
'import/newline-after-import': 'warn', | ||
|
||
// Use warn instead of error for prettier issues and some other rules | ||
'prettier/prettier': 'warn', | ||
'prefer-const': 'warn', | ||
'no-unused-vars': 'warn', | ||
'no-debugger': 'warn', | ||
'no-console': 'off', | ||
}, | ||
|
||
overrides: [ | ||
{ | ||
files: ['**/*.ts?(x)'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
plugins: ['@tanstack/query'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
'plugin:import/typescript', | ||
'plugin:@tanstack/eslint-plugin-query/recommended', | ||
], | ||
|
||
rules: { | ||
// 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/291) | ||
'no-dupe-class-members': 'off', | ||
// 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/477) | ||
'no-undef': 'off', | ||
|
||
// Handled by import/typescript | ||
// n/no-missing-import is used here instead of node/no-missing-import because seems like eslint-plugin-node is not updated frequently | ||
// node/no-missing-import: https://github.com/mysticatea/eslint-plugin-node | n/no-missing-import: https://github.com/eslint-community/eslint-plugin-n | ||
'n/no-missing-import': 'off', | ||
Comment on lines
+77
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tässä on ainoa muokkaus
Tässä vielä issue, jossa päädyttiin tekemään tuo uusi |
||
|
||
// Disable some rules which are difficult for beginners | ||
'@typescript-eslint/no-unsafe-assignment': 'warn', | ||
'@typescript-eslint/no-unsafe-member-access': 'warn', | ||
'@typescript-eslint/no-unsafe-argument': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/no-unsafe-return': 'warn', | ||
'@typescript-eslint/no-unsafe-call': 'warn', | ||
|
||
// Use warn instead of error for some rules | ||
'prefer-const': 'warn', | ||
'@typescript-eslint/restrict-plus-operands': 'warn', | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
'@typescript-eslint/require-await': 'warn', | ||
}, | ||
}, | ||
], | ||
}), | ||
{ | ||
// .next folder added to ignores. This is otherwise being ESLinted | ||
ignores: ['**/.next/'], | ||
}, | ||
Comment on lines
+99
to
+102
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tässä luultavasti on meikän konffaustaidoissa vika. Eli ilman ignorausta Onko kyseinen kansio ajettu aikaisemmin ESLintillä? |
||
]), | ||
]; | ||
export default eslintConfig; | ||
/* | ||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
tseslint.configs.recommended, | ||
); | ||
*/ | ||
/* | ||
export default [ | ||
...fixupConfigRules( | ||
compat.extends( | ||
// section 1 | ||
'eslint:recommended', | ||
'plugin:n/recommended', | ||
'plugin:import/recommended', | ||
'next/core-web-vitals', | ||
'plugin:prettier/recommended', | ||
|
||
// section 2 | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
'plugin:import/typescript', | ||
'plugin:@tanstack/eslint-plugin-query/recommended', | ||
), | ||
), | ||
{ | ||
rules: { | ||
'n/no-extraneous-import': [ | ||
'error', | ||
{ | ||
allowModules: ['@styles/globals.css'], | ||
}, | ||
], | ||
|
||
// section 1 | ||
|
||
'react/no-unstable-nested-components': 'warn', | ||
'import/no-dynamic-require': 'error', | ||
'import/no-absolute-path': 'error', | ||
'import/no-useless-path-segments': 'warn', | ||
'import/newline-after-import': 'warn', | ||
'prettier/prettier': 'warn', | ||
'no-unused-vars': 'warn', | ||
'prefer-const': 'warn', | ||
'no-debugger': 'warn', | ||
'no-console': 'off', | ||
|
||
// section 2 | ||
|
||
'no-dupe-class-members': 'off', | ||
'no-undef': 'off', | ||
'n/no-missing-import': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'warn', | ||
'@typescript-eslint/no-unsafe-member-access': 'warn', | ||
'@typescript-eslint/no-unsafe-argument': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/no-unsafe-return': 'warn', | ||
'@typescript-eslint/no-unsafe-call': 'warn', | ||
'prefer-const': 'warn', | ||
'@typescript-eslint/restrict-plus-operands': 'warn', | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
'@typescript-eslint/require-await': 'warn', | ||
}, | ||
/* | ||
plugins: { | ||
'@tanstack/query': tanstackQuery, | ||
}, | ||
}, | ||
]; | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vaihdoin tekstin tässä tiedostossa vastaamaan nykyistä
Lisäsin myös TODO-listan pakettien päivittämisen jälkeen. Helpompi muistaa