eslint: move ignore patterns to main config

This commit is contained in:
Vitaly Puzrin 2020-11-07 13:18:40 +03:00
parent 89b5e653fa
commit a7257c3aea
12 changed files with 35 additions and 39 deletions

View file

@ -1,7 +0,0 @@
coverage/
demo/
dist/
node_modules
support/demo_template/sample.js
benchmark/implementations/
test/browser

View file

@ -9,6 +9,10 @@ globals:
Uint16Array: false
Int32Array: false
ignorePatterns:
- coverage/
- dist/
rules:
accessor-pairs: 2
array-bracket-spacing: [ 2, "always", { "singleValue": true, "objectsInArrays": true, "arraysInArrays": true } ]

View file

@ -1,8 +1,8 @@
'use strict'
'use strict';
var deflateSync = require('zlibjs').deflateSync;
exports.run = function(data, level) {
exports.run = function (data, level) {
// Compression levels not supported. Use unknown defaults always
return deflateSync(data.typed, { level: level });
}
};

View file

@ -1,11 +1,10 @@
'use strict'
'use strict';
var pako = require('../../../');
var utils = require('../../../lib/utils/common');
exports.run = function(data, level) {
exports.run = function (data, level) {
pako.deflate(data.string, {
level: level,
to: 'string'
});
}
};

View file

@ -1,12 +1,12 @@
'use strict'
'use strict';
var pako = require('../../../');
var utils = require('../../../lib/utils/common');
exports.run = function(data, level) {
exports.run = function (data, level) {
utils.setTyped(false);
pako.deflate(data.typed, {
level: level
});
utils.setTyped(true);
}
};

View file

@ -1,9 +1,9 @@
'use strict'
'use strict';
var pako = require('../../../');
exports.run = function(data, level) {
exports.run = function (data, level) {
return pako.deflate(data.typed, {
level: level
});
}
};

View file

@ -1,7 +1,7 @@
'use strict'
'use strict';
var zlib = require('zlib');
exports.run = function(data, level, callback) {
zlib.deflateSync(data.buffer, {level:level});
}
exports.run = function (data, level) {
zlib.deflateSync(data.buffer, { level:level });
};

View file

@ -1,8 +1,8 @@
'use strict'
'use strict';
var inflateSync = require('zlibjs').inflateSync;
exports.run = function(data, level) {
exports.run = function (data/*, level*/) {
// Compression levels not supported. Use unknown defaults always
return inflateSync(data.deflateTyped);
}
};

View file

@ -1,9 +1,9 @@
'use strict'
'use strict';
var pako = require('../../../');
exports.run = function(data) {
exports.run = function (data) {
return pako.inflate(data.deflateString, {
to: 'string'
});
}
};

View file

@ -1,11 +1,11 @@
'use strict'
'use strict';
var pako = require('../../../');
var utils = require('../../../lib/utils/common');
exports.run = function(data, level) {
exports.run = function (data/*, level*/) {
utils.setTyped(false);
pako.inflate(data.deflateTyped, {
});
utils.setTyped(true);
}
};

View file

@ -1,8 +1,8 @@
'use strict'
'use strict';
var pako = require('../../../');
exports.run = function(data) {
exports.run = function (data) {
return pako.inflate(data.deflateTyped, {
});
}
};

View file

@ -1,7 +1,7 @@
'use strict'
'use strict';
var zlib = require('zlib');
exports.run = function(data) {
exports.run = function (data) {
zlib.inflateSync(data.deflateBuffer);
}
};