forked from enviPath/enviPy
Current Dev State
This commit is contained in:
37
static/js/ketcher2/node_modules/eslint/lib/rules/no-void.js
generated
vendored
Normal file
37
static/js/ketcher2/node_modules/eslint/lib/rules/no-void.js
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @fileoverview Rule to disallow use of void operator.
|
||||
* @author Mike Sidorov
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Rule Definition
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
module.exports = {
|
||||
meta: {
|
||||
docs: {
|
||||
description: "disallow `void` operators",
|
||||
category: "Best Practices",
|
||||
recommended: false
|
||||
},
|
||||
|
||||
schema: []
|
||||
},
|
||||
|
||||
create(context) {
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
return {
|
||||
UnaryExpression(node) {
|
||||
if (node.operator === "void") {
|
||||
context.report({ node, message: "Expected 'undefined' and instead saw 'void'." });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user