upgrade eslint, eslint-config-scratch, and friends

This commit is contained in:
Christopher Willis-Ford 2022-06-07 23:12:33 -07:00
parent dd036fc2a6
commit eee26f06c4
4 changed files with 3283 additions and 4254 deletions

7525
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -52,6 +52,7 @@
"transifex": "1.6.6" "transifex": "1.6.6"
}, },
"devDependencies": { "devDependencies": {
"@babel/eslint-parser": "7.18.2",
"@babel/node": "7.2.2", "@babel/node": "7.2.2",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0", "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/plugin-syntax-dynamic-import": "^7.0.0",
@ -59,11 +60,10 @@
"@babel/preset-env": "^7.9.5", "@babel/preset-env": "^7.9.5",
"@babel/preset-react": "^7.0.0", "@babel/preset-react": "^7.0.0",
"async": "2.6.1", "async": "2.6.1",
"babel-eslint": "^10.0.1",
"babel-loader": "8.0.5", "babel-loader": "8.0.5",
"eslint": "^5.0.1", "eslint": "8.17.0",
"eslint-config-scratch": "^5.0.0", "eslint-config-scratch": "8.0.0",
"eslint-plugin-import": "^2.8.0", "eslint-plugin-import": "2.26.0",
"eslint-plugin-react": "^7.5.1", "eslint-plugin-react": "^7.5.1",
"format-message-cli": "6.2.1", "format-message-cli": "6.2.1",
"format-message-parse": "6.2.0", "format-message-parse": "6.2.0",

View file

@ -31,7 +31,7 @@ let defaultMessages = glob.sync(MESSAGES_PATTERN)
.map((file) => JSON.parse(file)) .map((file) => JSON.parse(file))
.reduce((collection, descriptors) => { .reduce((collection, descriptors) => {
descriptors.forEach(({id, defaultMessage, description}) => { descriptors.forEach(({id, defaultMessage, description}) => {
if (collection.hasOwnProperty(id)) { if (Object.prototype.hasOwnProperty.call(collection, id)) {
throw new Error(`Duplicate message id: ${id}`); throw new Error(`Duplicate message id: ${id}`);
} }

View file

@ -116,7 +116,7 @@ const serializeFolderSave = async (json, locale) => {
description: value.description.string, description: value.description.string,
status: 2 // set status to published status: 2 // set status to published
}; };
if (value.hasOwnProperty('tags')) { if (Object.prototype.hasOwnProperty.call(value, 'tags')) {
let tags = value.tags.string.split(','); let tags = value.tags.string.split(',');
let validTags = tags.filter(tag => tag.length < 33); let validTags = tags.filter(tag => tag.length < 33);
if (validTags.length !== tags.length) { if (validTags.length !== tags.length) {