Skip to content
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

Long needed refactor, part one #94

Merged
merged 6 commits into from
Nov 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .eslintrc.cjs

This file was deleted.

33 changes: 27 additions & 6 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,39 @@ on:
- main

jobs:
build:
type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: get dependencies
run: npm install
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- name: type-check
run: npm run type-check
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- name: unit-test
run: npm run test:unit -- --run
# playwright requires more initialization: https://playwright.dev/docs/ci-intro#on-pushpull_request
# - name: e2e-test
# run: npm run test:e2e
# playwright requires more initialization: https://playwright.dev/docs/ci-intro#on-pushpull_request
# - name: e2e-test
# run: npm run test:e2e
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- name: build
run: npm run build
46 changes: 46 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import pluginVitest from '@vitest/eslint-plugin'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import pluginPlaywright from 'eslint-plugin-playwright'
import pluginVue from 'eslint-plugin-vue'

export default [
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}']
},

{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**']
},

...pluginVue.configs['flat/essential'],
...vueTsEslintConfig(),

{
...pluginVitest.configs.recommended,
files: ['src/**/__tests__/*']
},

{
...pluginPlaywright.configs['flat/recommended'],
files: ['e2e/**/*.{test,spec}.{js,ts,jsx,tsx}'],
rules: {
...pluginPlaywright.configs['flat/recommended'].rules
}
},
skipFormatting,
{
rules: {
'@typescript-eslint/no-unused-expressions': [
'error',
{
allowShortCircuit: true,
allowTernary: true
}
],
'vue/multi-word-component-names': 'off'
}
}
]
112 changes: 104 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test:e2e": "playwright test",
"build-only": "vite build",
"type-check": "vue-tsc --build --force",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"lint": "eslint . --fix",
"format": "prettier --write src/"
},
"dependencies": {
Expand All @@ -36,18 +36,22 @@
"vuetify": "3.6.15"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.15.0",
"@pinia/testing": "^0.1.7",
"@playwright/test": "^1.48.2",
"@rushstack/eslint-patch": "^1.10.4",
"@tsconfig/node18": "^18.2.4",
"@tsconfig/node20": "^20.1.4",
"@types/jsdom": "^21.1.7",
"@types/node": "^22.9.0",
"@vitejs/plugin-vue": "^5.2.0",
"@vitest/eslint-plugin": "1.1.10",
"@vue/eslint-config-prettier": "^10.1.0",
"@vue/eslint-config-typescript": "^14.1.3",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.6.0",
"eslint": "9.15.0",
"eslint-plugin-playwright": "^2.0.1",
"eslint-plugin-vue": "^9.31.0",
"jsdom": "^25.0.1",
"npm-run-all": "^4.1.5",
Expand Down
Loading