Skip to content

Commit

Permalink
🧑‍⚕️ fix: ignores for eslint (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdsuwwz committed Apr 26, 2024
1 parent efd4bb1 commit 3fb119a
Show file tree
Hide file tree
Showing 7 changed files with 4,500 additions and 3,666 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
with:
node-version: 16.15.x

- uses: pnpm/action-setup@v2.4.0
- uses: pnpm/action-setup@v3
with:
version: 7.29.x
version: 8

- name: Install dependencies
run: pnpm install
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"vue.volar",
"antfu.iconify",
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint"
]
Expand Down
37 changes: 29 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,38 @@
{
"stylelint.validate": [
"editor.formatOnSave": false,

// Auto fix

"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never",
"source.fixAll.stylelint": "explicit"
},
"eslint.run": "onType",
"eslint.format.enable": true,
"stylelint.validate": [
"vue",
"scss"
],
"css.validate": false,
"less.validate": false,

"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"eslint.autoFixOnSave": "explicit",
"source.fixAll.stylelint": "explicit"
},
"files.autoSaveDelay": 500,
"vue.codeActions.enabled": false

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml",
"gql",
"graphql"
]
}
2 changes: 1 addition & 1 deletion __tests__/IconFont.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, describe, it } from 'vitest'
import { describe, expect, it } from 'vitest'

import { mount } from '@vue/test-utils'
import IconFontComponent from '@/components/IconFont/index.vue'
Expand Down
11 changes: 10 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,18 @@ function renameRules(rules, map) {
}

export default defineFlatConfig([
{
ignores: [
'public',
'build',
'dist',
'node_modules',
'coverage',
'src/assets/**'
]
},
{
...js.configs.recommended,
ignores: ['public', 'build', 'dist', 'node_modules', 'coverage', 'src/assets/**'],
languageOptions: {
ecmaVersion: 2022,
globals: {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
"build": "vite build",
"deploy:gh-pages": "cross-env VITE_ROUTER_MODE=hash pnpm build",
"preview": "vite preview --host",
"lint": "eslint ./src",
"lint:fix": "eslint --fix ./src",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"stylelint": "stylelint .scss, .vue ./src",
"stylelint:fix": "stylelint --fix .scss, .vue ./src"
},
"engines": {
"node": ">= 16.15.x"
"node": ">= 16.15.x",
"pnpm": ">= 8.14.x"
},
"packageManager": "pnpm@8.5.1",
"keywords": [
"vue",
"vue3",
Expand Down
Loading

0 comments on commit 3fb119a

Please sign in to comment.