Added circleci config and eslint

remixd
ioedeveloper 5 years ago
parent daea355fa9
commit fbe6ba648a
  1. 32
      .circleci/config.yml
  2. 20
      .eslintrc.json
  3. 1253
      package-lock.json
  4. 13
      package.json
  5. 1
      src/router.js
  6. 8
      src/services/sharedFolder.js
  7. 2
      src/websocket.js

@ -0,0 +1,32 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
remixd:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "package.json"
working_directory: ~/remixd
steps:
- checkout
- run: npm install
- run: npm run lint
- run: npm run test
workflows:
version: 2
build_all:
jobs:
- remixd

@ -0,0 +1,20 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": [
"standard"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"standard/no-callback-literal": 0
}
}

1253
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -7,11 +7,12 @@
"remixd": "./bin/remixd" "remixd": "./bin/remixd"
}, },
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\"",
"start": "./bin/remixd", "start": "./bin/remixd",
"npip": "npip", "npip": "npip",
"install-python-deps": "npip install", "install-python-deps": "npip install",
"prepublish": "npm run install-python-deps" "prepublish": "npm run install-python-deps",
"lint": "eslint ./src"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -46,5 +47,13 @@
"dependencies": { "dependencies": {
"vyper": ">=0.1.0b3" "vyper": ">=0.1.0b3"
} }
},
"devDependencies": {
"eslint": "6.8.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-standard": "4.0.1"
} }
} }

@ -7,6 +7,7 @@ class Router {
this.service = service this.service = service
this.initCallback = initCallback this.initCallback = initCallback
} }
start () { start () {
var websocket = new Websocket(this.port, this.opt) var websocket = new Websocket(this.port, this.opt)
this.websocket = websocket this.websocket = websocket

@ -52,11 +52,11 @@ module.exports = {
isbinaryfile(path, (error, isBinary) => { isbinaryfile(path, (error, isBinary) => {
if (error) console.log(error) if (error) console.log(error)
if (isBinary) { if (isBinary) {
cb(null, {content: '<binary content not displayed>', readonly: true}) cb(null, { content: '<binary content not displayed>', readonly: true })
} else { } else {
fs.readFile(path, 'utf8', (error, data) => { fs.readFile(path, 'utf8', (error, data) => {
if (error) console.log(error) if (error) console.log(error)
cb(error, {content: data, readonly: false}) cb(error, { content: data, readonly: false })
}) })
} }
}) })
@ -131,7 +131,7 @@ module.exports = {
setupNotifications: function (path) { setupNotifications: function (path) {
if (!isRealPath(path)) return if (!isRealPath(path)) return
var watcher = chokidar.watch(path, {depth: 0, ignorePermissionErrors: true}) var watcher = chokidar.watch(path, { depth: 0, ignorePermissionErrors: true })
console.log('setup notifications for ' + path) console.log('setup notifications for ' + path)
/* we can't listen on created file / folder /* we can't listen on created file / folder
watcher.on('add', (f, stat) => { watcher.on('add', (f, stat) => {
@ -173,5 +173,5 @@ function isRealPath (path, cb) {
} }
function message (name, value) { function message (name, value) {
return JSON.stringify({type: 'notification', scope: 'sharedfolder', name: name, value: value}) return JSON.stringify({ type: 'notification', scope: 'sharedfolder', name: name, value: value })
} }

@ -24,7 +24,7 @@ class WebSocket {
httpServer: this.server, httpServer: this.server,
autoAcceptConnections: false, autoAcceptConnections: false,
maxReceivedFrameSize: 131072, maxReceivedFrameSize: 131072,
maxReceivedMessageSize: 10 * 1024 * 1024, maxReceivedMessageSize: 10 * 1024 * 1024
}) })
this.wsServer.on('request', (request) => { this.wsServer.on('request', (request) => {

Loading…
Cancel
Save