Skip to content

Commit 2c5ef95

Browse files
committed
CLI: Extend list of ignored ESLint rules for pbjs, fixes #1085
1 parent 36fc964 commit 2c5ef95

27 files changed

+28
-28
lines changed

bench/data/static_pbjs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/
1+
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
22
"use strict";
33

44
var $protobuf = require("../../minimal");

cli/pbjs.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,17 @@ var targets = util.requireAll("./targets");
2020
* @returns {number|undefined} Exit code, if known
2121
*/
2222
exports.main = function main(args, callback) {
23-
var lintDefault = "eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins";
23+
var lintDefault = "eslint-disable " + [
24+
"block-scoped-var",
25+
"id-length",
26+
"no-control-regex",
27+
"no-magic-numbers",
28+
"no-prototype-builtins",
29+
"no-redeclare",
30+
"no-shadow",
31+
"no-var",
32+
"sort-vars"
33+
].join(", ");
2434
var argv = minimist(args, {
2535
alias: {
2636
target: "t",

cli/pbts.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ exports.main = function(args, callback) {
139139
});
140140

141141
function getImportName(importItem) {
142-
var result = path.basename(importItem, ".js")
143-
return result.replace(/([-_~.+]\w)/g, match => {
142+
return path.basename(importItem, ".js").replace(/([-_~.+]\w)/g, function(match) {
144143
return match[1].toUpperCase();
145144
});
146145
}

dist/light/protobuf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/light/protobuf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/minimal/protobuf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/minimal/protobuf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/descriptor/index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as $protobuf from "../..";
2-
32
export const FileDescriptorSet: $protobuf.Type;
43

54
export const FileDescriptorProto: $protobuf.Type;

0 commit comments

Comments
 (0)