Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove/lint #286

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

45 changes: 0 additions & 45 deletions .eslintrc

This file was deleted.

3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ typings/
# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
When contributing to this repository, please first discuss the change you wish to make via an issue, unless it's entirely trivial (typo fixes, etc.). If there is already an issue that describes the change you have in mind, comment on it indicating that you're going to work on that. This way we can avoid the situation when several people work on the same thing.

## Guidelines ##
- Code should follow the [AirBnB style guide](https://github.com/airbnb/javascript) (with a few exceptions), check for linting errors before submitting a PR
- Code should follow the [AirBnB style guide](https://github.com/airbnb/javascript) (with a few exceptions)

Check notice on line 10 in CONTRIBUTING.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

CONTRIBUTING.md#L10

Lists should be surrounded by blank lines
- New pull requests must be accompanied by **passing tests** written by the task owner
- see [tests/suite/README.md](https://github.com/multiparty/jiff/tree/master/tests/suite/README.md)
- Code should not use ES6 features, as JIFF aims to be compatible with as many browsers as possible
Expand Down
2 changes: 0 additions & 2 deletions demos/array-binary-search/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ function connect(party_id) {

hostname = hostname + ':' + port;

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'init_' + String(party_id),
hostname: hostname,
Expand All @@ -39,7 +38,6 @@ worker.onmessage = function (e) {
}
};

// eslint-disable-next-line no-unused-vars
function submit(party_id) {
let arr;
if (party_id == 1) {
Expand Down
5 changes: 0 additions & 5 deletions demos/array-binary-search/mpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
opt.crypto_provider = true;

if (node) {
// eslint-disable-next-line no-undef
JIFFClient = require('../../lib/jiff-client');
// eslint-disable-next-line no-undef,no-global-assign
$ = require('jquery-deferred');
// eslint-disable-next-line no-undef
jiff_websockets = require('../../lib/ext/jiff-client-websockets.js');
}

// eslint-disable-next-line no-undef
const jiff_instance = new JIFFClient(hostname, computation_id, opt);
// eslint-disable-next-line no-undef
jiff_instance.apply_extension(jiff_websockets, opt);

return jiff_instance;
Expand Down
3 changes: 0 additions & 3 deletions demos/array-bubble-sort/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function connect(party_id) {

hostname = hostname + ':' + port;

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'init_' + String(party_id),
hostname: hostname,
Expand All @@ -44,7 +43,6 @@ worker.onmessage = function (e) {
}
};

// eslint-disable-next-line no-unused-vars
function submit(party_id) {
$('#submit' + String(party_id)).attr('disabled', true);
const arr = JSON.parse(document.getElementById('inputText' + String(party_id)).value);
Expand All @@ -56,7 +54,6 @@ function submit(party_id) {
}
}

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'compute' + String(party_id),
input: arr
Expand Down
5 changes: 0 additions & 5 deletions demos/array-bubble-sort/mpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
opt.crypto_provider = true;

if (node) {
// eslint-disable-next-line no-undef
JIFFClient = require('../../lib/jiff-client');
// eslint-disable-next-line no-undef,no-global-assign
$ = require('jquery-deferred');
// eslint-disable-next-line no-undef
jiff_websockets = require('../../lib/ext/jiff-client-websockets.js');
}

// eslint-disable-next-line no-undef
const jiff_instance = new JIFFClient(hostname, computation_id, opt);
// eslint-disable-next-line no-undef
jiff_instance.apply_extension(jiff_websockets, opt);

return jiff_instance;
Expand Down
3 changes: 0 additions & 3 deletions demos/array-concat/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function connect(party_id) {

hostname = hostname + ':' + port;

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'init_' + String(party_id),
hostname: hostname,
Expand All @@ -44,13 +43,11 @@ worker.onmessage = function (e) {
}
};

// eslint-disable-next-line no-unused-vars
function submit(party_id) {
$('#submit' + String(party_id)).attr('disabled', true);

const _string = document.getElementById('inputText' + String(party_id)).value;

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'compute' + String(party_id),
input: _string
Expand Down
5 changes: 0 additions & 5 deletions demos/array-concat/mpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
opt.crypto_provider = true;

if (node) {
// eslint-disable-next-line no-undef
JIFFClient = require('../../lib/jiff-client');
// eslint-disable-next-line no-undef,no-global-assign
$ = require('jquery-deferred');
// eslint-disable-next-line no-undef
jiff_websockets = require('../../lib/ext/jiff-client-websockets.js');
}

// eslint-disable-next-line no-undef
let jiff_instance = new JIFFClient(hostname, computation_id, opt);
// eslint-disable-next-line no-undef
jiff_instance.apply_extension(jiff_websockets, opt);

return jiff_instance;
Expand Down
3 changes: 0 additions & 3 deletions demos/array-merge-sort/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function connect(party_id) {

hostname = hostname + ':' + port;

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'init_' + String(party_id),
hostname: hostname,
Expand All @@ -44,7 +43,6 @@ worker.onmessage = function (e) {
}
};

// eslint-disable-next-line no-unused-vars
function submit(party_id) {
$('#submit' + String(party_id)).attr('disabled', true);

Expand Down Expand Up @@ -72,7 +70,6 @@ function submit(party_id) {
lg = lg / 2;
}

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'compute' + String(party_id),
input: arr
Expand Down
5 changes: 0 additions & 5 deletions demos/array-merge-sort/mpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
opt.crypto_provider = true;

if (node) {
// eslint-disable-next-line no-undef
JIFFClient = require('../../lib/jiff-client');
// eslint-disable-next-line no-undef,no-global-assign
$ = require('jquery-deferred');
// eslint-disable-next-line no-undef
jiff_websockets = require('../../lib/ext/jiff-client-websockets.js');
}

// eslint-disable-next-line no-undef
const jiff_instance = new JIFFClient(hostname, computation_id, opt);
// eslint-disable-next-line no-undef
jiff_instance.apply_extension(jiff_websockets, opt);

return jiff_instance;
Expand Down
4 changes: 0 additions & 4 deletions demos/array-mpc-as-a-service/client-mpc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
(function (exports, node) {
if (node) {
// eslint-disable-next-line no-undef
JIFFClient = require('../../lib/jiff-client.js');
// eslint-disable-next-line no-undef
jiff_restAPI = require('../../lib/ext/jiff-client-restful.js');
}

Expand All @@ -18,9 +16,7 @@
opt['party_count'] = config.party_count;
opt['autoConnect'] = false;

// eslint-disable-next-line no-undef
__jiff_instance = new JIFFClient(hostname, computation_id, opt);
// eslint-disable-next-line no-undef
__jiff_instance.apply_extension(jiff_restAPI);
__jiff_instance.connect();
return __jiff_instance;
Expand Down
3 changes: 0 additions & 3 deletions demos/array-mpc-as-a-service/client.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
let worker = new Worker('./web-worker.js');
/* global config */

// eslint-disable-next-line no-unused-vars
function connect(party_id) {
$('#connectButton').prop('disabled', true);
const computation_id = $('#computation_id').val();
Expand Down Expand Up @@ -33,7 +32,6 @@ function connect(party_id) {
});
}

// eslint-disable-next-line no-unused-vars
function submit(party_id) {
const arr = JSON.parse(document.getElementById('inputText' + String(party_id)).value);

Expand All @@ -48,7 +46,6 @@ function submit(party_id) {
return;
}
}
// eslint-disable-next-line no-undef
worker.postMessage({
type: 'compute' + String(party_id),
input: arr
Expand Down
2 changes: 0 additions & 2 deletions demos/array-mpc-as-a-service/tests/test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// eslint-disable-next-line no-undef
describe('MPC-as-a-service (Array Version)', function () {
this.timeout(0);

// eslint-disable-next-line no-undef
it(process.env.TEST_CONFIG, function (done) {
const config = require('./../' + process.env.TEST_CONFIG);
const clientMPC = require('./../client-mpc.js');
Expand Down
3 changes: 0 additions & 3 deletions demos/array-shell-sort/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function connect(party_id) {

hostname = hostname + ':' + port;

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'init_' + String(party_id),
hostname: hostname,
Expand All @@ -44,7 +43,6 @@ worker.onmessage = function (e) {
}
};

// eslint-disable-next-line no-unused-vars
function submit(party_id) {
$('#submit' + String(party_id)).attr('disabled', true);
const arr = JSON.parse(document.getElementById('inputText' + String(party_id)).value);
Expand All @@ -63,7 +61,6 @@ function submit(party_id) {
// Disable UI controls
$('#button').attr('disabled', true);

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'compute' + String(party_id),
input: arr
Expand Down
5 changes: 0 additions & 5 deletions demos/array-shell-sort/mpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@
opt.crypto_provider = true;

if (node) {
// eslint-disable-next-line no-undef
JIFFClient = require('../../lib/jiff-client');
// eslint-disable-next-line no-undef,no-global-assign
$ = require('jquery-deferred');
// eslint-disable-next-line no-undef
jiff_websockets = require('../../lib/ext/jiff-client-websockets.js');
}

// eslint-disable-next-line no-undef
const jiff_instance = new JIFFClient(hostname, computation_id, opt);
// eslint-disable-next-line no-undef
jiff_instance.apply_extension(jiff_websockets, opt);

return jiff_instance;
Expand Down
3 changes: 0 additions & 3 deletions demos/array-shuffle/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function connect(party_id) {

hostname = hostname + ':' + port;

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'init_' + String(party_id),
hostname: hostname,
Expand All @@ -44,7 +43,6 @@ worker.onmessage = function (e) {
}
};

// eslint-disable-next-line no-unused-vars
function submit(party_id) {
$('#submit' + String(party_id)).attr('disabled', true);

Expand All @@ -57,7 +55,6 @@ function submit(party_id) {
}
}

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'compute' + String(party_id),
input: arr
Expand Down
5 changes: 0 additions & 5 deletions demos/array-shuffle/mpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
opt.crypto_provider = true;

if (node) {
// eslint-disable-next-line no-undef
JIFFClient = require('../../lib/jiff-client');
// eslint-disable-next-line no-undef,no-global-assign
$ = require('jquery-deferred');
// eslint-disable-next-line no-undef
jiff_websockets = require('../../lib/ext/jiff-client-websockets.js');
}

// eslint-disable-next-line no-undef
const jiff_instance = new JIFFClient(hostname, computation_id, opt);
// eslint-disable-next-line no-undef
jiff_instance.apply_extension(jiff_websockets, opt);

return jiff_instance;
Expand Down
3 changes: 0 additions & 3 deletions demos/array-substring/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function connect(party_id) {

hostname = hostname + ':' + port;

// eslint-disable-next-line no-undef
worker.postMessage({
type: 'init_' + String(party_id),
hostname: hostname,
Expand All @@ -47,15 +46,13 @@ worker.onmessage = function (e) {
}
};

// eslint-disable-next-line no-unused-vars
function submit(party_id) {
$('#submit' + String(party_id)).attr('disabled', true);
const input = $('#inputText' + String(party_id)).val();

if (input.length == null) {
$('#output').append("<p class='error'>Input a valid string!</p>");
} else {
// eslint-disable-next-line no-undef
worker.postMessage({
type: 'compute' + String(party_id),
input: input
Expand Down
Loading
Loading