Skip to content

Commit

Permalink
Mojito library feature requests & updates 2023 (#108)
Browse files Browse the repository at this point in the history
* Bump minimist from 1.2.5 to 1.2.6

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update nodejs.yml

* Update dep integrities

* Bump packages

* Update package-lock.json

* Update integrity of glob-parent

* Bump the Node packages & resolve any security updates

Bump the GitHub unit test suite to run against later Node.JS versions

* Update integrity of glob-parent package

* Update integrity of glob-parent package

* Update integrity of decode-uri-component package

* Downgrade decode-uri-component to 0.3.0

* Update integrity of decode-uri-component

* Mojito library feature requests & updates

* Mojito library feature requests & updates

Update integrity of decode-uri-component

Downgrade decode-uri-component to 0.3.0

Update integrity of decode-uri-component package

Update integrity of glob-parent package

Update integrity of glob-parent package

Bump the Node packages & resolve any security updates

Bump the GitHub unit test suite to run against later Node.JS versions

* Remove unused files

* Remove the debug code

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
allmywant and dependabot[bot] authored Apr 19, 2023
1 parent ef451a0 commit 1c859f7
Show file tree
Hide file tree
Showing 7 changed files with 296 additions and 248 deletions.
86 changes: 14 additions & 72 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"nestedBinaryExpressions": false,
"returnAssign": false,
"ignoreJSX": "all", // delegate to eslint-plugin-react
"enforceForArrowConditionals": false,
"enforceForArrowConditionals": false
}],

// disallow the use of object properties of the global object (Math and JSON) as functions
Expand Down Expand Up @@ -156,7 +156,7 @@
"allow": [
"arrowFunctions",
"functions",
"methods",
"methods"
]
}],

Expand Down Expand Up @@ -198,24 +198,6 @@
// disallows creating new instances of String, Number, and Boolean
"no-new-wrappers": "error",

// disallow reassignment of function parameters
// disallow parameter object manipulation except for specific exclusions
// rule: https://eslint.org/docs/rules/no-param-reassign.html
"no-param-reassign": ["error", {
"props": true,
"ignorePropertyModificationsFor": [
"acc", // for reduce accumulators
"accumulator", // for reduce accumulators
"e", // for e.returnvalue
"ctx", // for Koa routing
"req", // for Express requests
"request", // for Express requests
"res", // for Express responses
"response", // for Express responses
"$scope", // for Angular 1 scopes
]
}],

// disallow usage of __proto__ property
"no-proto": "error",

Expand All @@ -232,7 +214,7 @@
// https://eslint.org/docs/rules/no-self-assign
// TODO: semver-major: props -> true
"no-self-assign": ["error", {
"props": false,
"props": false
}],

// disallow comparisons where both sides are exactly the same
Expand All @@ -252,7 +234,7 @@
"no-unused-expressions": ["error", {
"allowShortCircuit": false,
"allowTernary": false,
"allowTaggedTemplates": false,
"allowTaggedTemplates": false
}],

// disallow unused labels
Expand All @@ -266,10 +248,6 @@
// https://eslint.org/docs/rules/no-useless-concat
"no-useless-concat": "error",

// disallow unnecessary string escaping
// https://eslint.org/docs/rules/no-useless-escape
"no-useless-escape": "error",

// disallow redundant return; keywords
// https://eslint.org/docs/rules/no-useless-return
"no-useless-return": "error",
Expand Down Expand Up @@ -345,7 +323,7 @@
"ObjectExpression": false,
"ObjectPattern": false,
"VariableDeclaration": false,
"NewExpression": false,
"NewExpression": false
}
}],

Expand Down Expand Up @@ -411,33 +389,6 @@
// http://eslint.org/docs/rules/newline-per-chained-call
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 4 }],

// disallow if as the only statement in an else block
// https://eslint.org/docs/rules/no-lonely-if
"no-lonely-if": "error",

// disallow un-paren"d mixes of different operators
// https://eslint.org/docs/rules/no-mixed-operators
"no-mixed-operators": ["error", {
// the list of arthmetic groups disallows mixing `%` and `**`
// with other arithmetic operators.
"groups": [
["%", "**"],
["%", "+"],
["%", "-"],
["%", "*"],
["%", "/"],
["**", "+"],
["**", "-"],
["**", "*"],
["**", "/"],
["&", "|", "^", "~", "<<", ">>", ">>>"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"]
],
"allowSamePrecedence": false
}],

// disallow mixed spaces and tabs for indentation
"no-mixed-spaces-and-tabs": "error",

Expand All @@ -457,20 +408,20 @@
"error",
{
"selector": "ForInStatement",
"message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.",
"message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."
},
{
"selector": "ForOfStatement",
"message": "iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.",
"message": "iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations."
},
{
"selector": "LabeledStatement",
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.",
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
},
{
"selector": "WithStatement",
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize.",
},
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
}
],

// disallow space between function identifier and application
Expand All @@ -482,16 +433,7 @@
// disallow trailing whitespace at the end of lines
"no-trailing-spaces": ["error", {
"skipBlankLines": false,
"ignoreComments": false,
}],

// disallow dangling underscores in identifiers
// https://eslint.org/docs/rules/no-underscore-dangle
"no-underscore-dangle": ["error", {
"allow": [],
"allowAfterThis": false,
"allowAfterSuper": false,
"enforceInMethodNames": true,
"ignoreComments": false
}],

// disallow the use of Boolean literals in conditional expressions
Expand All @@ -516,13 +458,13 @@
"ObjectExpression": { "minProperties": 4, "multiline": true, "consistent": true },
"ObjectPattern": { "minProperties": 4, "multiline": true, "consistent": true },
"ImportDeclaration": { "minProperties": 4, "multiline": true, "consistent": true },
"ExportDeclaration": { "minProperties": 4, "multiline": true, "consistent": true },
"ExportDeclaration": { "minProperties": 4, "multiline": true, "consistent": true }
}],

// enforce "same line" or "multiple line" on object properties.
// https://eslint.org/docs/rules/object-property-newline
"object-property-newline": ["error", {
"allowAllPropertiesOnSameLine": true,
"allowAllPropertiesOnSameLine": true
}],

// require assignment operator shorthand where possible or prohibit it entirely
Expand Down Expand Up @@ -569,7 +511,7 @@
"words": true,
"nonwords": false,
"overrides": {
},
}
}],

// require or disallow a space immediately following the // or /* in a comment
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2022, Mint Metrics Pty Ltd. All rights reserved.
Copyright (c) 2023, Mint Metrics Pty Ltd. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down
Loading

0 comments on commit 1c859f7

Please sign in to comment.