Skip to content

Commit

Permalink
fix: downgrade husky temporarily, remove git add in lint-staged config
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Feb 7, 2020
1 parent e27cac6 commit 50c4532
Show file tree
Hide file tree
Showing 13 changed files with 322 additions and 300 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@1stg/eslint-config/recommended"
"extends": "@1stg"
}
3 changes: 3 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"publish": {
"ignoreChanges": [
"**/*.md",
"**/.*",
"**/coverage/**",
"**/node_modules/**",
"**/tests/**",
"**/tsconfig.json",
"**/tslint.json",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
"type-coverage": "type-coverage --cache --detail --ignore-catch --ignore-files '**/*.d.ts' --strict"
},
"devDependencies": {
"@angular/core": "^8.2.14",
"@types/jest": "^25.1.1",
"@angular/core": "^9.0.0",
"@types/jest": "^25.1.2",
"@types/node": "^13.7.0",
"@types/react": "^16.9.19",
"@types/unist": "^2.0.3",
"core-js": "^3.6.4",
"lerna": "^3.20.2",
"npm-run-all": "^4.1.5",
"react": "^16.12.0",
"ts-jest": "^25.1.0",
"ts-jest": "^25.2.0",
"tslint": "^6.0.0",
"type-coverage": "^2.4.0",
"vue": "^2.6.11",
Expand Down
6 changes: 3 additions & 3 deletions packages/app-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"@1stg/stylelint-config": "^0.10.0",
"@1stg/tsconfig": "^0.9.0",
"@babel/core": "^7.8.4",
"@pkgr/es-modules": "^0.2.3",
"@pkgr/imagemin": "^0.3.7",
"@pkgr/es-modules": "^0.2.4",
"@pkgr/imagemin": "^0.3.8",
"browserslist": "^4.8.6",
"eslint": "^6.8.0",
"husky": "^4.2.1",
"husky": "^3.1.0",
"lint-staged": "^10.0.7",
"postcss": "^7.0.26",
"prettier": "^1.19.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@babel/preset-env": "^7.8.4",
"@babel/preset-react": "^7.8.3",
"@babel/preset-typescript": "^7.8.3",
"@pkgr/utils": "^0.3.8",
"@pkgr/utils": "^0.3.9",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"@vue/babel-preset-jsx": "^1.1.2",
"babel-plugin-import": "^1.13.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/commitlint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@commitlint/config-lerna-scopes": "^8.3.4",
"@pkgr/utils": "^0.3.8"
"@pkgr/utils": "^0.3.9"
},
"publishConfig": {
"access": "public"
Expand Down
14 changes: 7 additions & 7 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"eslint": ">=6.0.0"
},
"dependencies": {
"@pkgr/utils": "^0.3.8",
"@typescript-eslint/eslint-plugin": "^2.18.0",
"@typescript-eslint/eslint-plugin-tslint": "^2.18.0",
"@typescript-eslint/parser": "^2.18.0",
"@pkgr/utils": "^0.3.9",
"@typescript-eslint/eslint-plugin": "^2.19.0",
"@typescript-eslint/eslint-plugin-tslint": "^2.19.0",
"@typescript-eslint/parser": "^2.19.0",
"babel-eslint": "^10.0.3",
"eslint-config-prettier": "^6.10.0",
"eslint-config-standard": "^14.1.0",
Expand All @@ -22,17 +22,17 @@
"eslint-formatter-friendly": "^7.0.0",
"eslint-import-resolver-ts": "^0.4.2",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jest": "^23.6.0",
"eslint-plugin-mdx": "^1.6.8",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.18.0",
"eslint-plugin-react": "^7.18.3",
"eslint-plugin-react-hooks": "^2.3.0",
"eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-unicorn": "^15.0.1",
"eslint-plugin-unicorn": "^16.0.0",
"eslint-plugin-vue": "^6.1.2",
"is-glob": "^4.0.1",
"tiny-glob": "^0.2.6"
Expand Down
4 changes: 2 additions & 2 deletions packages/lib-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"@1stg/remark-config": "^0.4.0",
"@1stg/tsconfig": "^0.9.0",
"@babel/core": "^7.8.4",
"@pkgr/rollup": "^0.9.5",
"@pkgr/rollup": "^0.9.6",
"eslint": "^6.8.0",
"husky": "^4.2.1",
"husky": "^3.1.0",
"jest": "^25.1.0",
"lint-staged": "^10.0.7",
"prettier": "^1.19.1"
Expand Down
10 changes: 4 additions & 6 deletions packages/lint-staged/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@ const { isPkgAvailable } = require('@pkgr/utils')
const config = {
'*.{*ignore,*sh,env,env.*,gql,html,json,properties,pug,rb,vue,toml,yaml,yml}': [
'prettier --write',
'git add',
],
'.!(*browserslist|npm|yarn)rc': ['prettier --write', 'git add'],
'.!(*browserslist|npm|yarn)rc': ['prettier --write'],
'.{editorconfig|browserslistrc|npmrc|yarnrc}': [
'prettier --write --parser sh',
'git add',
],
Dockerfile: ['prettier --write', 'git add'],
Dockerfile: ['prettier --write'],
}

if (isPkgAvailable('stylelint')) {
config['*.{css,less,sass,scss,vue}'] = ['stylelint --cache --fix', 'git add']
config['*.{css,less,sass,scss,vue}'] = ['stylelint --cache --fix']
}

if (isPkgAvailable('@pkgr/imagemin')) {
config['*.{gif,jpeg,jpg,png,svg,webp}'] = ['i', 'git add']
config['*.{gif,jpeg,jpg,png,svg,webp}'] = ['i']
}

module.exports = config
5 changes: 1 addition & 4 deletions packages/lint-staged/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ if (isPkgAvailable('eslint')) {
Object.assign(
config,
{
'*.{js,jsx,md,mdx,mjs,vue}': [
'eslint --cache -f friendly --fix',
'git add',
],
'*.{js,jsx,md,mdx,mjs,vue}': ['eslint --cache -f friendly --fix'],
},
require('./ts-eslint'),
)
Expand Down
4 changes: 2 additions & 2 deletions packages/lint-staged/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"author": "JounQin <admin@1stg.me>",
"license": "MIT",
"peerDependencies": {
"lint-staged": ">=9.0.0"
"lint-staged": ">=10.0.0"
},
"dependencies": {
"@pkgr/utils": "^0.3.8",
"@pkgr/utils": "^0.3.9",
"@prettier/plugin-pug": "^1.1.5",
"@prettier/plugin-ruby": "^0.17.0",
"cross-env": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"stylelint": ">=11.0.0"
},
"dependencies": {
"@pkgr/utils": "^0.3.8",
"@pkgr/utils": "^0.3.9",
"stylelint-config-prettier": "^8.0.1",
"stylelint-config-standard": "^19.0.0",
"stylelint-high-performance-animation": "^1.4.0",
Expand Down
Loading

0 comments on commit 50c4532

Please sign in to comment.