1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00

removed some eslint warings

This commit is contained in:
Falk Werner 2019-02-19 21:26:06 +01:00
parent b1c72dab3c
commit abb951c0c6
6 changed files with 21 additions and 7 deletions

View File

@ -1,3 +1,5 @@
/* exported Connection */
class Connection { class Connection {
constructor() { constructor() {

View File

@ -1,3 +1,5 @@
/* exported ConnectionView */
class ConnectionView { class ConnectionView {
constructor(connection) { constructor(connection) {
this.connection = connection; this.connection = connection;

View File

@ -1,3 +1,6 @@
/* exported FileSystem */
/* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */
class FileSystem { class FileSystem {
static get GOOD() { return 0; } static get GOOD() { return 0; }
static get BAD() { return 1; } static get BAD() { return 1; }
@ -104,7 +107,7 @@ class FileSystem {
return result; return result;
} }
close(inode, handle, mode) { close(_inode, _handle, _mode) {
// do nothing // do nothing
return true; return true;
} }

View File

@ -1,3 +1,5 @@
/* exported FileSystemHandler */
/* eslint no-console: "off" */
class FileSystemHandler { class FileSystemHandler {

View File

@ -2,7 +2,7 @@
"name": "wsfs-provider", "name": "wsfs-provider",
"version": "0.1.0", "version": "0.1.0",
"description": "Provider for websocket filesystem (wsfs)", "description": "Provider for websocket filesystem (wsfs)",
"main": "filesystem.js", "main": "startup.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },

View File

@ -1,3 +1,9 @@
/* global Connection, ConnectionView, FileSystem, FileSystemHandler */
function mode(value) {
return parseInt(value, 8);
}
function startup() { function startup() {
let connection = new Connection(); let connection = new Connection();
let connectionView = new ConnectionView(connection); let connectionView = new ConnectionView(connection);
@ -5,16 +11,15 @@ function startup() {
let fs = new FileSystem({ let fs = new FileSystem({
inode: 1, inode: 1,
mode: 0755, mode: mode("0755"),
type: "dir", type: "dir",
entries: { entries: {
"hello.txt" : { inode: 2, mode: 0444, type: "file", contents: "Hello, World!"}, "hello.txt" : { inode: 2, mode: mode("0444"), type: "file", contents: "Hello, World!"},
"say_hello.sh": { inode: 3, mode: 0555, type: "file", contents: "#!/bin/sh\necho hello\n"} "say_hello.sh": { inode: 3, mode: mode("0555"), type: "file", contents: "#!/bin/sh\necho hello\n"}
} }
}); });
let handler = new FileSystemHandler(fs, connection); let handler = new FileSystemHandler(fs, connection);
} }
window.onload = startup; window.onload = startup;