Skip to content

Commit

Permalink
Merge pull request #276 from NIAEFEUP/fix/updateDeps
Browse files Browse the repository at this point in the history
Migrate to sveltekit 2 and update deps
  • Loading branch information
MRita443 authored Apr 25, 2024
2 parents 8497122 + e7fe5ab commit 0d28c33
Show file tree
Hide file tree
Showing 24 changed files with 15,226 additions and 29,018 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ node_modules/
docker-compose.yml
Dockerfile*
*.md
*.sh
*.sh
storybook-static/
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ node_modules
.env
.env.*
!.env.example
storybook-static

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
Expand Down
39 changes: 21 additions & 18 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,51 +1,54 @@
/** @type { import("eslint").Linter.Config } */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:storybook/recommended'
'plugin:svelte/recommended',
'prettier'
],
plugins: ['svelte3', '@typescript-eslint', 'import'],
ignorePatterns: ['*.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import'],
rules: {
'import/no-relative-parent-imports': 'error',
'import/export': 'error',
'import/no-empty-named-blocks': 'error',
'import/named': 'error',
'import/no-absolute-path': 'error',
'import/no-self-import': 'error',
'import/no-useless-path-segments': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'import/order': 'error'
},

parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
overrides: [
{
files: ['*.svelte'],
processor: 'svelte3/svelte3',
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
},
rules: {
'no-undef': 'off'
}
}
],
settings: {
'svelte3/typescript': () => require('typescript'),
'svelte/typescript': () => require('typescript'),
'import/extensions': ['.js', '.ts', '.svelte', '.stories.ts'],
'import/resolver': {
typescript: {
alwaysTryTypes: true
}
}
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020
},
env: {
browser: true,
es2017: true,
node: true
}
};
27 changes: 15 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
node-version: [19.x]
node-version: [21.x]

steps:
- name: Checkout repository
Expand All @@ -36,6 +36,9 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build site
run: npm run build

- name: Test
run: CI=true npm run test-vite:coverage

Expand All @@ -48,7 +51,7 @@ jobs:

strategy:
matrix:
node-version: [19.x]
node-version: [21.x]

steps:
- name: Checkout repository
Expand All @@ -67,20 +70,17 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build site
run: npm run build

- name: Install Playwright
run: npx playwright install

- name: Wait for the Netlify Preview
uses: kamranayub/wait-for-netlify-action@v2.1.0
id: waitForNetlify
with:
site_name: 'niaefeup-frontend-storybook'
max_timeout: 300 # 5 minutes
env:
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
- name: Build storybook
run: npm run build-storybook

- name: Test
run: npm run test-storybook:coverage -- --url ${{ steps.waitForNetlify.outputs.url }} --ci
run: npm run test-storybook:ci

- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v3
Expand All @@ -91,7 +91,7 @@ jobs:

strategy:
matrix:
node-version: [19.x]
node-version: [21.x]

steps:
- name: Checkout repository
Expand All @@ -110,5 +110,8 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build site
run: npm run build

- name: Lint Code
run: npm run lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ vite.config.ts.timestamp-*

# Test Reports
/coverage
storybook-static/
1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }],
"endOfLine": "auto"
}
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 21.6.2
Loading

0 comments on commit 0d28c33

Please sign in to comment.