Skip to content

Commit

Permalink
feat: eslint refactor (#279)
Browse files Browse the repository at this point in the history
* feat: added vscode settings

* fix: allow local settings

* chore: add tailwind extension to recommendations

* chore: tweak gitignore

* feat: new configs (WIP)

* chore: bump deps

* chore: fix eslint config

* fix: fix eslint config

* chore: update pnpm lock

* docs: update readme

* docs: update homepage
  • Loading branch information
Uninen authored Oct 24, 2024
1 parent a5f4233 commit d33d646
Show file tree
Hide file tree
Showing 17 changed files with 1,686 additions and 3,084 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{html}]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
93 changes: 0 additions & 93 deletions .eslintrc-auto-import.json

This file was deleted.

38 changes: 0 additions & 38 deletions .eslintrc.cjs

This file was deleted.

4 changes: 0 additions & 4 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
matchManagers: ['npm'],
automerge: true,
stabilityDays: 2,
// Eslint v9 changes the configuration format and most packages are
// not compatible with it yet.
// See https://github.com/vuejs/eslint-config-prettier/issues/19
ignoreDeps: ['eslint'],
},
{
matchPackagePatterns: ['github-actions'],
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pnpm-debug.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
Expand All @@ -34,3 +33,4 @@ LOCAL_NOTES.md
/playwright/.cache
package-lock.json
*.tsbuildinfo
.vscode/starter.code-workspace
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"tabWidth": 2,
"singleQuote": true,
"printWidth": 120,
"arrowParens": "avoid",
"trailingComma": "es5"
}
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"Vue.volar",
"vitest.explorer",
"ms-playwright.playwright",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss"
]
}
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"tsconfig.json": "tsconfig.*.json, env.d.ts, auto-imports.d.ts, components.d.ts, interface-extensions.d.ts",
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .prettier*, prettier*, .editorconfig",
"tailwind.config.cjs": "postcss.config.cjs"
},
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
20 changes: 13 additions & 7 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
# Changelog

## 6.0.0 (2024-10-24)

- Feat: migrated Eslint configs to the new flat format
- Feat: added VSCode settings and extension recommendations
- Chore: bumped all deps.

## 5.4.0 (2024-06-20)

- Chore: pin Eslint version temporarily to 8.x
- Chore: bump deps
- Chore: pinned Eslint version temporarily to 8.x
- Chore: bumped all deps.

## 5.3.1 (2024-06-04)

- Chore: bump deps
- Chore: bumped all deps.

## 5.3.0 (2024-05-02)

- Refactor: realigned with create vue
- Chore: bump deps
- Chore: bumped all deps.

## 5.2.1 (2024-01-13)

- Chore: Added `github-actions` manager for Renovate

## 5.2.0 (2023-12-29)

- Feat: Upgrade Vue to version 3.4.0
- Refactor: realign TS configs to conform `create-vue`
- Feat: Upgraded Vue to version 3.4.0
- Refactor: realigned TS configs to conform `create-vue`
- Refactor: moved store and router into package index

## 5.1.0 (2023-12-04)

- Upgrade vitest to version 1.0.0
- Upgraded vitest to version 1.0.0

## 5.0.0 (2023-11-24)

Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Please [check out the homepage](https://vite-ts-tailwind-starter.vercel.app/) fo
## Features

- Vue 3
- Pinia store (fully typed Vuex store is available up to template version 1.13)
- Pinia store (fully typed Vuex store is available up to template versions 1.13)
- Routing using [vue-router 4](https://router.vuejs.org/)
- TypeScript 5
- Fully typed components configured in templates as well
Expand All @@ -22,19 +22,24 @@ Please [check out the homepage](https://vite-ts-tailwind-starter.vercel.app/) fo
- `@tailwindcss/forms`
- [@egoist/tailwindcss-icons](https://github.com/egoist/tailwindcss-icons)
- PostCSS 8 w/ `postcss-nesting` plugin and `cssnano` for minimizing production CSS
- Eslint
- Eslint 9 w/ flat config
- Prettier
- EditorConfig
- Recommended settings and configs for VSCode
- Alias `@` to `<project_root>/src`
- Predefined and fully typed global variables:
- `VITE_APP_VERSION` is read from `package.json` version at build time
- `VITE_APP_BUILD_EPOCH` is populated as `new Date().getTime()` at build time
- Vitest unit + component tests with code coverage
- Comprehensive testing setup (w/ CI integration):
- Vitest for unit and component testing with code coverage
- Playwright for E2E testing
- GitHub workflows
- Renovatebot for keeping up with dependencies
- Automated unit + component tests
- Automated e2e tests
- Coverage reporting in PR comments ([example](https://github.com/Uninen/vite-ts-tailwind-starter/pull/225#issuecomment-1507477206))
- GitLab CI config available up to versions 2.x
- GitLab CI config available up to template versions 2.x
- Vercel deployment configuration included

## Elsewhere

Expand Down
Loading

0 comments on commit d33d646

Please sign in to comment.