|
3 | 3 | "version": "1.5.2", |
4 | 4 | "description": "Offical blog plugin for VuePress", |
5 | 5 | "scripts": { |
6 | | - "lint": "xo", |
| 6 | + "lint": "eslint src --ext .ts,.vue", |
7 | 7 | "dev": "concurrently \"rimraf lib\" \"npm:dev:client\" \"npm:dev:node\" \"nodemon\"", |
8 | 8 | "build": "concurrently \"rimraf lib\" \"npm:build:client\" \"npm:build:node\" \"npm:build:components\"", |
9 | 9 | "dev:client": "tsc -p tsconfig.client.json --watch", |
|
28 | 28 | }, |
29 | 29 | "author": "ULIVZ <chl814@foxmail.com>", |
30 | 30 | "license": "MIT", |
| 31 | + "husky": { |
| 32 | + "hooks": { |
| 33 | + "pre-commit": "lint-staged" |
| 34 | + } |
| 35 | + }, |
| 36 | + "lint-staged": { |
| 37 | + "*.{js,ts,vue}": [ |
| 38 | + "eslint --fix", |
| 39 | + "git add" |
| 40 | + ] |
| 41 | + }, |
31 | 42 | "dependencies": { |
32 | 43 | "@vssue/api-github-v3": "^1.1.2", |
33 | 44 | "@vssue/vuepress-plugin-vssue": "^1.2.0", |
|
36 | 47 | "vuepress-plugin-sitemap": "^2.3.0" |
37 | 48 | }, |
38 | 49 | "devDependencies": { |
| 50 | + "@typescript-eslint/eslint-plugin": "^2.11.0", |
| 51 | + "@typescript-eslint/parser": "^2.11.0", |
| 52 | + "babel-eslint": "^10.0.3", |
39 | 53 | "concurrently": "^4.1.0", |
40 | 54 | "conventional-changelog-cli": "^2.0.1", |
41 | 55 | "cpx": "^1.5.0", |
| 56 | + "eslint": "^6.7.2", |
| 57 | + "eslint-config-prettier": "^6.7.0", |
| 58 | + "eslint-plugin-prettier": "^3.1.1", |
| 59 | + "eslint-plugin-vue": "^6.0.1", |
| 60 | + "husky": "^3.1.0", |
42 | 61 | "inquirer": "^6.3.1", |
| 62 | + "lint-staged": "^9.5.0", |
43 | 63 | "nodemon": "^1.18.7", |
| 64 | + "prettier": "^1.19.1", |
44 | 65 | "rimraf": "^3.0.0", |
45 | 66 | "ts-node": "^7.0.1", |
46 | 67 | "typescript": "3.1.4", |
|
53 | 74 | "src/client/components/" |
54 | 75 | ] |
55 | 76 | }, |
56 | | - "xo": { |
57 | | - "extends": [ |
58 | | - "rem", |
59 | | - "plugin:prettier/recommended", |
60 | | - "xo-typescript" |
61 | | - ], |
62 | | - "extensions": [ |
63 | | - "ts" |
64 | | - ], |
65 | | - "rules": { |
66 | | - "unicorn/filename-case": "off", |
67 | | - "new-cap": "off", |
68 | | - "typescript/no-inferrable-types": "off", |
69 | | - "import/no-unassigned-import": "off", |
70 | | - "typescript/explicit-function-return-type": "off", |
71 | | - "no-throw-literal": "off", |
72 | | - "typescript/no-var-requires": "off", |
73 | | - "no-implicit-globals": "off", |
74 | | - "import/no-unresolved": "off", |
75 | | - "import/no-extraneous-dependencies": "off", |
76 | | - "typescript/no-use-before-define": "off", |
77 | | - "typescript/no-type-alias": "off" |
78 | | - } |
79 | | - }, |
80 | 77 | "publishConfig": { |
81 | 78 | "registry": "https://registry.npmjs.org/" |
82 | 79 | } |
|
0 commit comments