refactor: adopt POSITIONS constants, fix ESLint warnings, break menuUtils into modules
- Replace hardcoded position strings with POSITIONS.* constants - Prefix unused variables with _ to resolve no-unused-vars warnings - Fix no-prototype-builtins with Object.prototype.hasOwnProperty.call() - Extract menuUtils.js (543 lines) into 6 focused modules under menu/ - menuUtils.js now 35 lines, delegates via prototype mixin pattern - Add 158 unit tests for ConfigManager, MeasurementContainer, ValidationUtils Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
var metric
|
||||
, imperial;
|
||||
var metric;
|
||||
|
||||
metric = {
|
||||
ea: {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
var metric
|
||||
, imperial;
|
||||
var metric;
|
||||
|
||||
metric = {
|
||||
ppm: {
|
||||
|
||||
@@ -249,7 +249,7 @@ Converter.prototype.list = function (measure) {
|
||||
Converter.prototype.throwUnsupportedUnitError = function (what) {
|
||||
var validUnits = [];
|
||||
|
||||
each(measures, function (systems, measure) {
|
||||
each(measures, function (systems, _measure) {
|
||||
each(systems, function (units, system) {
|
||||
if(system == '_anchors')
|
||||
return false;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
* Available under MIT license <http://lodash.com/license>
|
||||
*/
|
||||
var isObject = require('./../lodash.isobject'),
|
||||
noop = require('./../lodash.noop'),
|
||||
reNative = require('./../lodash._renative');
|
||||
|
||||
/* Native method shortcuts for methods with the same name as other `lodash` methods */
|
||||
@@ -21,7 +20,7 @@ var nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate;
|
||||
* @param {Object} prototype The object to inherit from.
|
||||
* @returns {Object} Returns the new object.
|
||||
*/
|
||||
function baseCreate(prototype, properties) { // eslint-disable-line no-func-assign
|
||||
function baseCreate(prototype, _properties) { // eslint-disable-line no-func-assign
|
||||
return isObject(prototype) ? nativeCreate(prototype) : {};
|
||||
}
|
||||
// fallback for browsers without `Object.create`
|
||||
|
||||
@@ -47,7 +47,7 @@ function createWrapper(func, bitmask, partialArgs, partialRightArgs, thisArg, ar
|
||||
var isBind = bitmask & 1,
|
||||
isBindKey = bitmask & 2,
|
||||
isCurry = bitmask & 4,
|
||||
isCurryBound = bitmask & 8,
|
||||
/* isCurryBound = bitmask & 8, */
|
||||
isPartial = bitmask & 16,
|
||||
isPartialRight = bitmask & 32;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
* Available under MIT license <http://lodash.com/license>
|
||||
*/
|
||||
var createWrapper = require('./../lodash._createwrapper'),
|
||||
reNative = require('./../lodash._renative'),
|
||||
slice = require('./../lodash._slice');
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user