-
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
Conversation
…equests don't work. They're saying INVALID JSON
…typescript as well
…t seem to be updated anymore. Reference: mysticatea/eslint-plugin-node#360
…ind any breaking changes information regarding it so could not test
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…t. Everything worked perfectly fine with Prisma 6 but for updating packages --force had to be used
.eslintrc.json
Outdated
"plugins": ["@tanstack/query"], | ||
"extends": [ | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:import/typescript" | ||
"plugin:import/typescript", | ||
"plugin:@tanstack/eslint-plugin-query/recommended" |
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.
Liittyy tanstack
-brancheihin, jonka pohjalta väsäsin tätä branchia
…revent n/no-extraneous-import for now. The rule can be disabled if needed but let's go with this for now
…eprecated .eslintrc.json method and replace it with the upcoming Flat Config method
…s to do when updating packages
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 |
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
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.
Lisäsin myös TODO-listan pakettien päivittämisen jälkeen. Helpompi muistaa
Tämmöisiä kannattaa suosia, tuommoiset unohtuu nopeasti.
import '~/styles/globals.css'; | ||
import '../styles/globals.css'; |
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.
import '~/styles/globals.css';
vaihdettu import '../styles/globals.css';
Ilman vaihdosta seuraava virheilmoitus tulee: no-extraneous-import
https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-import.md
Tuo virhekoodi mun mielestä ihan hyvä, joten en itse sitä ehkä poistaisi. Yritin myös lisätä globals.css
:n sallituksi, mutta ilmeisesti hyväksyy vain moduleita
Mennäänkö ../
-tavalla vai mennäänkö turvallisemmalla ~/
-tavalla ja lisätään vain seuraava rivi: // eslint-disable-next-line n/no-extraneous-import
? 😄
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.
Tämä on hyvä muutos, pidetään.
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.
Isoin muutos tässä on se, että siirrytään .eslintrc.*
stä eslint.config.(m)js
:n (Flat Config) käyttöön
.eslintrc.*
n tuki näyttäisi loppuvan ESLint 10:n kohdalla, joka tulee melko pian. Viittaus: https://eslint.org/blog/2023/10/flat-config-rollout-plans/#eslintrc-removed-in-eslint-v10.0.0
Käytin tämän tiedoston luomiseen ESLintin ohjetta https://eslint.org/docs/latest/use/configure/migration-guide. Tämä tiedosto tuli npx @eslint/migrate-config .eslintrc.json
-komennolla. Jouduin tekemään jonkin verran muokkauksia, jotta sain siitä toimivan
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ää
// 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', |
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.
Tässä on ainoa muokkaus rules
eihin. Vaihdoin node/
-> n/
. Tuota eslint-plugin-node
a ei näytetä päivittävän samalla tavalla. Sanottakoon se, että en tiedä onko tarpeellinen muutos
eslint-plugin-node
n Github: https://github.com/mysticatea/eslint-plugin-node
eslint-plugin-n
Github: https://github.com/eslint-community/eslint-plugin-n
Tässä vielä issue, jossa päädyttiin tekemään tuo uusi eslint-plugin-n
mysticatea/eslint-plugin-node#300
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.
Joo tuo oli hyvä muutos 👍 Pitääkin tehdä se myös omissa repoissa.
{ | ||
// .next folder added to ignores. This is otherwise being ESLinted | ||
ignores: ['**/.next/'], | ||
}, |
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.
Tässä luultavasti on meikän konffaustaidoissa vika. Eli ilman ignorausta .next
-kansio ajetan myös ESLintillä
Onko kyseinen kansio ajettu aikaisemmin ESLintillä?
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.
Aiemmin next lint
komento piti sisällään kansiot missä eslint ajettiin. Siihen on varmasti tullut jokin muutos uuden version myötä, kun nyt vaatii tuon ignoren.
"@eslint/compat": "1.2.5", | ||
"@eslint/eslintrc": "3.2.0", | ||
"@eslint/js": "9.18.0", |
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.
Nämä kolme devDependeciä liittyi tähän: https://eslint.org/docs/latest/use/configure/migration-guide
Eivät liene tarpeellisia enää
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.
Itseasiassa @eslint/compat
ja @eslint/eslintrc
ovatkin käytössä. @eslint/js
ei ole, koska säännöt otetaan TypeScript
in configeista
ESLint näköjään kaatuu täällä Githubissa. Syy on ilmeisestikin siinä ettei "By default, ESLint lints files that match the patterns **/.js, **/.cjs, and **/*.mjs. Those files are always matched unless you explicitly exclude them using global ignores." Viittaus: https://eslint.org/docs/latest/use/configure/configuration-files#specifying-files-and-ignores Lisäsin configiin Testasin myös lisätä |
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.
Mergesin mainin tähän kuun muuten "Files changed" ei ollut aivan ajantasalla. Mut toimii ja valmis mergettäväksi.
Sanoisin että helpoin tapa korjata tämä on korvata - name: Run linters
run: npm run lint Tätä me käytetään joissakin repoissa. |
En tiennytkään Kokeilen korjata tuon, kiitos! 👍 |
Näytti lähtevän pelittämään tuolla sun ohjeella, kiitos! 👍 |
No description provided.