-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from samuliasmala/antti/update-packages
Valmis, mergetään!
- Loading branch information
Showing
9 changed files
with
1,426 additions
and
1,556 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
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', | ||
|
||
// 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/'], | ||
}, | ||
]), | ||
]; | ||
export default eslintConfig; |
Oops, something went wrong.