-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- eslintrc重写 - 移除prettier - update node package
- Loading branch information
bubao
committed
Jul 21, 2020
1 parent
6c26022
commit d425429
Showing
24 changed files
with
485 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,53 @@ | ||
{ | ||
"root": true, | ||
"env": { | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"standard", | ||
"prettier", | ||
"plugin:node/recommended" | ||
], | ||
"plugins": [ | ||
"standard", | ||
"prettier" | ||
], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"semi": [ | ||
2, | ||
"always" | ||
], | ||
"quotes": [ | ||
2, | ||
"double" | ||
], | ||
"no-multiple-empty-lines": "error", | ||
"no-var": "error", | ||
"no-template-curly-in-string": "off", | ||
"node/no-deprecated-api": "off", | ||
"camelcase": "off", | ||
"no-bitwise": "off", | ||
"no-case-declarations": "off", | ||
"no-new": "off", | ||
"new-cap": "off", | ||
"no-unmodified-loop-condition": "off", | ||
"no-loop-func": "off", | ||
"prefer-promise-reject-errors": "off", | ||
"node/no-unsupported-features/es-syntax": "off", | ||
"standard/no-callback-literal": "off" | ||
} | ||
"root": true, | ||
"env": { | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:node/recommended", | ||
"standard" | ||
], | ||
"plugins": [ | ||
"standard" | ||
], | ||
"rules": { | ||
"semi": [ | ||
2, | ||
"always" | ||
], | ||
"space-infix-ops": [ | ||
"error", | ||
{ | ||
"int32Hint": false | ||
} | ||
], | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"indent": [ | ||
"error", | ||
"tab" | ||
], | ||
"no-use-before-define": "error", | ||
"no-tabs": "off", | ||
"no-multiple-empty-lines": "error", | ||
"no-var": "error", | ||
"no-unused-vars": "error", | ||
"no-undef": "error", | ||
"no-template-curly-in-string": "off", | ||
"node/no-deprecated-api": "off", | ||
"camelcase": "off", | ||
"no-bitwise": "off", | ||
"no-case-declarations": "off", | ||
"no-new": "off", | ||
"new-cap": "off", | ||
"no-unmodified-loop-condition": "off", | ||
"no-loop-func": "off", | ||
"prefer-promise-reject-errors": "off", | ||
"node/no-unsupported-features/es-syntax": "off", | ||
"standard/no-callback-literal": "off" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* @description: | ||
* @author: bubao | ||
* @Date: 2020-07-21 18:21:28 | ||
* @LastEditors: bubao | ||
* @LastEditTime: 2020-07-21 20:43:13 | ||
*/ | ||
const Base = require("../Base"); | ||
const API = require("../../config/api/index"); | ||
const { info } = require("./single"); | ||
/** | ||
* @description 知乎专栏文章 | ||
* @author bubao | ||
* @date 2020-07-21 | ||
* @class Articles | ||
* @extends {Base} | ||
*/ | ||
class Articles extends Base { | ||
/** | ||
*Creates an instance of Articles. | ||
* @author bubao | ||
* @date 2020-07-21 | ||
* @param {string} columnsId 专栏id | ||
* @memberof Articles | ||
*/ | ||
constructor (columnsId) { | ||
super(); | ||
if (columnsId) { | ||
this.init(columnsId); | ||
} | ||
} | ||
|
||
/** | ||
* @description 初始化 | ||
* @author bubao | ||
* @date 2020-07-21 | ||
* @param {string} columnsId | ||
* @memberof Articles | ||
*/ | ||
init (columnsId) { | ||
this.ReqOps = { | ||
gzip: true, | ||
url: API.columns.articles({ columnsId }) | ||
}; | ||
this._next = this.ReqOps.url; | ||
this.columnsId = columnsId; | ||
} | ||
|
||
/** | ||
* @description 知乎专栏信息 | ||
* @author bubao | ||
* @date 2020-07-21 | ||
* @returns | ||
* @memberof Articles | ||
*/ | ||
async info () { | ||
return await info(this.columnsId); | ||
} | ||
} | ||
|
||
module.exports = Articles; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* @description: | ||
* @author: bubao | ||
* @Date: 2020-07-21 18:40:15 | ||
* @LastEditors: bubao | ||
* @LastEditTime: 2020-07-21 19:35:50 | ||
*/ | ||
const Base = require("../Base"); | ||
const API = require("../../config/api/index"); | ||
// const { request } = require("../../config/commonModules"); | ||
|
||
/** | ||
* @description 知乎专栏关注者 | ||
* @author bubao | ||
* @date 2020-07-21 | ||
* @class Followers | ||
* @extends {Base} | ||
*/ | ||
class Followers extends Base { | ||
/** | ||
*Creates an instance of Followers. | ||
* @author bubao | ||
* @date 2020-07-21 | ||
* @param {string} columnsId 专栏id | ||
* @memberof Articles | ||
*/ | ||
constructor (columnsId) { | ||
super(); | ||
if (columnsId) { | ||
this.init(columnsId); | ||
} | ||
} | ||
|
||
/** | ||
* @description 初始化 | ||
* @author bubao | ||
* @date 2020-07-21 | ||
* @param {string} columnsId | ||
* @memberof Articles | ||
*/ | ||
init (columnsId) { | ||
this.ReqOps = { | ||
gzip: true, | ||
url: API.columns.followers({ columnsId }) | ||
}; | ||
this._next = this.ReqOps.url; | ||
this.columnsId = columnsId; | ||
} | ||
} | ||
|
||
module.exports = Followers; |
Oops, something went wrong.