Skip to content

Commit

Permalink
fix: lerna nohoist config for eslint-midway-contrib (#499)
Browse files Browse the repository at this point in the history
* fix: lerna nohoist config for eslint-midway-contrib

* chore(devDeps): upgrade eslint and typescript

- typescript to ^3.9.3
- eslint to 7

* chore(eslint-midway-contrib): update rules

- @typescript-eslint/comma-spacing
- no-process-exit, migrate into eslint-plugin-node
  • Loading branch information
waitingsong committed May 27, 2020
1 parent 760f30c commit 7e0dd24
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lerna.json
Expand Up @@ -6,6 +6,10 @@
"bootstrap": {
"hoist": true,
"noCi": true,
"nohoist": [
"@typescript-eslint/eslint-plugin",
"@typescript-eslint/parser"
],
"npmClientArgs": [
"--no-package-lock"
]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -21,7 +21,7 @@
"tree-kill": "^1.2.0",
"tslint": "^5.17.0",
"tslint-no-unused-expression-chai": "^0.1.4",
"typescript": "^3.5.1",
"typescript": "^3.9.3",
"vuepress": "^0.14.11"
},
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions packages/eslint-midway-contrib/recommended.js
Expand Up @@ -15,6 +15,8 @@ module.exports = {
'@typescript-eslint/ban-ts-comment': [0],
'brace-style': 0,
'@typescript-eslint/brace-style': [1, 'stroustrup', { allowSingleLine: true } ],
'comma-spacing': 0,
'@typescript-eslint/comma-spacing': 1,
'@typescript-eslint/consistent-type-definitions': [2, 'interface'],
'default-param-last': 0,
'@typescript-eslint/default-param-last': 2,
Expand Down Expand Up @@ -163,6 +165,10 @@ module.exports = {
'no-useless-rename': 1,
'no-var': 2,
'object-shorthand': [1, 'always'],

// https://eslint.org/docs/rules/#deprecated
// deprecated off
'no-process-exit': 0,
},
};

2 changes: 1 addition & 1 deletion packages/midway-bin/package.json
Expand Up @@ -36,7 +36,7 @@
"devDependencies": {
"co-mocha": "^1.2.2",
"coffee": "^5.2.1",
"eslint": "^6.1.0",
"eslint": "7",
"eslint-config-egg": "^7.0.0",
"mm": "^2.5.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/midway-init/package.json
Expand Up @@ -9,7 +9,7 @@
},
"main": "lib/command.js",
"devDependencies": {
"eslint": "^6.1.0",
"eslint": "7",
"eslint-config-egg": "^7.0.0",
"midway-bin": "^1.18.6",
"mz-modules": "^2.1.0",
Expand Down

0 comments on commit 7e0dd24

Please sign in to comment.