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

feat: update eslint to v9 #63

Merged
merged 2 commits into from
Dec 19, 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
24 changes: 0 additions & 24 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ updates:
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: weekly
interval: weekly
14 changes: 7 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ jobs:
- name: Run linter
run: pnpm lint

- name: Run formatter
- name: Run formatter
run: pnpm format

- name: Run unit tests
run: pnpm test:unit
- name: Run unit tests
run: pnpm test:unit

- name: Run build
run: pnpm build

- name: Run build
run: pnpm build

- name: Run build storybook
run: pnpm build-storybook
run: pnpm build-storybook
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
pnpm-lock.yaml
*.log*
.env
dist
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ wit-vue-ui is a vue component library with components intented to use in the wit

## Installation


```bash
pnpm install wit-vue-ui
pnpm install wit-vue-ui
```

## Usage
Expand All @@ -33,4 +32,4 @@ Please make sure to update tests as appropriate.

## License

[MIT](https://choosealicense.com/licenses/mit/)
[MIT](https://choosealicense.com/licenses/mit/)
51 changes: 51 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import globals from 'globals/index.js'
import pluginJs from '@eslint/js'
import tseslint from 'typescript-eslint'
import pluginVue from 'eslint-plugin-vue'
import eslintConfigPrettier from 'eslint-config-prettier'
import storybook from 'eslint-plugin-storybook'

export default [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs['flat/strongly-recommended'],
...storybook.configs['flat/recommended'],
eslintConfigPrettier,
{
ignores: ['package/dist/**', 'dist', 'pnpm-lock.yaml', '!.storybook']
},
{
files: ['pages/*.vue'],
rules: {
'vue/multi-word-component-names': 0,
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'always',
component: 'always'
},
svg: 'always',
math: 'always'
}
]
}
},
{
files: ['**/*.vue', '**/*.ts'],
languageOptions: {
globals: {
...globals.browser,
...globals.node
},
parserOptions: {
parser: {
ts: tseslint.parser
},
ecmaVersion: 2020,
sourceType: 'module'
}
}
}
]
7 changes: 6 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<link rel="preload" as="style" onload="this.onload=null;this.rel='stylesheet'" href="https://fonts.googleapis.com/css2?family=Outfit:[email protected]&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" />
<link
rel="preload"
as="style"
onload="this.onload=null;this.rel='stylesheet'"
href="https://fonts.googleapis.com/css2?family=Outfit:[email protected]&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
</head>
Expand Down
27 changes: 16 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
"test:unit": "vitest",
"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:js": "eslint -c eslint.config.js --ignore-pattern .gitignore .",
"lint:prettier": "prettier --check .",
"lint": "pnpm run lint:js && pnpm run lint:prettier",
"lintfix": "prettier --write --list-different . && yarn lint:js --fix",
"format": "prettier --write src/",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
Expand All @@ -56,25 +59,27 @@
"@types/jsdom": "^21.1.7",
"@types/node": "^20.14.5",
"@types/vue-select": "^3.16.8",
"@vitejs/plugin-vue": "^5.1.3",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
"@vitejs/plugin-vue": "^5.2.1",
"@vue/eslint-config-prettier": "^10.1.0",
"@vue/eslint-config-typescript": "^14.1.4",
"@vue/test-utils": "^2.4.6",
"@vue/tsconfig": "^0.5.1",
"autoprefixer": "^10.4.20",
"eslint": "^8.57.0",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-vue": "^9.28.0",
"eslint": "^9.17.0",
"eslint-plugin-storybook": "^0.11.1",
"eslint-plugin-vue": "^9.32.0",
"globals": "^15.13.0",
"jsdom": "^25.0.0",
"npm-run-all2": "^6.2.0",
"postcss": "^8.4.45",
"prettier": "^3.2.5",
"prettier": "^3.4.2",
"storybook": "^8.2.9",
"tailwindcss": "^3.4.10",
"typescript": "~5.4.0",
"vite": "^5.4.5",
"typescript": "~5.7.2",
"typescript-eslint": "^8.18.1",
"vite": "^5.4.2",
"vitest": "^1.6.0",
"vue-tsc": "^2.1.6"
"vue-tsc": "^2.1.10"
},
"peerDependencies": {
"vue": "3.4.38"
Expand Down
Loading
Loading