Skip to content

Commit

Permalink
fix(sec): redos, release (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno authored Jun 27, 2024
1 parent fc0f05c commit 2e3eef9
Show file tree
Hide file tree
Showing 10 changed files with 5,022 additions and 3,508 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
root: true
parser: '@babel/eslint-parser'
parserOptions:
ecmaFeatures:
modules: true
ecmaVersion: 6
sourceType: module
extends: '@wfcd/eslint-config/strict-esm-jsdoc'
extends:
- '@wfcd/eslint-config/strict-esm-jsdoc'
- 'plugin:redos/recommended'
rules:
import/extensions:
- error
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'*.**,!package*.json':
- 'npm run fmt:fix'
'*.js':
- eslint --fix --cache
- eslint -c .eslintrc.yaml --fix --cache
- npm test -- --reporter=mocha-minimalist-reporter
package*.json:
- npm dedupe
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ package.json.backup
.lintstagedrc.yaml
.mocharc.yml
babel.config.cjs
clean-package.config.js
clean-package.config.cjs
2 changes: 1 addition & 1 deletion clean-package.config.js → clean-package.config.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
module.exports = {
remove: [
'devDependencies',
'scripts',
Expand Down
2 changes: 1 addition & 1 deletion lib/WorldState.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const parseAsyncArray = async (ParserClass, dataArray, deps, uniqueField)
}
if (uniqueField) {
const utemp = {};
arr.sort((a, b) => a.id.localeCompare(b.id));
arr.sort((a, b) => a.id?.localeCompare(b.id));
arr.forEach((obj) => {
utemp[obj[uniqueField]] = obj;
});
Expand Down
2 changes: 1 addition & 1 deletion lib/supporting/RewardTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export default [
{
name: 'endo',
description: 'Endo',
test: (s) => /\d+\sendo/i.test(s),
test: (s) => /^\d+x?\sendo/i.test(s),
thumbnail: wfCdn('endo.png'),
color: 0xc2a24c,
},
Expand Down
Loading

0 comments on commit 2e3eef9

Please sign in to comment.