Permalink
Browse files

Other: More precise linter configuration

  • Loading branch information...
dcodeIO committed Mar 4, 2017
1 parent 58688c1 commit a7ab1036906bb7638193a9e991cb62c86108880a
Showing with 46 additions and 14 deletions.
  1. +9 −1 .codeclimate.yml
  2. +15 −0 .eslintignore
  3. +2 −0 .travis.yml
  4. +1 −1 bench/prof.js
  5. +1 −1 bench/read.js
  6. +1 −1 bench/suite.js
  7. +3 −3 bench/write.js
  8. +1 −0 debug.js
  9. +2 −2 examples/streaming-rpc.js
  10. +1 −0 light.js
  11. +1 −0 minimal.js
  12. +3 −3 package.json
  13. +1 −0 runtime.js
  14. +5 −2 tests/other_package.js
@@ -4,4 +4,12 @@ engines:
ratings:
paths:
- "src/**.js"
exclude_paths:
- "lib/aspromise/**.js"
- "lib/base64/**.js"
- "lib/eventemitter/**.js"
- "lib/fetch/**.js"
- "lib/inquire/**.js"
- "lib/path/**.js"
- "lib/pool/**.js"
- "lib/utf8/**.js"
exclude_paths:
@@ -0,0 +1,15 @@
bench/*
bin/*
cli/*
coverage/*
dist/*
docs/*
gulpfile.js
lib/deep-equal/*
lib/prelude.js
lib/polyfill.js
lib/tape-adapter.js
lib/tsd-jsdoc/*
sandbox/*
scripts/*
**/tests/*
@@ -14,6 +14,8 @@ addons:
apt:
sources: ubuntu-toolchain-r-test
packages: g++-4.8
code_climate:
repo_token: 20d88c0ad0ae53be53f48ef57cfec8ff6d8fc86381f742b50747335f3cebdc69
matrix:
include:
@@ -21,7 +21,7 @@ if (process.execArgv.indexOf("--prof") < 0) {
fs.unlink(file);
});
process.stdout.write("generating profile (may take a while) ...\n");
child_process.execSync("node --prof --trace-deopt " + process.execArgv.join(" ") + " " + process.argv.slice(1).join(' '), {
child_process.execSync("node --prof --trace-deopt " + process.execArgv.join(" ") + " " + process.argv.slice(1).join(" "), {
cwd: process.cwd(),
stdio: "inherit"
});
@@ -120,7 +120,7 @@ function readString(bytes) {
readString(array);
})
.add("readString buffer", function() {
readString(buffer)
readString(buffer);
})
.add("toString buffer", function() {
buffer.toString("utf8", 0, buffer.length);
@@ -27,7 +27,7 @@ function newSuite(name) {
if (fastest.indexOf(bench) === 0)
return;
var hz = hz = getHz(bench);
var percent = (1 - (hz / fastestHz)) * 100;
var percent = (1 - hz / fastestHz) * 100;
process.stdout.write(chalk.white(pad(bench.name, padSize)) + " was " + chalk.red(percent.toFixed(1) + "% slower") + "\n");
});
}
@@ -178,13 +178,13 @@ buffer = new Buffer(1000);
writeString(array, 0, str);
})
.add("writeString buffer", function() {
writeString(buffer, 0, str)
writeString(buffer, 0, str);
})
.add("write buffer", function() {
buffer.write(str, 0)
buffer.write(str, 0);
})
.add("utf8Write buffer", function() {
buffer.utf8Write(str, 0)
buffer.utf8Write(str, 0);
})
/* .add("byteLength array", function() {
byteLength(str)
@@ -1 +1,2 @@
"use strict";
module.exports = require("./src/index-debug");
@@ -10,9 +10,9 @@ var root = protobuf.Root.fromJSON({
Greeter: {
methods: {
"SayHello": {
requestType: 'Hello',
requestType: "Hello",
requestStream: true,
responseType: 'World',
responseType: "World",
responseStream: true
}
}
@@ -1 +1,2 @@
"use strict";
module.exports = require("./src/index-light");
@@ -1 +1,2 @@
"use strict";
module.exports = require("./src/index-minimal");
@@ -30,7 +30,7 @@
"coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js tests/node/*.js",
"coverage-ci": "npm run coverage && cat coverage/lcov.info | coveralls",
"docs": "jsdoc -c jsdoc.docs.json -R README.md --verbose --pedantic",
"lint": "eslint src",
"lint": "eslint **/*.js",
"pages": "node scripts/pages",
"prepublish": "node scripts/prepublish",
"postinstall": "node scripts/postinstall",
@@ -65,7 +65,7 @@
"bundle-collapser": "^1.2.1",
"chalk": "^1.1.3",
"escodegen": "^1.8.1",
"eslint": "^3.16.1",
"eslint": "^3.17.0",
"espree": "^3.1.3",
"estraverse": "^4.2.0",
"gh-pages": "^0.12.0",
@@ -87,7 +87,7 @@
"tape": "^4.6.3",
"tmp": "0.0.31",
"typescript": "^2.2.1",
"uglify-js": "^2.8.4",
"uglify-js": "^2.8.5",
"vinyl-buffer": "^1.0.0",
"vinyl-fs": "^2.4.4",
"vinyl-source-stream": "^1.1.0"
@@ -1,2 +1,3 @@
// deprecated - compatibility layer for v6.5 and earlier
"use strict";
module.exports = require("./minimal");
@@ -1,3 +1,4 @@
"use strict";
var tape = require("tape");
var protobuf = require(".."),
@@ -8,8 +9,10 @@ tape.test("package.json (reflected)", function(test) {
test.plan(2);
protobuf.load("tests/data/package.proto", function(err, root) {
if (err)
return test.fail(err.message);
if (err) {
test.fail(err.message);
return;
}
var Package = root.lookup("Package"),
Repository = root.lookup("Package.Repository");

0 comments on commit a7ab103

Please sign in to comment.