diff --git a/package.json b/package.json index 57fcaa88..4f1409bd 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "eslint": ">=6.0.0" }, "dependencies": { - "ajv": "^7.0.0", + "ajv": "^8.0.0-0", "debug": "^4.3.1", "eslint-utils": "^2.1.0", "json-schema-migrate": "^1.1.0", @@ -98,7 +98,7 @@ "raw-loader": "^4.0.1", "request": "^2.88.2", "semver": "^7.3.2", - "stylelint": "^13.6.1", + "stylelint": "^13.12.0", "stylelint-config-standard": "^21.0.0", "stylelint-plugin-stylus": "^0.10.0", "ts-node": "^9.0.0", diff --git a/src/utils/validator-factory.ts b/src/utils/validator-factory.ts index 822c9f8d..183bb9f3 100644 --- a/src/utils/validator-factory.ts +++ b/src/utils/validator-factory.ts @@ -167,12 +167,12 @@ function errorToValidateError( ): ValidateError { const error: DefinedError = errorObject as DefinedError - const dataPath = error.dataPath.startsWith("/") - ? error.dataPath.slice(1) - : error.dataPath - // console.log(dataPath) - const path: string[] = dataPath - ? dataPath.split("/").map(unescapeFragment) + const instancePath = error.instancePath.startsWith("/") + ? error.instancePath.slice(1) + : error.instancePath + // console.log(instancePath) + const path: string[] = instancePath + ? instancePath.split("/").map(unescapeFragment) : [] if (error.keyword === "additionalProperties") { @@ -191,7 +191,7 @@ function errorToValidateError( } } if (error.keyword === "uniqueItems") { - const baseMessage = `should NOT have duplicate items (items ## ${error.params.j} and ${error.params.i} are identical)` + const baseMessage = `must NOT have duplicate items (items ## ${error.params.j} and ${error.params.i} are identical)` return { message: `${joinPath(path)} ${baseMessage}.`, path: [...path, String(error.params.i)], @@ -199,11 +199,11 @@ function errorToValidateError( } let baseMessage: string if (error.keyword === "enum") { - baseMessage = `should be equal to ${joinEnums( + baseMessage = `must be equal to ${joinEnums( error.params.allowedValues, )}` } else if (error.keyword === "const") { - baseMessage = `should be equal to ${JSON.stringify( + baseMessage = `must be equal to ${JSON.stringify( error.params.allowedValue, )}` } else if (error.keyword === "not") { @@ -212,40 +212,40 @@ function errorToValidateError( const schemaKeys = Object.keys(schema) if (schemaKeys.length === 1 && schemaKeys[0] === "type") { // { type: "foo" } - baseMessage = `should NOT be ${schema.type}` + baseMessage = `must NOT be ${schema.type}` } else if (schemaKeys.length === 1 && schemaKeys[0] === "enum") { // { enum: ["foo"] } - baseMessage = `should NOT be equal to ${joinEnums(schema.enum)}` + baseMessage = `must NOT be equal to ${joinEnums(schema.enum)}` } else { - baseMessage = `should NOT be valid of define schema` + baseMessage = `must NOT be valid of define schema` } } else if ( - error.keyword === "type" || // should be X - error.keyword === "oneOf" || // should match exactly one schema in oneOf - error.keyword === "anyOf" || // should match some schema in anyOf + error.keyword === "type" || // must be X + error.keyword === "oneOf" || // must match exactly one schema in oneOf + error.keyword === "anyOf" || // must match some schema in anyOf // array - error.keyword === "minItems" || // should NOT have fewer than X items - error.keyword === "maxItems" || // should NOT have more than X items - error.keyword === "additionalItems" || // should NOT have more than X items - error.keyword === "contains" || // should contain at least 1 valid item(s) + error.keyword === "minItems" || // must NOT have fewer than X items + error.keyword === "maxItems" || // must NOT have more than X items + error.keyword === "additionalItems" || // must NOT have more than X items + error.keyword === "contains" || // must contain at least 1 valid item(s) // object - error.keyword === "required" || // should have required property 'X' - error.keyword === "maxProperties" || // should NOT have more than X items - error.keyword === "minProperties" || // should NOT have fewer than X items - error.keyword === "dependencies" || // should have property X when property Y is present + error.keyword === "required" || // must have required property 'X' + error.keyword === "maxProperties" || // must NOT have more than X items + error.keyword === "minProperties" || // must NOT have fewer than X items + error.keyword === "dependencies" || // must have property X when property Y is present // string - error.keyword === "pattern" || // should match pattern "X" - error.keyword === "maxLength" || // should NOT have more than X characters - error.keyword === "minLength" || // should NOT have fewer than X characters + error.keyword === "pattern" || // must match pattern "X" + error.keyword === "maxLength" || // must NOT have more than X characters + error.keyword === "minLength" || // must NOT have fewer than X characters error.keyword === "format" || // number - error.keyword === "maximum" || // should be <= X - error.keyword === "minimum" || // should be >= X - error.keyword === "exclusiveMaximum" || // should be < X - error.keyword === "exclusiveMinimum" || // should be > X - error.keyword === "multipleOf" || // should be multiple of X + error.keyword === "maximum" || // must be <= X + error.keyword === "minimum" || // must be >= X + error.keyword === "exclusiveMaximum" || // must be < X + error.keyword === "exclusiveMinimum" || // must be > X + error.keyword === "multipleOf" || // must be multiple of X // other - error.keyword === "if" // should match "X" schema + error.keyword === "if" // must match "X" schema ) { // Use error.message baseMessage = error.message! diff --git a/tests/fixtures/rules/no-invalid/invalid/array-test/additional-items-errors.json b/tests/fixtures/rules/no-invalid/invalid/array-test/additional-items-errors.json index a530367a..1b79750f 100644 --- a/tests/fixtures/rules/no-invalid/invalid/array-test/additional-items-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/array-test/additional-items-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"additionalItemsTest\" should NOT have more than 2 items.", + "message": "\"additionalItemsTest\" must NOT have more than 2 items.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/array-test/any-of-errors.json b/tests/fixtures/rules/no-invalid/invalid/array-test/any-of-errors.json index 41c2a2f3..081aae1e 100644 --- a/tests/fixtures/rules/no-invalid/invalid/array-test/any-of-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/array-test/any-of-errors.json @@ -1,20 +1,20 @@ [ { - "message": "\"anyOfTest[2]\" should be string.", + "message": "\"anyOfTest[2]\" must be string.", "line": 3, "column": 31, "endLine": 3, "endColumn": 35 }, { - "message": "\"anyOfTest[2]\" should be number.", + "message": "\"anyOfTest[2]\" must be number.", "line": 3, "column": 31, "endLine": 3, "endColumn": 35 }, { - "message": "\"anyOfTest[2]\" should match some schema in anyOf.", + "message": "\"anyOfTest[2]\" must match a schema in anyOf.", "line": 3, "column": 31, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/array-test/contains-errors.json b/tests/fixtures/rules/no-invalid/invalid/array-test/contains-errors.json index eeb44c42..1635e342 100644 --- a/tests/fixtures/rules/no-invalid/invalid/array-test/contains-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/array-test/contains-errors.json @@ -1,20 +1,20 @@ [ { - "message": "\"containsTest\" should contain at least 1 valid item(s).", + "message": "\"containsTest\" must contain at least 1 valid item(s).", "line": 3, "column": 5, "endLine": 3, "endColumn": 19 }, { - "message": "\"containsTest[0]\" should be number.", + "message": "\"containsTest[0]\" must be number.", "line": 3, "column": 22, "endLine": 3, "endColumn": 27 }, { - "message": "\"containsTest[1]\" should be number.", + "message": "\"containsTest[1]\" must be number.", "line": 3, "column": 29, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/array-test/max-items-errors.json b/tests/fixtures/rules/no-invalid/invalid/array-test/max-items-errors.json index 610f65ae..2c532de1 100644 --- a/tests/fixtures/rules/no-invalid/invalid/array-test/max-items-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/array-test/max-items-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"maxItemsTest\" should NOT have more than 2 items.", + "message": "\"maxItemsTest\" must NOT have more than 2 items.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/array-test/unique-items-errors.json b/tests/fixtures/rules/no-invalid/invalid/array-test/unique-items-errors.json index 31b1dd47..1785517c 100644 --- a/tests/fixtures/rules/no-invalid/invalid/array-test/unique-items-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/array-test/unique-items-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"uniqueItemsTest\" should NOT have duplicate items (items ## 1 and 3 are identical).", + "message": "\"uniqueItemsTest\" must NOT have duplicate items (items ## 1 and 3 are identical).", "line": 3, "column": 34, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/const-test/const-errors.json b/tests/fixtures/rules/no-invalid/invalid/const-test/const-errors.json index ec6a94b7..ae33af96 100644 --- a/tests/fixtures/rules/no-invalid/invalid/const-test/const-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/const-test/const-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"const\" should be equal to \"foo\".", + "message": "\"const\" must be equal to \"foo\".", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/direct/eslintrc-direct-errors.json b/tests/fixtures/rules/no-invalid/invalid/direct/eslintrc-direct-errors.json index 18cae02d..32770547 100644 --- a/tests/fixtures/rules/no-invalid/invalid/direct/eslintrc-direct-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/direct/eslintrc-direct-errors.json @@ -1,20 +1,20 @@ [ { - "message": "\"extends[0]\" should be string.", + "message": "\"extends[0]\" must be string.", "line": 3, "column": 15, "endLine": 3, "endColumn": 17 }, { - "message": "\"plugins[1]\" should be string.", + "message": "\"plugins[1]\" must be string.", "line": 4, "column": 22, "endLine": 4, "endColumn": 26 }, { - "message": "\"plugins[2]\" should be string.", + "message": "\"plugins[2]\" must be string.", "line": 4, "column": 27, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/enum-test/enum-errors.json b/tests/fixtures/rules/no-invalid/invalid/enum-test/enum-errors.json index 5a9b7195..ef7c8cb4 100644 --- a/tests/fixtures/rules/no-invalid/invalid/enum-test/enum-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/enum-test/enum-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"enum\" should be equal to 1, 2 or 3.", + "message": "\"enum\" must be equal to 1, 2 or 3.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-errors.json b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-errors.json index 7b76467d..a5e8ad21 100644 --- a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"extends[0]\" should be string.", + "message": "\"extends[0]\" must be string.", "line": 3, "column": 17, "endLine": 3, "endColumn": 19 }, { - "message": "\"plugins[1]\" should be string.", + "message": "\"plugins[1]\" must be string.", "line": 4, "column": 24, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-escape-errors.json b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-escape-errors.json index 487ad4ba..d495bf47 100644 --- a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-escape-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-escape-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"overrides[0]\" should have required property 'files'.", + "message": "\"overrides[0]\" must have required property 'files'.", "line": 4, "column": 9, "endLine": 7, diff --git a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-js-errors.json b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-js-errors.json index 18cae02d..32770547 100644 --- a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-js-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-js-errors.json @@ -1,20 +1,20 @@ [ { - "message": "\"extends[0]\" should be string.", + "message": "\"extends[0]\" must be string.", "line": 3, "column": 15, "endLine": 3, "endColumn": 17 }, { - "message": "\"plugins[1]\" should be string.", + "message": "\"plugins[1]\" must be string.", "line": 4, "column": 22, "endLine": 4, "endColumn": 26 }, { - "message": "\"plugins[2]\" should be string.", + "message": "\"plugins[2]\" must be string.", "line": 4, "column": 27, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-sparse-array-errors.json b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-sparse-array-errors.json index baeae7a5..2c4b52fc 100644 --- a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-sparse-array-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-sparse-array-errors.json @@ -1,48 +1,48 @@ [ { - "message": "\"extends[0]\" should be string.", + "message": "\"extends[0]\" must be string.", "line": 3, "column": 17, "endLine": 3, "endColumn": 17 }, { - "message": "\"plugins[1]\" should be string.", + "message": "\"plugins[1]\" must be string.", "line": 4, "column": 24, "endLine": 4, "endColumn": 25 }, { - "message": "\"plugins[2]\" should be string.", + "message": "\"plugins[2]\" must be string.", "line": 4, "column": 26, "endLine": 4, "endColumn": 27 }, { - "message": "\"overrides[0].files\" should be string.", + "message": "\"overrides[0].files\" must be string.", "line": 7, "column": 13, "endLine": 7, "endColumn": 20 }, { - "message": "\"overrides[0].files\" should NOT have fewer than 1 items.", + "message": "\"overrides[0].files\" must NOT have fewer than 1 items.", "line": 7, "column": 13, "endLine": 7, "endColumn": 20 }, { - "message": "\"overrides[0].files\" should match exactly one schema in oneOf.", + "message": "\"overrides[0].files\" must match exactly one schema in oneOf.", "line": 7, "column": 13, "endLine": 7, "endColumn": 20 }, { - "message": "\"overrides[0].extends[1]\" should be string.", + "message": "\"overrides[0].extends[1]\" must be string.", "line": 8, "column": 32, "endLine": 8, diff --git a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-toml-errors.json b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-toml-errors.json index 1189eaef..20e811ae 100644 --- a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-toml-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-toml-errors.json @@ -1,41 +1,41 @@ [ { - "message": "\"plugins[1]\" should be string.", + "message": "\"plugins[1]\" must be string.", "line": 5, "column": 3, "endLine": 5, "endColumn": 5 }, { - "message": "\"overrides[0].files\" should be string.", + "message": "\"overrides[0].files\" must be string.", "line": 10, "column": 1, "endLine": 10, "endColumn": 6 }, { - "message": "\"overrides[0].files\" should NOT have fewer than 1 items.", + "message": "\"overrides[0].files\" must NOT have fewer than 1 items.", "line": 10, "column": 1, "endLine": 10, "endColumn": 6 }, { - "message": "\"overrides[0].files\" should match exactly one schema in oneOf.", + "message": "\"overrides[0].files\" must match exactly one schema in oneOf.", "line": 10, "column": 1, "endLine": 10, "endColumn": 6 }, { - "message": "\"overrides[0].extends[1]\" should be string.", + "message": "\"overrides[0].extends[1]\" must be string.", "line": 13, "column": 3, "endLine": 13, "endColumn": 5 }, { - "message": "\"overrides[0].extends[3]\" should be string.", + "message": "\"overrides[0].extends[3]\" must be string.", "line": 15, "column": 3, "endLine": 15, diff --git a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-yaml-errors.json b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-yaml-errors.json index 6d3d305f..b9b94c22 100644 --- a/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-yaml-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/eslintrc-test/eslintrc-yaml-errors.json @@ -1,41 +1,41 @@ [ { - "message": "\"plugins[1]\" should be string.", + "message": "\"plugins[1]\" must be string.", "line": 6, "column": 6, "endLine": 7, "endColumn": 5 }, { - "message": "\"plugins[2]\" should be string.", + "message": "\"plugins[2]\" must be string.", "line": 7, "column": 6, "endLine": 8, "endColumn": 5 }, { - "message": "\"overrides[0].files\" should be string.", + "message": "\"overrides[0].files\" must be string.", "line": 10, "column": 7, "endLine": 10, "endColumn": 12 }, { - "message": "\"overrides[0].files\" should NOT have fewer than 1 items.", + "message": "\"overrides[0].files\" must NOT have fewer than 1 items.", "line": 10, "column": 7, "endLine": 10, "endColumn": 12 }, { - "message": "\"overrides[0].files\" should match exactly one schema in oneOf.", + "message": "\"overrides[0].files\" must match exactly one schema in oneOf.", "line": 10, "column": 7, "endLine": 10, "endColumn": 12 }, { - "message": "\"overrides[0].extends[1]\" should be string.", + "message": "\"overrides[0].extends[1]\" must be string.", "line": 13, "column": 12, "endLine": 14, diff --git a/tests/fixtures/rules/no-invalid/invalid/fs-test/test-errors.json b/tests/fixtures/rules/no-invalid/invalid/fs-test/test-errors.json index 01421fd2..835ddd08 100644 --- a/tests/fixtures/rules/no-invalid/invalid/fs-test/test-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/fs-test/test-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"foo\" should be string.", + "message": "\"foo\" must be string.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test/renovate-errors.json b/tests/fixtures/rules/no-invalid/invalid/http-test/renovate-errors.json index 36593458..c18d6d81 100644 --- a/tests/fixtures/rules/no-invalid/invalid/http-test/renovate-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/http-test/renovate-errors.json @@ -1,34 +1,34 @@ [ { - "message": "\"packageRules[0].matchUpdateTypes\" should be string.", + "message": "\"packageRules[0].matchUpdateTypes\" must be string.", "line": 6, "column": 13, "endLine": 6, "endColumn": 31 }, { - "message": "\"packageRules[0].matchUpdateTypes\" should be equal to \"major\", \"minor\", \"patch\", \"pin\", \"digest\", \"lockFileMaintenance\", \"rollback\" or \"bump\".", + "message": "\"packageRules[0].matchUpdateTypes\" must be equal to \"major\", \"minor\", \"patch\", \"pin\", \"digest\", \"lockFileMaintenance\", \"rollback\" or \"bump\".", "line": 6, "column": 13, "endLine": 6, "endColumn": 31 }, { - "message": "\"packageRules[0].matchUpdateTypes\" should match exactly one schema in oneOf.", + "message": "\"packageRules[0].matchUpdateTypes\" must match exactly one schema in oneOf.", "line": 6, "column": 13, "endLine": 6, "endColumn": 31 }, { - "message": "\"packageRules[0].matchUpdateTypes[4]\" should be string.", + "message": "\"packageRules[0].matchUpdateTypes[4]\" must be string.", "line": 6, "column": 69, "endLine": 6, "endColumn": 71 }, { - "message": "\"packageRules[0].matchUpdateTypes[4]\" should be equal to \"major\", \"minor\", \"patch\", \"pin\", \"digest\", \"lockFileMaintenance\", \"rollback\" or \"bump\".", + "message": "\"packageRules[0].matchUpdateTypes[4]\" must be equal to \"major\", \"minor\", \"patch\", \"pin\", \"digest\", \"lockFileMaintenance\", \"rollback\" or \"bump\".", "line": 6, "column": 69, "endLine": 6, diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test/renovate2-errors.json b/tests/fixtures/rules/no-invalid/invalid/http-test/renovate2-errors.json index 36593458..c18d6d81 100644 --- a/tests/fixtures/rules/no-invalid/invalid/http-test/renovate2-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/http-test/renovate2-errors.json @@ -1,34 +1,34 @@ [ { - "message": "\"packageRules[0].matchUpdateTypes\" should be string.", + "message": "\"packageRules[0].matchUpdateTypes\" must be string.", "line": 6, "column": 13, "endLine": 6, "endColumn": 31 }, { - "message": "\"packageRules[0].matchUpdateTypes\" should be equal to \"major\", \"minor\", \"patch\", \"pin\", \"digest\", \"lockFileMaintenance\", \"rollback\" or \"bump\".", + "message": "\"packageRules[0].matchUpdateTypes\" must be equal to \"major\", \"minor\", \"patch\", \"pin\", \"digest\", \"lockFileMaintenance\", \"rollback\" or \"bump\".", "line": 6, "column": 13, "endLine": 6, "endColumn": 31 }, { - "message": "\"packageRules[0].matchUpdateTypes\" should match exactly one schema in oneOf.", + "message": "\"packageRules[0].matchUpdateTypes\" must match exactly one schema in oneOf.", "line": 6, "column": 13, "endLine": 6, "endColumn": 31 }, { - "message": "\"packageRules[0].matchUpdateTypes[4]\" should be string.", + "message": "\"packageRules[0].matchUpdateTypes[4]\" must be string.", "line": 6, "column": 69, "endLine": 6, "endColumn": 71 }, { - "message": "\"packageRules[0].matchUpdateTypes[4]\" should be equal to \"major\", \"minor\", \"patch\", \"pin\", \"digest\", \"lockFileMaintenance\", \"rollback\" or \"bump\".", + "message": "\"packageRules[0].matchUpdateTypes[4]\" must be equal to \"major\", \"minor\", \"patch\", \"pin\", \"digest\", \"lockFileMaintenance\", \"rollback\" or \"bump\".", "line": 6, "column": 69, "endLine": 6, diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc-errors.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc-errors.json index e5e93136..80922853 100644 --- a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"npmAlwaysAuth\" should be boolean.", + "message": "\"npmAlwaysAuth\" must be boolean.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc2-errors.json b/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc2-errors.json index e5e93136..80922853 100644 --- a/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc2-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/http-test2/yarnrc2-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"npmAlwaysAuth\" should be boolean.", + "message": "\"npmAlwaysAuth\" must be boolean.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/if-test/if-errors.json b/tests/fixtures/rules/no-invalid/invalid/if-test/if-errors.json index f142c765..2240c992 100644 --- a/tests/fixtures/rules/no-invalid/invalid/if-test/if-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/if-test/if-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"b\" should match \"else\" schema.", + "message": "\"b\" must match \"else\" schema.", "line": 8, "column": 5, "endLine": 8, "endColumn": 8 }, { - "message": "\"b.postal_code\" should match pattern \"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]\".", + "message": "\"b.postal_code\" must match pattern \"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]\".", "line": 11, "column": 9, "endLine": 11, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/bi-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/bi-errors.json index b1ad866d..9a74f5f4 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/bi-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/bi-errors.json @@ -1,27 +1,27 @@ [ { - "message": "\"str\" should be string.", + "message": "\"str\" must be string.", "line": 3, "column": 5, "endLine": 3, "endColumn": 8 }, { - "message": "\"str2\" should be string.", + "message": "\"str2\" must be string.", "line": 4, "column": 5, "endLine": 4, "endColumn": 9 }, { - "message": "\"str3\" should be string.", + "message": "\"str3\" must be string.", "line": 5, "column": 5, "endLine": 5, "endColumn": 9 }, { - "message": "\"num\" should be number.", + "message": "\"num\" must be number.", "line": 6, "column": 5, "endLine": 6, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/bi2-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/bi2-errors.json index 5aeec914..8c650233 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/bi2-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/bi2-errors.json @@ -1,27 +1,27 @@ [ { - "message": "\"str\" should be string.", + "message": "\"str\" must be string.", "line": 3, "column": 5, "endLine": 3, "endColumn": 8 }, { - "message": "\"str2\" should be string.", + "message": "\"str2\" must be string.", "line": 4, "column": 5, "endLine": 4, "endColumn": 9 }, { - "message": "\"str3\" should be string.", + "message": "\"str3\" must be string.", "line": 5, "column": 5, "endLine": 5, "endColumn": 9 }, { - "message": "\"int\" should be >= 0.", + "message": "\"int\" must be >= 0.", "line": 7, "column": 5, "endLine": 7, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/calc-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/calc-errors.json index e065c4b8..6a8ea335 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/calc-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/calc-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"num\" should be number.", + "message": "\"num\" must be number.", "line": 5, "column": 5, "endLine": 5, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/calc2-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/calc2-errors.json index 0db96c3e..6a1fb68b 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/calc2-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/calc2-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"str\" should be string.", + "message": "\"str\" must be string.", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/enum-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/enum-errors.json index 77cd116e..9246e751 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/enum-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/enum-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"enum3\" should be equal to \"a\", \"b\" or \"c\".", + "message": "\"enum3\" must be equal to \"a\", \"b\" or \"c\".", "line": 8, "column": 5, "endLine": 8, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/eq-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/eq-errors.json index ddba66f9..35959007 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/eq-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/eq-errors.json @@ -1,27 +1,27 @@ [ { - "message": "\"str\" should be string.", + "message": "\"str\" must be string.", "line": 4, "column": 5, "endLine": 4, "endColumn": 8 }, { - "message": "\"num\" should be number.", + "message": "\"num\" must be number.", "line": 5, "column": 5, "endLine": 5, "endColumn": 8 }, { - "message": "\"int\" should be number.", + "message": "\"int\" must be number.", "line": 6, "column": 5, "endLine": 6, "endColumn": 8 }, { - "message": "\"str2\" should be string.", + "message": "\"str2\" must be string.", "line": 7, "column": 5, "endLine": 7, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/id-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/id-errors.json index 6d467809..1ba14319 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/id-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/id-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"str\" should be string.", + "message": "\"str\" must be string.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/int-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/int-errors.json index b7e7ee4f..61347a49 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/int-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/int-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"int\" should be >= 0.", + "message": "\"int\" must be >= 0.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/not-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/not-errors.json index 0db96c3e..6a1fb68b 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/not-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/not-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"str\" should be string.", + "message": "\"str\" must be string.", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/number-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/number-errors.json index 0db96c3e..6a1fb68b 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/number-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/number-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"str\" should be string.", + "message": "\"str\" must be string.", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/object-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/object-errors.json index 5db90559..19fc8384 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/object-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/object-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"str\" should be string.", + "message": "\"str\" must be string.", "line": 2, "column": 13, "endLine": 2, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/object-spread-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/object-spread-errors.json index 4e358817..c52d41e9 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/object-spread-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/object-spread-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"num\" should be number.", + "message": "\"num\" must be number.", "line": 3, "column": 5, "endLine": 3, "endColumn": 8 }, { - "message": "\"str\" should be string.", + "message": "\"str\" must be string.", "line": 7, "column": 5, "endLine": 7, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/object2-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/object2-errors.json index d3f54369..c0dcab2f 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/object2-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/object2-errors.json @@ -1,6 +1,6 @@ [ { - "message": "Root should be object.", + "message": "Root must be object.", "line": 3, "column": 1, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/plus-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/plus-errors.json index 0db96c3e..6a1fb68b 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/plus-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/plus-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"str\" should be string.", + "message": "\"str\" must be string.", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/tilde-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/tilde-errors.json index 0db96c3e..6a1fb68b 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/tilde-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/tilde-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"str\" should be string.", + "message": "\"str\" must be string.", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/trace-object-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/trace-object-errors.json index fcf16f3d..9a468180 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/trace-object-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/trace-object-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"enum\" should be equal to \"a\", \"b\" or \"c\".", + "message": "\"enum\" must be equal to \"a\", \"b\" or \"c\".", "line": 6, "column": 5, "endLine": 6, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/trace-object2-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/trace-object2-errors.json index 3316b831..5bf08e51 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/trace-object2-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/trace-object2-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"enum\" should be equal to \"a\", \"b\" or \"c\".", + "message": "\"enum\" must be equal to \"a\", \"b\" or \"c\".", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/typeof-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/typeof-errors.json index 72e4b76f..b30bc5ba 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/typeof-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/typeof-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"num\" should be number.", + "message": "\"num\" must be number.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/typeof2-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/typeof2-errors.json index 72e4b76f..b30bc5ba 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/typeof2-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/typeof2-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"num\" should be number.", + "message": "\"num\" must be number.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/unknown-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/unknown-errors.json index 584b1452..d253eb70 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/unknown-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/unknown-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"enum2\" should be equal to \"a\", \"b\" or \"c\".", + "message": "\"enum2\" must be equal to \"a\", \"b\" or \"c\".", "line": 11, "column": 5, "endLine": 11, diff --git a/tests/fixtures/rules/no-invalid/invalid/js-test/void-errors.json b/tests/fixtures/rules/no-invalid/invalid/js-test/void-errors.json index a42de197..e7356cb3 100644 --- a/tests/fixtures/rules/no-invalid/invalid/js-test/void-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/js-test/void-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"requiredFoo\" should have required property 'foo'.", + "message": "\"requiredFoo\" must have required property 'foo'.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/not-test/not-errors.json b/tests/fixtures/rules/no-invalid/invalid/not-test/not-errors.json index 8fd822ee..f883b2f5 100644 --- a/tests/fixtures/rules/no-invalid/invalid/not-test/not-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/not-test/not-errors.json @@ -1,34 +1,34 @@ [ { - "message": "\"notObject\" should NOT be object.", + "message": "\"notObject\" must NOT be object.", "line": 3, "column": 5, "endLine": 3, "endColumn": 16 }, { - "message": "\"notNumStr\" should NOT be number,string.", + "message": "\"notNumStr\" must NOT be number,string.", "line": 4, "column": 5, "endLine": 4, "endColumn": 16 }, { - "message": "\"numStr\" should be number,string.", + "message": "\"numStr\" must be number,string.", "line": 5, "column": 5, "endLine": 5, "endColumn": 13 }, { - "message": "\"notEnum\" should NOT be equal to 1, 2 or 3.", + "message": "\"notEnum\" must NOT be equal to 1, 2 or 3.", "line": 6, "column": 5, "endLine": 6, "endColumn": 14 }, { - "message": "\"notMax10\" should NOT be valid of define schema.", + "message": "\"notMax10\" must NOT be valid of define schema.", "line": 7, "column": 5, "endLine": 7, diff --git a/tests/fixtures/rules/no-invalid/invalid/number-draftv4-test/ex-min-max-errors.json b/tests/fixtures/rules/no-invalid/invalid/number-draftv4-test/ex-min-max-errors.json index 2bc5d309..978a5b55 100644 --- a/tests/fixtures/rules/no-invalid/invalid/number-draftv4-test/ex-min-max-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/number-draftv4-test/ex-min-max-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"exclusiveMaximum\" should be < 100.", + "message": "\"exclusiveMaximum\" must be < 100.", "line": 3, "column": 5, "endLine": 3, "endColumn": 23 }, { - "message": "\"exclusiveMinimum\" should be > 10.", + "message": "\"exclusiveMinimum\" must be > 10.", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/number-draftv4-test/min-max-errors.json b/tests/fixtures/rules/no-invalid/invalid/number-draftv4-test/min-max-errors.json index 8af765a7..725ff479 100644 --- a/tests/fixtures/rules/no-invalid/invalid/number-draftv4-test/min-max-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/number-draftv4-test/min-max-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"maximum\" should be <= 100.", + "message": "\"maximum\" must be <= 100.", "line": 3, "column": 5, "endLine": 3, "endColumn": 14 }, { - "message": "\"minimum\" should be >= 10.", + "message": "\"minimum\" must be >= 10.", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/number-test/ex-min-max-errors.json b/tests/fixtures/rules/no-invalid/invalid/number-test/ex-min-max-errors.json index 2bc5d309..978a5b55 100644 --- a/tests/fixtures/rules/no-invalid/invalid/number-test/ex-min-max-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/number-test/ex-min-max-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"exclusiveMaximum\" should be < 100.", + "message": "\"exclusiveMaximum\" must be < 100.", "line": 3, "column": 5, "endLine": 3, "endColumn": 23 }, { - "message": "\"exclusiveMinimum\" should be > 10.", + "message": "\"exclusiveMinimum\" must be > 10.", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/number-test/min-max-errors.json b/tests/fixtures/rules/no-invalid/invalid/number-test/min-max-errors.json index 8af765a7..725ff479 100644 --- a/tests/fixtures/rules/no-invalid/invalid/number-test/min-max-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/number-test/min-max-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"maximum\" should be <= 100.", + "message": "\"maximum\" must be <= 100.", "line": 3, "column": 5, "endLine": 3, "endColumn": 14 }, { - "message": "\"minimum\" should be >= 10.", + "message": "\"minimum\" must be >= 10.", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/number-test/multiple-of-errors.json b/tests/fixtures/rules/no-invalid/invalid/number-test/multiple-of-errors.json index ab525b64..832e1fc4 100644 --- a/tests/fixtures/rules/no-invalid/invalid/number-test/multiple-of-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/number-test/multiple-of-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"multipleOf\" should be multiple of 10.", + "message": "\"multipleOf\" must be multiple of 10.", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/object-test/additional-properties-type-errors.json b/tests/fixtures/rules/no-invalid/invalid/object-test/additional-properties-type-errors.json index 81f225c8..21fda944 100644 --- a/tests/fixtures/rules/no-invalid/invalid/object-test/additional-properties-type-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/object-test/additional-properties-type-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"additionalProperties.office_number\" should be string.", + "message": "\"additionalProperties.office_number\" must be string.", "line": 7, "column": 9, "endLine": 7, diff --git a/tests/fixtures/rules/no-invalid/invalid/object-test/dependencies-errors.json b/tests/fixtures/rules/no-invalid/invalid/object-test/dependencies-errors.json index 4eac8856..44ab3ec1 100644 --- a/tests/fixtures/rules/no-invalid/invalid/object-test/dependencies-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/object-test/dependencies-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"dependencies1\" should have property billing_address when property credit_card is present.", + "message": "\"dependencies1\" must have property billing_address when property credit_card is present.", "line": 3, "column": 5, "endLine": 3, "endColumn": 20 }, { - "message": "\"dependencies2\" should have required property 'billing_address'.", + "message": "\"dependencies2\" must have required property 'billing_address'.", "line": 7, "column": 5, "endLine": 7, diff --git a/tests/fixtures/rules/no-invalid/invalid/object-test/min-max-properties-errors.json b/tests/fixtures/rules/no-invalid/invalid/object-test/min-max-properties-errors.json index d9bb927c..6fe0daaf 100644 --- a/tests/fixtures/rules/no-invalid/invalid/object-test/min-max-properties-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/object-test/min-max-properties-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"maxProperties\" should NOT have more than 2 items.", + "message": "\"maxProperties\" must NOT have more than 2 items.", "line": 3, "column": 5, "endLine": 3, "endColumn": 20 }, { - "message": "\"minProperties\" should NOT have fewer than 2 items.", + "message": "\"minProperties\" must NOT have fewer than 2 items.", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/pattern-test/pattern-errors.json b/tests/fixtures/rules/no-invalid/invalid/pattern-test/pattern-errors.json index 0def174f..50652968 100644 --- a/tests/fixtures/rules/no-invalid/invalid/pattern-test/pattern-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/pattern-test/pattern-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"pattern\" should match pattern \"^\\d+$\".", + "message": "\"pattern\" must match pattern \"^\\d+$\".", "line": 3, "column": 5, "endLine": 3, diff --git a/tests/fixtures/rules/no-invalid/invalid/pattern-test/pattern-properties-errors.json b/tests/fixtures/rules/no-invalid/invalid/pattern-test/pattern-properties-errors.json index 04504ad4..348b396a 100644 --- a/tests/fixtures/rules/no-invalid/invalid/pattern-test/pattern-properties-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/pattern-test/pattern-properties-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"patternProperties[456]\" should be number.", + "message": "\"patternProperties[456]\" must be number.", "line": 6, "column": 9, "endLine": 6, "endColumn": 14 }, { - "message": "\"patternProperties.def\" should be string.", + "message": "\"patternProperties.def\" must be string.", "line": 7, "column": 9, "endLine": 7, diff --git a/tests/fixtures/rules/no-invalid/invalid/pattern-test/property-names-errors.json b/tests/fixtures/rules/no-invalid/invalid/pattern-test/property-names-errors.json index b8817278..e4190165 100644 --- a/tests/fixtures/rules/no-invalid/invalid/pattern-test/property-names-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/pattern-test/property-names-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"propertyNames\" property name \"abc\" should match pattern \"^\\d+$\".", + "message": "\"propertyNames\" property name \"abc\" must match pattern \"^\\d+$\".", "line": 5, "column": 9, "endLine": 5, @@ -14,7 +14,7 @@ "endColumn": 14 }, { - "message": "\"propertyNames\" property name \"def\" should match pattern \"^\\d+$\".", + "message": "\"propertyNames\" property name \"def\" must match pattern \"^\\d+$\".", "line": 7, "column": 9, "endLine": 7, diff --git a/tests/fixtures/rules/no-invalid/invalid/prop-name/test01-errors.json b/tests/fixtures/rules/no-invalid/invalid/prop-name/test01-errors.json index 42155cd6..32e6636e 100644 --- a/tests/fixtures/rules/no-invalid/invalid/prop-name/test01-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/prop-name/test01-errors.json @@ -1,20 +1,20 @@ [ { - "message": "\"[\"a.b.c\"]\" should be number.", + "message": "\"[\"a.b.c\"]\" must be number.", "line": 2, "column": 1, "endLine": 2, "endColumn": 6 }, { - "message": "\"[\"\"][\"\"]\" should be number.", + "message": "\"[\"\"][\"\"]\" must be number.", "line": 4, "column": 5, "endLine": 4, "endColumn": 7 }, { - "message": "\"[\"\\\"\"][\"'\"]\" should be number.", + "message": "\"[\"\\\"\"][\"'\"]\" must be number.", "line": 6, "column": 5, "endLine": 6, diff --git a/tests/fixtures/rules/no-invalid/invalid/prop-name/test02-errors.json b/tests/fixtures/rules/no-invalid/invalid/prop-name/test02-errors.json index 281bd62c..c754aba9 100644 --- a/tests/fixtures/rules/no-invalid/invalid/prop-name/test02-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/prop-name/test02-errors.json @@ -1,34 +1,34 @@ [ { - "message": "\"escapes[\"\\n\"]\" should be number.", + "message": "\"escapes[\"\\n\"]\" must be number.", "line": 4, "column": 9, "endLine": 4, "endColumn": 13 }, { - "message": "\"escapes[\"\\r\"]\" should be number.", + "message": "\"escapes[\"\\r\"]\" must be number.", "line": 5, "column": 9, "endLine": 5, "endColumn": 13 }, { - "message": "\"escapes[\"\\f\"]\" should be number.", + "message": "\"escapes[\"\\f\"]\" must be number.", "line": 6, "column": 9, "endLine": 6, "endColumn": 13 }, { - "message": "\"escapes[\"\\t\"]\" should be number.", + "message": "\"escapes[\"\\t\"]\" must be number.", "line": 7, "column": 9, "endLine": 7, "endColumn": 13 }, { - "message": "\"escapes[\"[]\"]\" should be number.", + "message": "\"escapes[\"[]\"]\" must be number.", "line": 8, "column": 9, "endLine": 8, diff --git a/tests/fixtures/rules/no-invalid/invalid/prop-name/test03-errors.json b/tests/fixtures/rules/no-invalid/invalid/prop-name/test03-errors.json index 10380ce6..541a3db1 100644 --- a/tests/fixtures/rules/no-invalid/invalid/prop-name/test03-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/prop-name/test03-errors.json @@ -1,20 +1,20 @@ [ { - "message": "\"escapes[\"/\"]\" should be number.", + "message": "\"escapes[\"/\"]\" must be number.", "line": 4, "column": 9, "endLine": 4, "endColumn": 12 }, { - "message": "\"escapes[\" \"]\" should be number.", + "message": "\"escapes[\" \"]\" must be number.", "line": 5, "column": 9, "endLine": 5, "endColumn": 12 }, { - "message": "\"escapes[\"~\"]\" should be number.", + "message": "\"escapes[\"~\"]\" must be number.", "line": 6, "column": 9, "endLine": 6, diff --git a/tests/fixtures/rules/no-invalid/invalid/property-names-test/property-names-errors.json b/tests/fixtures/rules/no-invalid/invalid/property-names-test/property-names-errors.json index b5cfdb15..80798665 100644 --- a/tests/fixtures/rules/no-invalid/invalid/property-names-test/property-names-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/property-names-test/property-names-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"pattern\" property name \"abc\" should match pattern \"^\\d+$\".", + "message": "\"pattern\" property name \"abc\" must match pattern \"^\\d+$\".", "line": 5, "column": 9, "endLine": 5, @@ -14,7 +14,7 @@ "endColumn": 14 }, { - "message": "\"pattern\" property name \"def\" should match pattern \"^\\d+$\".", + "message": "\"pattern\" property name \"def\" must match pattern \"^\\d+$\".", "line": 7, "column": 9, "endLine": 7, @@ -28,7 +28,7 @@ "endColumn": 14 }, { - "message": "\"enum\" property name \"foo\" should be equal to \"a\", \"b\" or \"c\".", + "message": "\"enum\" property name \"foo\" must be equal to \"a\", \"b\" or \"c\".", "line": 11, "column": 9, "endLine": 11, @@ -42,7 +42,7 @@ "endColumn": 14 }, { - "message": "\"const\" property name \"bar\" should be equal to \"foo\".", + "message": "\"const\" property name \"bar\" must be equal to \"foo\".", "line": 15, "column": 9, "endLine": 15, diff --git a/tests/fixtures/rules/no-invalid/invalid/root-test/js-errors.json b/tests/fixtures/rules/no-invalid/invalid/root-test/js-errors.json index 0dbae2e7..b0e2d49a 100644 --- a/tests/fixtures/rules/no-invalid/invalid/root-test/js-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/root-test/js-errors.json @@ -1,6 +1,6 @@ [ { - "message": "Root should be number.", + "message": "Root must be number.", "line": 2, "column": 1, "endLine": 2, diff --git a/tests/fixtures/rules/no-invalid/invalid/root-test/json-errors.json b/tests/fixtures/rules/no-invalid/invalid/root-test/json-errors.json index 445231a6..3ccd7744 100644 --- a/tests/fixtures/rules/no-invalid/invalid/root-test/json-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/root-test/json-errors.json @@ -1,6 +1,6 @@ [ { - "message": "Root should be number.", + "message": "Root must be number.", "line": 2, "column": 1, "endLine": 2, diff --git a/tests/fixtures/rules/no-invalid/invalid/root-test/module-js-errors.json b/tests/fixtures/rules/no-invalid/invalid/root-test/module-js-errors.json index 0dbae2e7..b0e2d49a 100644 --- a/tests/fixtures/rules/no-invalid/invalid/root-test/module-js-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/root-test/module-js-errors.json @@ -1,6 +1,6 @@ [ { - "message": "Root should be number.", + "message": "Root must be number.", "line": 2, "column": 1, "endLine": 2, diff --git a/tests/fixtures/rules/no-invalid/invalid/root-test/toml-errors.json b/tests/fixtures/rules/no-invalid/invalid/root-test/toml-errors.json index 8273c4ca..7b02e086 100644 --- a/tests/fixtures/rules/no-invalid/invalid/root-test/toml-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/root-test/toml-errors.json @@ -1,6 +1,6 @@ [ { - "message": "Root should be number.", + "message": "Root must be number.", "line": 2, "column": 1, "endLine": 2, diff --git a/tests/fixtures/rules/no-invalid/invalid/root-test/yaml-errors.json b/tests/fixtures/rules/no-invalid/invalid/root-test/yaml-errors.json index 8273c4ca..7b02e086 100644 --- a/tests/fixtures/rules/no-invalid/invalid/root-test/yaml-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/root-test/yaml-errors.json @@ -1,6 +1,6 @@ [ { - "message": "Root should be number.", + "message": "Root must be number.", "line": 2, "column": 1, "endLine": 2, diff --git a/tests/fixtures/rules/no-invalid/invalid/string-test/min-max-length-errors.json b/tests/fixtures/rules/no-invalid/invalid/string-test/min-max-length-errors.json index c981b3ae..51e67259 100644 --- a/tests/fixtures/rules/no-invalid/invalid/string-test/min-max-length-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/string-test/min-max-length-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"maxLength\" should NOT have more than 2 characters.", + "message": "\"maxLength\" must NOT have more than 2 characters.", "line": 3, "column": 5, "endLine": 3, "endColumn": 16 }, { - "message": "\"minLength\" should NOT have fewer than 2 characters.", + "message": "\"minLength\" must NOT have fewer than 2 characters.", "line": 4, "column": 5, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/toml-test/test01-errors.json b/tests/fixtures/rules/no-invalid/invalid/toml-test/test01-errors.json index 38ec66b6..85daf3af 100644 --- a/tests/fixtures/rules/no-invalid/invalid/toml-test/test01-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/toml-test/test01-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"a\" should be number.", + "message": "\"a\" must be number.", "line": 2, "column": 1, "endLine": 2, "endColumn": 6 }, { - "message": "\"b.a\" should be object.", + "message": "\"b.a\" must be object.", "line": 4, "column": 7, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/toml-test/test02-errors.json b/tests/fixtures/rules/no-invalid/invalid/toml-test/test02-errors.json index f7c88612..5a517581 100644 --- a/tests/fixtures/rules/no-invalid/invalid/toml-test/test02-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/toml-test/test02-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"a\" should be number.", + "message": "\"a\" must be number.", "line": 2, "column": 1, "endLine": 2, "endColumn": 6 }, { - "message": "\"b.a.a\" should be number.", + "message": "\"b.a.a\" must be number.", "line": 8, "column": 1, "endLine": 8, diff --git a/tests/fixtures/rules/no-invalid/invalid/toml-test/test03-errors.json b/tests/fixtures/rules/no-invalid/invalid/toml-test/test03-errors.json index c4ffce09..14d47a5f 100644 --- a/tests/fixtures/rules/no-invalid/invalid/toml-test/test03-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/toml-test/test03-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"b.a.a\" should be number.", + "message": "\"b.a.a\" must be number.", "line": 2, "column": 7, "endLine": 2, diff --git a/tests/fixtures/rules/no-invalid/invalid/toml-test/test04-errors.json b/tests/fixtures/rules/no-invalid/invalid/toml-test/test04-errors.json index 3e174f27..fd05bdcb 100644 --- a/tests/fixtures/rules/no-invalid/invalid/toml-test/test04-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/toml-test/test04-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"b.a.a\" should be number.", + "message": "\"b.a.a\" must be number.", "line": 4, "column": 13, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/toml-test/test05-errors.json b/tests/fixtures/rules/no-invalid/invalid/toml-test/test05-errors.json index 765b2220..614a54bd 100644 --- a/tests/fixtures/rules/no-invalid/invalid/toml-test/test05-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/toml-test/test05-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"b.a.a\" should be number.", + "message": "\"b.a.a\" must be number.", "line": 2, "column": 2, "endLine": 2, diff --git a/tests/fixtures/rules/no-invalid/invalid/toml-test/test06-errors.json b/tests/fixtures/rules/no-invalid/invalid/toml-test/test06-errors.json index 66ad33b7..7bdaadbf 100644 --- a/tests/fixtures/rules/no-invalid/invalid/toml-test/test06-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/toml-test/test06-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"b.a.a\" should be number.", + "message": "\"b.a.a\" must be number.", "line": 2, "column": 2, "endLine": 2, diff --git a/tests/fixtures/rules/no-invalid/invalid/vue-test/test01-errors.json b/tests/fixtures/rules/no-invalid/invalid/vue-test/test01-errors.json index aa0b8b6e..276362fc 100644 --- a/tests/fixtures/rules/no-invalid/invalid/vue-test/test01-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/vue-test/test01-errors.json @@ -1,13 +1,13 @@ [ { - "message": "Root should be object.", + "message": "Root must be object.", "line": 3, "column": 1, "endLine": 3, "endColumn": 6 }, { - "message": "Root should be object.", + "message": "Root must be object.", "line": 11, "column": 1, "endLine": 11, diff --git a/tests/fixtures/rules/no-invalid/invalid/yaml-test/array-test01-errors.json b/tests/fixtures/rules/no-invalid/invalid/yaml-test/array-test01-errors.json index cdbb184f..7cc59cc3 100644 --- a/tests/fixtures/rules/no-invalid/invalid/yaml-test/array-test01-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/yaml-test/array-test01-errors.json @@ -1,13 +1,13 @@ [ { - "message": "\"[1]\" should be number.", + "message": "\"[1]\" must be number.", "line": 3, "column": 1, "endLine": 5, "endColumn": 1 }, { - "message": "\"[2]\" should be number.", + "message": "\"[2]\" must be number.", "line": 5, "column": 1, "endLine": 7, diff --git a/tests/fixtures/rules/no-invalid/invalid/yaml-test/test01-errors.json b/tests/fixtures/rules/no-invalid/invalid/yaml-test/test01-errors.json index c303b739..e6183aba 100644 --- a/tests/fixtures/rules/no-invalid/invalid/yaml-test/test01-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/yaml-test/test01-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"a.a.null\" should be number.", + "message": "\"a.a.null\" must be number.", "line": 4, "column": 9, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/yaml-test/test02-errors.json b/tests/fixtures/rules/no-invalid/invalid/yaml-test/test02-errors.json index 75e70065..fcec4506 100644 --- a/tests/fixtures/rules/no-invalid/invalid/yaml-test/test02-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/yaml-test/test02-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"b.b.b\" should be number.", + "message": "\"b.b.b\" must be number.", "line": 4, "column": 8, "endLine": 4, diff --git a/tests/fixtures/rules/no-invalid/invalid/yaml-test/test03-errors.json b/tests/fixtures/rules/no-invalid/invalid/yaml-test/test03-errors.json index 2a3cbd13..195d426f 100644 --- a/tests/fixtures/rules/no-invalid/invalid/yaml-test/test03-errors.json +++ b/tests/fixtures/rules/no-invalid/invalid/yaml-test/test03-errors.json @@ -1,6 +1,6 @@ [ { - "message": "\"b.b.b\" should be number.", + "message": "\"b.b.b\" must be number.", "line": 3, "column": 15, "endLine": 3, diff --git a/tests/src/rules/no-invalid.ts b/tests/src/rules/no-invalid.ts index fab156b1..66271d5c 100644 --- a/tests/src/rules/no-invalid.ts +++ b/tests/src/rules/no-invalid.ts @@ -32,7 +32,7 @@ tester.run( ], }, ], - errors: ['"extends[0]" should be string.'], + errors: ['"extends[0]" must be string.'], }, ], }, diff --git a/tests/utils/utils.ts b/tests/utils/utils.ts index 2672f1e6..57310b9e 100644 --- a/tests/utils/utils.ts +++ b/tests/utils/utils.ts @@ -93,6 +93,7 @@ export function loadTestCases( ) let errors try { + // writeFixtures(ruleName, inputFile, { force: true }) errors = fs.readFileSync(errorFile, "utf8") } catch (e) { writeFixtures(ruleName, inputFile)