feature(package) add @putout/eslint-config

This commit is contained in:
coderaiser 2019-01-17 13:43:09 +02:00
parent d5d67b108f
commit 653a7bf2fa
8 changed files with 22 additions and 41 deletions

View file

@ -1,22 +1,8 @@
{
"env": {
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"indent": ["error", 4],
"semi": "error",
"no-console": 0,
"no-use-before-define": 0,
"no-multiple-empty-lines": [
"error", {
"max": 1
}]
"no-console": 0
},
"extends": [
"eslint:recommended"
"@putout"
]
}

View file

@ -1,10 +1,4 @@
{
"env": {
"node": true,
},
"parserOptions": {
"ecmaVersion": 2018,
},
"rules": {
"no-process-exit": 0,
},

View file

@ -31,7 +31,7 @@ function main(callback) {
return callback(error);
replaceVersion('README.md', version, versionNew, callback);
replaceVersion('HELP.md', version, versionNew, function() {
replaceVersion('HELP.md', version, versionNew, () => {
const historyNew = history + rendy(template, {
date : shortdate(),
version : versionNew

View file

@ -671,7 +671,7 @@ function CmdProto() {
* shows panel right or left (or active)
*/
this.showPanel = (active) => {
const panel = DOM.getPanel({active: active});
const panel = DOM.getPanel({active});
if (!panel)
return false;
@ -920,7 +920,7 @@ function CmdProto() {
CloudCmd.loadDir({
path: dirPathPassive,
panel: panel
panel
}, () => {
const files = Info.files;
const length = files.length - 1;

View file

@ -43,7 +43,7 @@ module.exports = (name, options, callback = options) => {
const remoteURL = remoteTmpls.map((tmpl) => {
return rendy(tmpl, {
version: version
version
});
});

View file

@ -114,8 +114,8 @@ function RESTful() {
sendRequest({
method : 'PUT',
url : '/extract',
data : data,
callback : callback
data,
callback
});
};
@ -123,51 +123,51 @@ function RESTful() {
sendRequest({
method : 'PUT',
url : '/mv',
data : data,
callback : callback,
data,
callback,
imgPosition : { top: true }
});
};
this.Config = {
read: function(callback) {
read(callback) {
sendRequest({
method : 'GET',
url : '/config',
callback : callback,
callback,
imgPosition : { top: true },
notLog : true
});
},
write: function(data, callback) {
write(data, callback) {
sendRequest({
method : 'PATCH',
url : '/config',
data : data,
callback : callback,
data,
callback,
imgPosition : { top: true }
});
}
};
this.Markdown = {
read : function(url, callback) {
read(url, callback) {
sendRequest({
method : 'GET',
url : '/markdown' + url,
callback : callback,
callback,
imgPosition : { top: true },
notLog : true
});
},
render : function(data, callback) {
render(data, callback) {
sendRequest({
method : 'PUT',
url : '/markdown',
data : data,
callback : callback,
data,
callback,
imgPosition : { top: true },
notLog : true
});

View file

@ -177,6 +177,7 @@
"@cloudcmd/modal": "^1.0.0",
"@cloudcmd/olark": "^2.0.1",
"@cloudcmd/stub": "^2.0.0",
"@putout/eslint-config": "^1.0.1",
"auto-globals": "^1.7.0",
"babel-loader": "^8.0.0",
"babel-plugin-macros": "^2.2.1",

View file

@ -74,7 +74,7 @@ test('cloudfunc: render', (t) => {
const result = CloudFunc.buildFromJSON({
prefix : '',
data : JSON_FILES,
template: template
template
});
Expect += expect;