We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 843c110 commit 68b033bCopy full SHA for 68b033b
tools/eslint-rules/set-proto-to-null-in-object.js
@@ -50,16 +50,12 @@ module.exports = {
50
const firstProperty = properties[0];
51
const firstPropertyToken = sourceCode.getFirstToken(firstProperty);
52
53
- let fixText = `__proto__: null`;
+ let fixText = `__proto__: null, `;
54
55
- if (properties.length > 1) {
56
- fixText += ',';
57
-
58
- if (properties[0].loc.start.line !== properties[1].loc.start.line) {
59
- fixText += '\n';
60
- } else {
61
- fixText += ' ';
62
- }
+ if (properties.length > 1 && properties[0].loc.start.line !== properties[1].loc.start.line) {
+ fixText += '\n';
+ } else {
+ fixText += ' ';
63
}
64
65
// Insert the fix suggestion before the first property
0 commit comments