Skip to content

Commit

Permalink
chore: simplify lint stage cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiohgz committed Aug 23, 2019
1 parent 543464c commit 9193ec6
Show file tree
Hide file tree
Showing 18 changed files with 8 additions and 107 deletions.
11 changes: 1 addition & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,7 @@ Later, follow the next steps in the package recently imported:
2. Remove .npmignore (a blacklist file) and whitelist folders that should be packaged using `files` field. Also, provide `main` and `types` fields if necessary.
3. Update LICENSE year.
4. Update [`@verdaccio/eslint-config`](tools/eslint-config/package.json) and [`@verdaccio/babel-preset`](tools/babel-preset/package.json) packages to the latest version set in the monorepo and add caret (`^`). Also, remove Prettier stuff as its settings are provided by [`@verdaccio/eslint-config`](tools/eslint-config/rules/prettier.js).
5. Add `"lint:stage": "lint-staged"` script and lint-staged settings in package.json:
```json
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add
]
}
```
6. Follow the steps described in [Creating Packages](#creating-packages) to complete the flow.
5. Follow the steps described in [Creating Packages](#creating-packages) to complete the flow.

### Managing Dependencies

Expand Down
6 changes: 0 additions & 6 deletions core/commons-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,5 @@
"test": "jest",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch"
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions core/file-locking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,5 @@
"test": "jest",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch"
},
"lint-staged": {
"**/*.{ts,js}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions core/readme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,5 @@
"test": "jest",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch"
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions core/streams/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,5 @@
"test": "jest",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch"
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions core/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,5 @@
"lint": "eslint \"**/*.{js,ts}\"",
"lint:stage": "lint-staged",
"test": "tsc --noEmit"
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
}
}
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS --verbose",
"pre-commit": "lerna run lint:stage"
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
},
"commitlint": {
"extends": [
"@commitlint/config-lerna-scopes"
Expand Down
6 changes: 0 additions & 6 deletions plugins/active-directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,5 @@
"test": "jest",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch"
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions plugins/audit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,5 @@
"test": "jest",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch"
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions plugins/auth-memory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,5 @@
"test": "jest",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch"
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions plugins/aws-s3-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,5 @@
"@verdaccio/types": "^5.3.0",
"cross-env": "5.2.0",
"recursive-readdir": "2.2.2"
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions plugins/google-cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,5 @@
},
"optionalDependencies": {
"fast-crc32c": "1.0.4"
},
"lint-staged": {
"*.{ts, json}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions plugins/htpasswd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,5 @@
"extends": [
"@commitlint/config-conventional"
]
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions plugins/local-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,5 @@
"test": "jest",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch"
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions plugins/memory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,5 @@
"test": "jest",
"type-check": "tsc --noEmit",
"type-check:watch": "npm run type-check -- --watch"
},
"lint-staged": {
"**/*.{js,ts}": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions tools/babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,5 @@
"scripts": {
"lint": "eslint \"**/*.js\"",
"lint:stage": "lint-staged"
},
"lint-staged": {
"**/*.js": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions tools/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,5 @@
"lint": "eslint \"**/*.js\"",
"lint:stage": "lint-staged",
"test-prettier-rules": "eslint --print-config index.js | eslint-config-prettier-check"
},
"lint-staged": {
"**/*.js": [
"eslint --fix",
"git add"
]
}
}
6 changes: 0 additions & 6 deletions tools/eslint-plugin-verdaccio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,5 @@
"lint": "eslint \"**/*.js\"",
"lint:stage": "lint-staged",
"test": "mocha tests --recursive"
},
"lint-staged": {
"**/*.js": [
"eslint --fix",
"git add"
]
}
}

0 comments on commit 9193ec6

Please sign in to comment.