Skip to content

Commit

Permalink
Merge pull request #29 from VicSolWang/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
VicSolWang committed Nov 21, 2023
2 parents dbb29b3 + da72b81 commit 7715a5b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
5 changes: 4 additions & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/

export default {
'**/*.{vue,js,ts}': ['prettier --write --list-different', 'eslint --fix'],
'**/*.{vue,js,ts}': [
'prettier --write --list-different',
'eslint --no-error-on-unmatched-pattern --fix',
],
'**/*.json': ['prettier --write --list-different'],
};
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"scripts": {
"lint:prettier": "prettier --check **/*.{vue,js,ts,json}",
"lint:eslint": "eslint **/*.{vue,js,ts}",
"lint:eslint": "eslint --no-error-on-unmatched-pattern **/*.{vue,js,ts}",
"lint": "npm run lint:prettier && npm run lint:eslint",
"lintfix": "prettier --write --list-different **/*.{vue,js,ts,json} && npm run lint:eslint -- --fix",
"test": "npm run lint && c8 ava",
Expand Down Expand Up @@ -47,27 +47,27 @@
"dependencies": {
"@eslint/eslintrc": "^2.1.3",
"eslint": "^8.54.0",
"eslint-config-wzx": "^0.9.5",
"eslint-config-wzx": "^0.9.7",
"eslint-plugin-vue": "^9.18.1"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"typescript": "^5.2.2"
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"typescript": "^5.3.2"
},
"devDependencies": {
"@commitlint/cli": "^18.4.2",
"@commitlint/config-conventional": "^18.4.2",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"ava": "^5.3.1",
"c8": "^8.0.1",
"fs-extra": "^11.1.1",
"husky": "^8.0.3",
"is-ci": "^3.0.1",
"lint-staged": "^15.1.0",
"prettier": "^3.1.0",
"typescript": "^5.2.2",
"typescript": "^5.3.2",
"vue": "^3.3.8"
}
}
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const compat = new FlatCompat({
const getVueConfigByVersion = async () => {
let config = 'plugin:vue/recommended';
try {
const { version } = await import('vue');
const { version } = (await import('vue')) || {};

Check warning on line 21 in src/config.js

View workflow job for this annotation

GitHub Actions / test (18, ubuntu-latest)

'vue' should be listed in the project's dependencies, not devDependencies

Check warning on line 21 in src/config.js

View workflow job for this annotation

GitHub Actions / test (18, windows-latest)

'vue' should be listed in the project's dependencies, not devDependencies

Check warning on line 21 in src/config.js

View workflow job for this annotation

GitHub Actions / test (18, macOS-latest)

'vue' should be listed in the project's dependencies, not devDependencies
const majorVersion = Number(version.split('.')[0]);
if (majorVersion === 3) {
config = 'plugin:vue/vue3-recommended';
Expand Down

0 comments on commit 7715a5b

Please sign in to comment.