Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
AvilaAndre committed Nov 16, 2024
2 parents f4fde18 + e8139fc commit a9fa0f1
Show file tree
Hide file tree
Showing 88 changed files with 10,051 additions and 31,898 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/[email protected]
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"
}
3 changes: 2 additions & 1 deletion .storybook/main.cts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ module.exports = {
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@storybook/addon-coverage',
'@storybook/addon-a11y'
'@storybook/addon-a11y',
'storybook-addon-pseudo-states'
],
framework: {
name: '@storybook/sveltekit',
Expand Down
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
4 changes: 4 additions & 0 deletions codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ coverage:
default:
target: 80%
threshold: 5%
patch:
default:
target: 80%
threshold: 5%
14 changes: 14 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://shadcn-svelte.com/schema.json",
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app.css",
"baseColor": "slate"
},
"aliases": {
"components": "$lib/components",
"utils": "$lib/utils"
},
"typescript": true
}
Loading

0 comments on commit a9fa0f1

Please sign in to comment.