@oracle/oraclejet-audit 11.1.3 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/jaf-amd.js +6 -6
- package/jaf.js +2 -2
- package/jafapi.js +2 -2
- package/lib/AST.js +1 -1
- package/lib/AST_Ts.js +2 -2
- package/lib/AstJson.js +1 -1
- package/lib/AstMd.js +6 -0
- package/lib/AstNodeTypes.js +2 -2
- package/lib/Comments.js +1 -1
- package/lib/ComponentSvcs.js +1 -1
- package/lib/Components.js +2 -2
- package/lib/Config.js +2 -2
- package/lib/ConfigLib.js +2 -2
- package/lib/CssLib.js +1 -1
- package/lib/CssUtils.js +1 -1
- package/lib/DomUtils.js +2 -2
- package/lib/FileIndex.js +1 -1
- package/lib/FileSet.js +1 -1
- package/lib/FsUtils.js +2 -2
- package/lib/Histo.js +2 -2
- package/lib/HtmlTree.js +2 -2
- package/lib/HtmlUtils.js +1 -1
- package/lib/Issue.js +2 -2
- package/lib/JafEvents.js +1 -1
- package/lib/JafLib.js +2 -2
- package/lib/Json.js +2 -2
- package/lib/JsonLoader.js +2 -2
- package/lib/Md.js +6 -0
- package/lib/MetaLib.js +2 -2
- package/lib/NetUtils.js +1 -1
- package/lib/NodeTypes.js +1 -1
- package/lib/Parser.js +2 -2
- package/lib/RegTypes.js +2 -2
- package/lib/Registry.js +2 -2
- package/lib/Reporter.js +2 -2
- package/lib/RuleContext.js +1 -1
- package/lib/RulePack.js +1 -1
- package/lib/RuleSet.js +2 -2
- package/lib/Rules.js +2 -2
- package/lib/Scope.js +2 -2
- package/lib/SemVer.js +1 -1
- package/lib/Server.js +1 -1
- package/lib/SevLib.js +1 -1
- package/lib/Severity.js +1 -1
- package/lib/Stats.js +1 -1
- package/lib/Ts.js +2 -2
- package/lib/Utils.js +2 -2
- package/lib/Watch.js +1 -1
- package/lib/Writer.js +1 -1
- package/lib/ZipUtils.js +1 -1
- package/lib/api.js +2 -2
- package/lib/builtinpacks.js +6 -0
- package/lib/cliStats.js +2 -2
- package/lib/clone.js +2 -2
- package/lib/cmdline.js +2 -2
- package/lib/colors.js +2 -2
- package/lib/defaults.js +6 -0
- package/lib/deflist.js +6 -0
- package/lib/dislist.js +6 -0
- package/lib/exportRules.js +1 -1
- package/lib/extends.js +2 -2
- package/lib/filetypes.js +2 -2
- package/lib/grouplist.js +6 -0
- package/lib/groups.js +2 -2
- package/lib/help.js +2 -2
- package/lib/jetver.js +2 -2
- package/lib/macros.js +1 -1
- package/lib/manual.js +6 -0
- package/lib/metaLoader.js +1 -1
- package/lib/metahist.js +1 -1
- package/lib/msgidLoader.js +1 -1
- package/lib/ns.js +2 -2
- package/lib/nslist.js +1 -1
- package/lib/outFormat.js +1 -1
- package/lib/outfile.js +1 -1
- package/lib/ruleLoader.js +1 -1
- package/lib/scaffold.js +2 -2
- package/lib/scaffoldRule.js +2 -2
- package/lib/schema.js +2 -2
- package/lib/scopewalker.js +2 -2
- package/lib/spinner.js +2 -2
- package/lib/spinnernoop.js +1 -1
- package/lib/tabs.js +1 -1
- package/libext/expparser.js +1 -1
- package/meta/11.1.0/jetauditmeta.js +1 -1
- package/meta/12.0.0/jetauditmeta.js +9 -0
- package/meta/12.1.0/jetauditmeta.js +9 -0
- package/meta/metaverlist.json +1 -1
- package/package.json +72 -68
- package/rulepacks/csp/csp-html-script-unsafe-inline.js +1 -1
- package/rulepacks/csp/csp-html-style-unsafe-inline.js +1 -1
- package/rulepacks/csp/csp-html-unsafe-expr.js +1 -1
- package/rulepacks/csp/csp-js-script-unsafe-eval.js +1 -1
- package/rulepacks/csp/csp-js-style-unsafe-inline.js +1 -1
- package/rulepacks/csp/csp-ts-script-unsafe-eval.js +1 -1
- package/rulepacks/csp/csp-ts-style-unsafe-inline.js +1 -1
- package/rulepacks/csp/msgid.json +1 -1
- package/rulepacks/csp/rules.json +1 -1
- package/rulepacks/jetwc/jetwc-absolute-jetversion.js +2 -2
- package/rulepacks/jetwc/jetwc-aria-redefinition.js +2 -2
- package/rulepacks/jetwc/jetwc-bootstrap.js +2 -2
- package/rulepacks/jetwc/jetwc-compjson-bp-ar.js +2 -2
- package/rulepacks/jetwc/jetwc-compjson-bp-obj.js +2 -2
- package/rulepacks/jetwc/jetwc-component-dependencies.js +2 -2
- package/rulepacks/jetwc/jetwc-component-displayname.js +2 -2
- package/rulepacks/jetwc/jetwc-component-foldername.js +2 -2
- package/rulepacks/jetwc/jetwc-component-location.js +2 -2
- package/rulepacks/jetwc/jetwc-component-type.js +2 -2
- package/rulepacks/jetwc/jetwc-css-oj-complete.js +6 -0
- package/rulepacks/jetwc/jetwc-data-property-prefix.js +2 -2
- package/rulepacks/jetwc/jetwc-deprecated-lifecycle.js +2 -2
- package/rulepacks/jetwc/jetwc-disabled-property.js +2 -2
- package/rulepacks/jetwc/jetwc-displayname.js +2 -2
- package/rulepacks/jetwc/jetwc-dynamic-slot-context.js +2 -2
- package/rulepacks/jetwc/jetwc-dynamic-slots-naming.js +2 -2
- package/rulepacks/jetwc/jetwc-event-displayname.js +2 -2
- package/rulepacks/jetwc/jetwc-events.js +2 -2
- package/rulepacks/jetwc/jetwc-jet-version.js +2 -2
- package/rulepacks/jetwc/jetwc-loader-file.js +2 -2
- package/rulepacks/jetwc/jetwc-markdown-link.js +6 -0
- package/rulepacks/jetwc/jetwc-method-displayname.js +2 -2
- package/rulepacks/jetwc/jetwc-methods.js +2 -2
- package/rulepacks/jetwc/jetwc-namespace.js +2 -2
- package/rulepacks/jetwc/jetwc-nested-defaults.js +2 -2
- package/rulepacks/jetwc/jetwc-nls-languages.js +2 -2
- package/rulepacks/jetwc/jetwc-nls-root.js +2 -2
- package/rulepacks/jetwc/jetwc-oj-register.js +2 -2
- package/rulepacks/jetwc/jetwc-ojcss.js +2 -2
- package/rulepacks/jetwc/jetwc-pack-children.js +2 -2
- package/rulepacks/jetwc/jetwc-packable-components.js +2 -2
- package/rulepacks/jetwc/jetwc-prerelease-dependencies.js +2 -2
- package/rulepacks/jetwc/jetwc-prerelease-pattern.js +2 -2
- package/rulepacks/jetwc/jetwc-prerelease-version.js +2 -2
- package/rulepacks/jetwc/jetwc-property-changed.js +2 -2
- package/rulepacks/jetwc/jetwc-property-displayname.js +2 -2
- package/rulepacks/jetwc/jetwc-property-nesting.js +2 -2
- package/rulepacks/jetwc/jetwc-public-modules.js +2 -2
- package/rulepacks/jetwc/jetwc-register-css.js +2 -2
- package/rulepacks/jetwc/jetwc-register-with-promises.js +2 -2
- package/rulepacks/jetwc/jetwc-require-paths.js +2 -2
- package/rulepacks/jetwc/jetwc-required-subproperty.js +2 -2
- package/rulepacks/jetwc/jetwc-reserved-property.js +2 -2
- package/rulepacks/jetwc/jetwc-schema.js +2 -2
- package/rulepacks/jetwc/jetwc-semantic-version.js +2 -2
- package/rulepacks/jetwc/jetwc-slot-displayname.js +2 -2
- package/rulepacks/jetwc/jetwc-slots.js +2 -2
- package/rulepacks/jetwc/jetwc-standard-files.js +2 -2
- package/rulepacks/jetwc/jetwc-subproperty-writeback.js +2 -2
- package/rulepacks/jetwc/jetwc-template-slots.js +2 -2
- package/rulepacks/jetwc/jetwc-unused-events.js +2 -2
- package/rulepacks/jetwc/jetwc-unused-slots.js +2 -2
- package/rulepacks/jetwc/jetwc-vb-category.js +2 -2
- package/rulepacks/jetwc/jetwc-vb-icon.js +2 -2
- package/rulepacks/jetwc/jetwc-vcomponent-jetversion.js +6 -0
- package/rulepacks/jetwc/jetwc-vcomponent-loader.js +6 -0
- package/rulepacks/jetwc/jetwc-vcomponent-version.js +6 -0
- package/rulepacks/jetwc/jetwc-version-openrange.js +2 -2
- package/rulepacks/jetwc/jetwc-writeback-required.js +2 -2
- package/rulepacks/jetwc/msgid.json +2 -2
- package/rulepacks/jetwc/rules.json +2 -2
- package/rulepacks/jetwc-lib/jetwcutils-auditComponentCacheManager.js +6 -0
- package/rulepacks/jetwc-lib/jetwcutils-commonListenerImpls.js +6 -0
- package/rulepacks/jetwc-lib/jetwcutils-componentAuditUtils.js +6 -0
- package/rulepacks/jetwc-lib/jetwcutils-componentFinder.js +6 -0
- package/rulepacks/jetwc-lib/jetwcutils-preCompiler.js +6 -0
- package/rulepacks/jetwc-lib/jetwcutils-tsxUtils.js +6 -0
- package/rulepacks/jetwco/jetwco-bootstrap.js +2 -2
- package/rulepacks/jetwco/jetwco-cacc-auditConstraints.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-dependencies.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-dynamicSlots.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-eventBubbles.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-eventCancelable.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-eventPayload.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-events.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-helpers.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-jetVer.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-methodParamTypes.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-methodParams.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-methodReturnType.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-methods.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-packBundle.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-packBundleContent.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-packContent.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-properties.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyDefault.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyEnumeration.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyReadOnly.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyRequired.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyType.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyWriteback.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-publicModules.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-slotDataVariable.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-slotDataVariableType.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-slots.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-styleClasses.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-styleVariables.js +6 -0
- package/rulepacks/jetwco/jetwco-compjson-ns-reg.js +2 -2
- package/rulepacks/jetwco/jetwco-component-api-baseline-changes.js +2 -2
- package/rulepacks/jetwco/jetwco-component-api-changes.js +2 -2
- package/rulepacks/jetwco/jetwco-component-api-controlled-changes.js +6 -0
- package/rulepacks/jetwco/jetwco-component-cdn.js +2 -2
- package/rulepacks/jetwco/jetwco-description-standards.js +6 -0
- package/rulepacks/jetwco/jetwco-displayname-standards.js +6 -0
- package/rulepacks/jetwco/jetwco-exchange-version-check.js +2 -2
- package/rulepacks/jetwco/jetwco-license-info.js +2 -2
- package/rulepacks/jetwco/jetwco-prerelease-cdn.js +2 -2
- package/rulepacks/jetwco/jetwco-thirdparty-ba.js +2 -2
- package/rulepacks/jetwco/msgid.json +2 -2
- package/rulepacks/jetwco/rules.json +2 -2
- package/rulepacks/spoc/msgid.json +1 -1
- package/rulepacks/spoc/rules.json +1 -1
- package/rulepacks/spoc/spoc-dom-manip-inv-tag.js +1 -1
- package/rulepacks/spoc/spoc-dom-manip-tag-pos.js +1 -1
- package/rulepacks/spoc/spoc-dom-manip.js +1 -1
- package/rulepacks/wdt/msgid.json +6 -0
- package/rulepacks/wdt/rules.json +6 -0
- package/rulepacks/wdt/wd-driver-sleep.js +6 -0
- package/rulepacks/wdt/wd-xpath.js +6 -0
- package/rules/jaf/jaf-css-diagnose.js +1 -1
- package/rules/jaf/jaf-html-diagnose.js +1 -1
- package/rules/jaf/jaf-init-schema.js +1 -1
- package/rules/jaf/jaf-js-diagnose.js +1 -1
- package/rules/jaf/jaf-ts-diagnose.js +1 -1
- package/rules/jaf/jaf-ts-walk.js +6 -0
- package/rules/jaf/msgid.json +2 -2
- package/rules/jaf/rules.json +2 -2
- package/rules/jet/helpers/acc-aria-label.js +1 -1
- package/rules/jet/helpers/bp-checkPropType.js +1 -1
- package/rules/jet/helpers/cssHelper.js +1 -1
- package/rules/jet/helpers/extractStylesFromClass.js +1 -1
- package/rules/jet/helpers/has-slot-name.js +2 -2
- package/rules/jet/helpers/has-slot.js +1 -1
- package/rules/jet/helpers/json-prop-pos.js +1 -1
- package/rules/jet/helpers/json-propname-pos.js +1 -1
- package/rules/jet/helpers/style-selector.js +1 -1
- package/rules/jet/helpers/valid-attr.js +1 -1
- package/rules/jet/helpers/vartrack.js +1 -1
- package/rules/jet/jet-css-ojselector.js +1 -1
- package/rules/jet/msgid.json +2 -2
- package/rules/jet/oj-acc-aria-labelledby.js +1 -1
- package/rules/jet/oj-acc-aria-prop.js +2 -2
- package/rules/jet/oj-acc-avatar-aria-role.js +2 -2
- package/rules/jet/oj-acc-combobox-aria-label.js +2 -2
- package/rules/jet/oj-acc-film-strip-aria-label.js +2 -2
- package/rules/jet/oj-acc-input-aria-label.js +2 -2
- package/rules/jet/oj-acc-select-aria-label.js +2 -2
- package/rules/jet/oj-cca-compjson-bp-ar.js +1 -1
- package/rules/jet/oj-cca-compjson-bp-dsplyname.js +1 -1
- package/rules/jet/oj-cca-compjson-bp-jetver.js +1 -1
- package/rules/jet/oj-cca-compjson-bp-obj.js +1 -1
- package/rules/jet/oj-cca-compjson-ns-reg.js +1 -1
- package/rules/jet/oj-css-bp-border-color.js +1 -1
- package/rules/jet/oj-css-bp-dir-flow.js +1 -1
- package/rules/jet/oj-css-bp-float.js +1 -1
- package/rules/jet/oj-css-bp-textalign.js +1 -1
- package/rules/jet/oj-css-style-abs-units.js +2 -2
- package/rules/jet/oj-css-style-bp-color.js +1 -1
- package/rules/jet/oj-css-style-bp-display.js +1 -1
- package/rules/jet/oj-css-style-bp-font-family.js +1 -1
- package/rules/jet/oj-css-style-bp-font.js +1 -1
- package/rules/jet/oj-css-style-deprecated.js +1 -1
- package/rules/jet/oj-css-style-override.js +2 -2
- package/rules/jet/oj-css-var-override.js +1 -1
- package/rules/jet/oj-form-maxcols.js +2 -2
- package/rules/jet/oj-html-5-attr-obs.js +1 -1
- package/rules/jet/oj-html-5-tag-obs.js +1 -1
- package/rules/jet/oj-html-alta-deprecated.js +6 -0
- package/rules/jet/oj-html-attr-$unique.js +1 -1
- package/rules/jet/oj-html-attr-2def.js +1 -1
- package/rules/jet/oj-html-attr-json.js +1 -1
- package/rules/jet/oj-html-attr-prefix-expr.js +1 -1
- package/rules/jet/oj-html-attr-prefix-ro.js +1 -1
- package/rules/jet/oj-html-attr-req.js +1 -1
- package/rules/jet/oj-html-bindforeach-data.js +2 -2
- package/rules/jet/oj-html-bindif-test.js +2 -2
- package/rules/jet/oj-html-binding-attr.js +2 -2
- package/rules/jet/oj-html-cca-count.js +1 -1
- package/rules/jet/oj-html-cca-tagname.js +2 -2
- package/rules/jet/oj-html-cdn.js +1 -1
- package/rules/jet/oj-html-combo-converter.js +1 -1
- package/rules/jet/oj-html-cspexpr.js +1 -1
- package/rules/jet/oj-html-databind-all.js +1 -1
- package/rules/jet/oj-html-dlg-title.js +2 -2
- package/rules/jet/oj-html-file-pick-accept.js +2 -2
- package/rules/jet/oj-html-form-bindif.js +1 -1
- package/rules/jet/oj-html-form-layout-maxcols.js +2 -2
- package/rules/jet/oj-html-form-noflex.js +1 -1
- package/rules/jet/oj-html-input-isodate.js +2 -2
- package/rules/jet/oj-html-invalid-doctype.js +2 -2
- package/rules/jet/oj-html-jq-databind.js +2 -2
- package/rules/jet/oj-html-ko-comment.js +1 -1
- package/rules/jet/oj-html-ko-databind.js +2 -2
- package/rules/jet/oj-html-label-for-prefix.js +1 -1
- package/rules/jet/oj-html-missing-doctype.js +1 -1
- package/rules/jet/oj-html-msgs-cat-text.js +6 -0
- package/rules/jet/oj-html-no-style-tag.js +6 -0
- package/rules/jet/oj-html-notag-style.js +6 -0
- package/rules/jet/oj-html-oj-lib.js +1 -1
- package/rules/jet/oj-html-ojattr-520.js +1 -1
- package/rules/jet/oj-html-ojattr-deprecated.js +2 -2
- package/rules/jet/oj-html-ojattr-enum-deprecated.js +2 -2
- package/rules/jet/oj-html-ojattr-evt-syntax.js +2 -2
- package/rules/jet/oj-html-ojattr-value.js +1 -1
- package/rules/jet/oj-html-ojattr.js +2 -2
- package/rules/jet/oj-html-ojevent.js +2 -2
- package/rules/jet/oj-html-ojslot.js +2 -2
- package/rules/jet/oj-html-ojstyle.js +1 -1
- package/rules/jet/oj-html-ojtag-datacmd.js +2 -2
- package/rules/jet/oj-html-ojtag-datactx.js +1 -1
- package/rules/jet/oj-html-ojtag-deprecated.js +2 -2
- package/rules/jet/oj-html-ojtag-globattr-noprefix.js +2 -2
- package/rules/jet/oj-html-ojtag-id.js +1 -1
- package/rules/jet/oj-html-ojtag-nonglobattr-prefix.js +2 -2
- package/rules/jet/oj-html-ojtag-ns.js +1 -1
- package/rules/jet/oj-html-picker-attrs.js +2 -2
- package/rules/jet/oj-html-redwood-cssnovars.js +1 -1
- package/rules/jet/oj-html-redwood-cssvars.js +1 -1
- package/rules/jet/oj-html-self-close.js +1 -1
- package/rules/jet/oj-html-slot-item-minmax.js +1 -1
- package/rules/jet/oj-html-slot-name.js +2 -2
- package/rules/jet/oj-html-slot-pref-content.js +2 -2
- package/rules/jet/oj-html-style-abs-units.js +1 -1
- package/rules/jet/oj-html-style-bp-color.js +1 -1
- package/rules/jet/oj-html-style-bp-display.js +1 -1
- package/rules/jet/oj-html-style-bp-font-family.js +1 -1
- package/rules/jet/oj-html-style-bp-font.js +1 -1
- package/rules/jet/oj-html-style-deprecated.js +2 -2
- package/rules/jet/oj-html-style.js +1 -1
- package/rules/jet/oj-html-stylesel.js +1 -1
- package/rules/jet/oj-html-tag-attr-noprefix.js +2 -2
- package/rules/jet/oj-html-template-index.js +2 -2
- package/rules/jet/oj-html-unsup-theme.js +1 -1
- package/rules/jet/oj-html-wctag-$props.js +1 -1
- package/rules/jet/oj-html-wctag-arialabelledby.js +1 -1
- package/rules/jet/oj-html-wctag-for.js +1 -1
- package/rules/jet/oj-html-wctag-id.js +2 -2
- package/rules/jet/oj-html-wctag-nested.js +6 -0
- package/rules/jet/oj-html-wctag-packprivate.js +1 -1
- package/rules/jet/oj-js-comp-attr-deprecated.js +2 -2
- package/rules/jet/oj-js-comp-meth-deprecated.js +2 -2
- package/rules/jet/oj-js-no-ext-final.js +1 -1
- package/rules/jet/oj-js-noconsole.js +1 -1
- package/rules/jet/oj-js-ojcomp-deprecated.js +2 -2
- package/rules/jet/oj-js-ojcomp-exist.js +1 -1
- package/rules/jet/oj-js-ojcomp-new.js +1 -1
- package/rules/jet/oj-js-poly-promise.js +1 -1
- package/rules/jet/oj-js-var-undef.js +1 -1
- package/rules/jet/oj-json-syntax.js +1 -1
- package/rules/jet/oj-ts-comp-attr-deprecated.js +2 -2
- package/rules/jet/oj-ts-comp-meth-deprecated.js +2 -2
- package/rules/jet/oj-ts-no-ext-final.js +1 -1
- package/rules/jet/oj-ts-noconsole.js +1 -1
- package/rules/jet/oj-ts-ojcomp-deprecated.js +2 -2
- package/rules/jet/oj-ts-ojcomp-exist.js +1 -1
- package/rules/jet/oj-ts-ojcomp-new.js +1 -1
- package/rules/jet/oj-ts-poly-promise.js +1 -1
- package/rules/jet/rules.json +2 -2
- package/schema/component-schema.json +4 -1
- package/src/JafCore.js +2 -2
- package/types/index.d.ts +122 -82
- package/lib/imanual.js +0 -6
- package/lib/xmanual.js +0 -6
- package/rulepacks/jetwc-lib/component-audit-utils.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
const Utils=require('../jetwc-lib/
|
|
6
|
+
const Utils=require('../jetwc-lib/jetwcutils-componentAuditUtils');const TsxUtils=require('../jetwc-lib/jetwcutils-tsxUtils');const NetUtils=require('../../lib/NetUtils');const CommonImpl=require('../jetwc-lib/jetwcutils-commonListenerImpls');const ruleDef=function(){};ruleDef.prototype.getName=function(){return'jetwco-exchange-version-check'};ruleDef.prototype.getShortDescription=function(){return'Verify version is not already in Exchange'};ruleDef.prototype.getDescription=function(){return'This audit checks that the version specified for this component does not already exist in Exchange. This may not actually be an error, hence this informational only.'};ruleDef.prototype.register=function(context){return{startaudit:this._checkForExchangeConfiguration,compjson:this._doAudit,Program:this._doVComponentAudit}};ruleDef.prototype._checkForExchangeConfiguration=function(context){this.exchangeURL=CommonImpl.checkForExchangeConfiguration(context);if(!this.exchangeURL){const issue=new context.Issue(`Invalid or Missing exchangeURL value specified for the rule ${context.ruleName}, rule execution is disabled`);issue.setMsgKey(`${context.ruleName}_3`);issue.setSeverity('critical');context.reporter.addIssue(issue,context)}};ruleDef.prototype._doAudit=function(context){if(context.suppData.obj){const componentDef=context.suppData.obj;const fullName=Utils.getComponentFullName(componentDef);this._checkForExchangeVersion(context,fullName,componentDef.version)}};ruleDef.prototype._doVComponentAudit=function(context){const componentInfo=TsxUtils.matchToVComponentImpl(context,context.filepath);if(componentInfo){this._checkForExchangeVersion(context,componentInfo.fullName,componentInfo.version)}};ruleDef.prototype._checkForExchangeVersion=function(context,fullName,newVersion){const semver=context.utils.semVerUtils;const msg=context.utils.msgLib;try{const netUtils=new NetUtils;const existingVersionsResp=netUtils.loadUrl(`${this.exchangeURL}components/${fullName}/versions`);const responseCode=existingVersionsResp.statusCode;if(responseCode===200&&existingVersionsResp.body){const existingVersions=JSON.parse(existingVersionsResp.body);if(existingVersions.items&&existingVersions.items.length>0){let latestMatchVersion,nextProjectedVersion;const versions=existingVersions.items.reverse();for(let i=0;i<versions.length;i++){if(semver.gte(newVersion,versions[i])){latestMatchVersion=versions[i];if(i>0){nextProjectedVersion=versions[i-1]}break}}if(latestMatchVersion){if(latestMatchVersion===newVersion){const sameissue=new context.Issue(`The version number defined for ${fullName} (${newVersion}) already exists in Exchange`);sameissue.setMsgKey('jetwco-exchange-version-check_1');context.reporter.addIssue(sameissue,context)}else if(nextProjectedVersion){const futureissue=new context.Issue(`The version number defined for ${fullName} (${newVersion}) is lower than existing versions in Exchange`);futureissue.setMsgKey('jetwco-exchange-version-check_2');context.reporter.addIssue(futureissue,context)}}}}else if(responseCode===404||existingVersionsResp.eCode==='ENOTFOUND'){msgLib.info(`The component ${fullName} does not exist in the Exchange and so cannot be API verified against older versions. It will be skipped`)}}catch(e){msg.error(JSON.stringify(e))};};module.exports=ruleDef;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
const path=require('path');const ruleDef=function(){};ruleDef.prototype.getName=function(){return'jetwco-license-info'};ruleDef.prototype.getShortDescription=function(){return'Validate Licence Information'};ruleDef.prototype.getDescription=function(){return'This rule is checks that a license file (LICENSE.txt) and third party license (THIRD_PARTY_LICENSE.txt) file is present if required'};ruleDef.prototype.register=function(context){return{compjson:this._doAudit}};ruleDef.prototype._doAudit=function(context){const componentMetadata=context.suppData.obj;const rulePackState=context.rulePack.getExtension();if(componentMetadata){let issue;let licenseFound=false;let licenseCandidate='LICENSE.txt';const compRootFiles=context.utils.fsUtils.readDir(path.dirname(context.filepath));for(let i=0;i<compRootFiles.length;i++){const rootEntry=compRootFiles[i];if(rootEntry.isFile&&rootEntry.name===licenseCandidate){licenseFound=true;break}}if(!licenseFound){issue=new context.Issue(`Component is missing license information file in root, 'LICENSE.txt' is expected (case sensitive)`);issue.setMsgKey(context.ruleName+'_1');context.reporter.addIssue(issue,context
|
|
6
|
+
const path=require('path');const ruleDef=function(){};ruleDef.prototype.getName=function(){return'jetwco-license-info'};ruleDef.prototype.getShortDescription=function(){return'Validate Licence Information'};ruleDef.prototype.getDescription=function(){return'This rule is checks that a license file (LICENSE.txt) and third party license (THIRD_PARTY_LICENSE.txt) file is present if required'};ruleDef.prototype.register=function(context){return{compjson:this._doAudit}};ruleDef.prototype._doAudit=function(context){const msg=context.utils.msgLib;const componentMetadata=context.suppData.obj;const rulePackState=context.rulePack.getExtension();if(componentMetadata){let issue;let licenseFound=false;let licenseCandidate='LICENSE.txt';const compRootFiles=context.utils.fsUtils.readDir(path.dirname(context.filepath));for(let i=0;i<compRootFiles.length;i++){const rootEntry=compRootFiles[i];if(rootEntry.isFile&&rootEntry.name===licenseCandidate){licenseFound=true;break}}if(!licenseFound){issue=new context.Issue(`Component is missing license information file in root, 'LICENSE.txt' is expected (case sensitive)`);issue.setMsgKey(context.ruleName+'_1');context.reporter.addIssue(issue,context)}let thirdPartyScan=false;if(componentMetadata.type&&componentMetadata.type==='reference'){thirdPartyScan=true}else{if(componentMetadata.dependencies){if(rulePackState.allReferenceComponents){Object.keys(componentMetadata.dependencies).forEach(dependency=>{if(rulePackState.allReferenceComponents.has(dependency)){thirdPartyScan=true}})}else{msg.error('JETWC: Unable to scan for reference component dependencies - JETWC-BOOTSTRAP was not run')}}}if(thirdPartyScan){licenseFound=false;licenseCandidate='THIRD_PARTY_LICENSE.txt';for(let i=0;i<compRootFiles.length;i++){const rootEntry=compRootFiles[i];if(rootEntry.isFile&&rootEntry.name===licenseCandidate){licenseFound=true;break}}if(!licenseFound){issue=new context.Issue(`Component with third party dependencies is missing 3rd party license information file in root, 'THIRD_PARTY_LICENSE.txt' is expected (case sensitive)`);issue.setMsgKey(context.ruleName+'_2');context.reporter.addIssue(issue,context)}}}};module.exports=ruleDef;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
const Utils=require('../jetwc-lib/
|
|
6
|
+
const Utils=require('../jetwc-lib/jetwcutils-componentAuditUtils');const ruleDef=function(){};ruleDef.prototype.getName=function(){return'jetwco-prerelease-cdn'};ruleDef.prototype.getShortDescription=function(){return'Validates use of the production CDN'};ruleDef.prototype.getDescription=function(){return'This rule checks any CDN definitions to ensure that they point to assets on the production Oracle CDN, not the staging site or other sites'};ruleDef.prototype.register=function(context){return{compjson:this._doAudit}};ruleDef.prototype._doAudit=function(context){const productionCDN=context.rulePack.getRuleOptions().cdnRoot.toLowerCase();if(context.suppData.obj){let issue;const meta=context.suppData.obj;const componentType=Utils.getComponentType(meta);const componentName=meta.name;if(meta.paths&&meta.paths.cdn){if(meta.paths.cdn.min&&!meta.paths.cdn.min.toLowerCase().startsWith(productionCDN)||meta.paths.cdn.debug&&!meta.paths.cdn.debug.toLowerCase().startsWith(productionCDN)){issue=new context.Issue(`${componentType} component '${componentName}' does not use the correct CDN (${productionCDN})`);context.reporter.addIssue(issue,context)}}}};module.exports=ruleDef;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
const Utils=require('../jetwc-lib/
|
|
6
|
+
const Utils=require('../jetwc-lib/jetwcutils-componentAuditUtils');const TsxUtils=require('../jetwc-lib/jetwcutils-tsxUtils');const ruleDef=function(){};ruleDef.prototype.getName=function(){return'jetwco-thirdparty-ba'};ruleDef.prototype.getShortDescription=function(){return'Validate Business Approvals'};ruleDef.prototype.getDescription=function(){return'This rule is applied to reference component and any components that depend on reference components to ensure that the PLS Business Approval number is recorded'};ruleDef.prototype.register=function(context){return{compjson:this._doAudit,Program:this._doVComponentAudit}};ruleDef.prototype._doAudit=function(context){if(context.suppData.obj){const meta=context.suppData.obj;const componentType=Utils.getComponentType(meta);this._checkBA(context,componentType,meta.dependencies,meta.extension)}};ruleDef.prototype._doVComponentAudit=function(context){const componentInfo=TsxUtils.matchToVComponentImpl(context,context.filepath);if(componentInfo){let remappedDependencies;if(componentInfo.dependencies){remappedDependencies=componentInfo.dependencies.reduce((asMap,entry)=>{asMap[entry.name]=entry.range;return asMap},{})}this._checkBA(context,componentInfo.type,remappedDependencies,componentInfo.extension)}};ruleDef.prototype._checkBA=function(context,componentType,dependenciesMetadata,extensionMetadata){const referenceComponents=context.rulePack.getExtension().allReferenceComponents;if(componentType==='reference'){if(!(extensionMetadata&&extensionMetadata.oracle&&extensionMetadata.oracle.businessApprovals)){issue=new context.Issue(`Reference component is missing PLS Business Approval Information`);issue.setMsgKey('jetwco-thirdparty-ba_4');context.reporter.addIssue(issue,context)}}if(referenceComponents){let issue;if(dependenciesMetadata){Object.keys(dependenciesMetadata).forEach(dependency=>{if(referenceComponents.has(dependency)){const referencedLibs=referenceComponents.get(dependency);if(referencedLibs&&Object.keys(referencedLibs).length>0){if(!(extensionMetadata&&extensionMetadata.oracle&&extensionMetadata.oracle.businessApprovals)){issue=new context.Issue(`Component is missing PLS Business Approval Information relating to the reference '${dependency}'`);issue.setMsgKey('jetwco-thirdparty-ba_1');context.reporter.addIssue(issue,context)}else{Object.keys(referencedLibs).forEach(lib=>{if(!extensionMetadata.oracle.businessApprovals.hasOwnProperty(lib)){issue=new context.Issue(`Component is missing PLS Business Approval Information relating to '${lib}' from '${dependency}'`);issue.setMsgKey('jetwco-thirdparty-ba_2');context.reporter.addIssue(issue,context)}else{if(extensionMetadata.oracle.businessApprovals[lib]!==referencedLibs[lib]){issue=new context.Issue(`Component PLS Business Approval Information relating to '${lib}' from '${dependency}' does not match`);issue.setMsgKey('jetwco-thirdparty-ba_2');context.reporter.addIssue(issue,context)}}})}}else{issue=new context.Issue(`Reference component dependency '${dependency}' does not have supplied PLS Business Approval Information`);issue.setMsgKey('jetwco-thirdparty-ba_3');context.reporter.addIssue(issue,context)}}})}}};module.exports=ruleDef;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
{"jetwco-component-cdn":"0001","jetwco-license-info_1":"0002","jetwco-license-info_2":"0003","jetwco-prerelease-cdn":"0004","jetwco-thirdparty-ba_1":"0005","jetwco-thirdparty-ba_2":"0006","jetwco-thirdparty-ba_3":"0007","jetwco-exchange-version-check_1":"0009","jetwco-exchange-version-check_2":"0010","jetwco-component-api-
|
|
6
|
+
{"jetwco-component-cdn":"0001","jetwco-license-info_1":"0002","jetwco-license-info_2":"0003","jetwco-prerelease-cdn":"0004","jetwco-thirdparty-ba_1":"0005","jetwco-thirdparty-ba_2":"0006","jetwco-thirdparty-ba_3":"0007","jetwco-thirdparty-ba_4":"0008","jetwco-exchange-version-check_1":"0009","jetwco-exchange-version-check_2":"0010","jetwco-exchange-version-check_3":"0014","jetwco-component-api-changes_1":"0011","jetwco-component-api-changes_2":"0015","jetwco-compjson-ns-reg":"0012","jetwco-component-api-baseline-changes_1":"0013","jetwco-component-api-baseline-changes_2":"0016","jetwco-displayname-standards_1":"0020","jetwco-displayname-standards_2":"0021","jetwco-description-standards_1":"0030","jetwco-description-standards_2":"0031","jetwco-description-standards_3":"0032","jetwco-component-api-controlled-changes_1":"0040","jetwco-component-api-controlled-changes_2":"0041"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
{"title":"Oracle Internal Audit Rules for JET Custom Component Authors","prefix":"JETWCO","version":"1.
|
|
6
|
+
{"title":"Oracle Internal Audit Rules for JET Custom Component Authors","prefix":"JETWCO","version":"1.12.1","rules":{"jetwco-bootstrap":{"group":"jetwco-do-not-disable","enabled":true,"severity":"info","debug":false,"diagnosticFile":"jetwco-diagnostics","componentRoot":"jet-composites","auditBuildOutput":false,"testMode":false,"$required":true},"jetwco-component-cdn":{"group":"jetwco-pre-release","severity":"major","filetype":["json"]},"jetwco-prerelease-cdn":{"group":"jetwco-pre-release","enabled":true,"cdnRoot":"https://static.oracle.com/cdn/","severity":"blocker","filetype":["json"]},"jetwco-thirdparty-ba":{"group":"jetwco-pre-release","enabled":true,"severity":"major","filetype":["json","tsx"]},"jetwco-license-info":{"group":"jetwco-pre-release","enabled":true,"severity":"blocker","filetype":["json","tsx"]},"jetwco-exchange-version-check":{"group":"jetwco-api","enabled":false,"severity":"info","filetype":["json","tsx"]},"jetwco-component-api-changes":{"group":"jetwco-api","enabled":false,"severity":"blocker","filetype":["json","tsx"],"clearCache":false},"jetwco-compjson-ns-reg":{"group":"jetwco-api","enabled":true,"severity":"major","filetype":["json","tsx"]},"jetwco-component-api-baseline-changes":{"group":"jetwco-api","enabled":false,"severity":"blocker","filetype":["json","tsx"],"baseline":{},"clearCache":false},"jetwco-displayname-standards":{"group":"jetwco-doc","enabled":true,"severity":"minor","filetype":["json","tsx"]},"jetwco-description-standards":{"group":"jetwco-doc","enabled":true,"severity":"minor","filetype":["json","tsx"]},"jetwco-component-api-controlled-changes":{"group":"jetwco-api","enabled":false,"severity":"blocker","filetype":["json","tsx"],"clearCache":false,"controls":{}}}}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
|
+
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
|
+
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
|
+
*/
|
|
6
|
+
{"title":"WebDriver Test Audit - Placeholder","prefix":"WDT","version":"0.0.1","rules":{"wd-xpath":{"severity":"major","filetype":"ts","status":"beta"},"wd-driver-sleep":{"severity":"critical","filetype":"ts","status":"beta"}}}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
|
+
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
|
+
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
|
+
*/
|
|
6
|
+
const RULENAME="wd-driver-sleep";const DESCRIPT="Do not use timed sleeps in tests, WebDriver commands automatically wait on BusyContext. "+"Ensure the application is properly reporting busy states for async activity.";const SHORT="Do not use timed sleeps in tests.";function Rule(){};Rule.prototype.getName=function(){return RULENAME};Rule.prototype.getShortDescription=function(){return SHORT};Rule.prototype.getDescription=function(){return DESCRIPT};Rule.prototype.register=function(){return{CallExpression:this._onCallExpr}};Rule.prototype._onCallExpr=function(ruleCtx,node){var cn=node.callee;if(cn&&cn.property&&cn.property.type==="Identifier"&&cn.property.name==="sleep"){if(cn.object&&cn.object.type==="Identifier"&&cn.object.name==="driver"){let issue=new ruleCtx.Issue("Do not use timed sleeps in tests. WebDriver commands automatically wait on BusyContext.");ruleCtx.reporter.addIssue(issue,ruleCtx)}}};module.exports=Rule;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
|
+
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
|
+
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
|
+
*/
|
|
6
|
+
const RULENAME="wd-xpath";const DESCRIPT="Do not locate elements by xpath - targeted elements should have static Ids. Use By.id() instead";const SHORT="Do not locate elements by xpath";function Rule(){};Rule.prototype.getName=function(){return RULENAME};Rule.prototype.getShortDescription=function(){return SHORT};Rule.prototype.getDescription=function(){return DESCRIPT};Rule.prototype.register=function(){return{CallExpression:this._onCallExpr}};Rule.prototype._onCallExpr=function(ruleCtx,node){var cn=node.callee;if(cn&&cn.property&&cn.property.type==="Identifier"&&cn.property.name==="xpath"){let issue=new ruleCtx.Issue(DESCRIPT);ruleCtx.reporter.addIssue(issue,ruleCtx)}};module.exports=Rule;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
|
+
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
|
+
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
|
+
*/
|
|
6
|
+
function getName(){return"jaf-ts-walk"};function getShortDescription(){return"Handle TypeScript walk exception"};function getDescription(){return"While processing TypeScript, an internal exception has occurred while walking the Abstract Syntax Tree."};module.exports={getName,getDescription,getShortDescription};
|
package/rules/jaf/msgid.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
{"jaf-js-diagnose":"1000","jaf-ts-diagnose":"1005","jaf-css-diagnose":"1010","jaf-html-diagnose":"1020","jaf-init-schema":"2000","jaf-sys-startup":"9000"}
|
|
6
|
+
{"jaf-js-diagnose":"1000","jaf-ts-diagnose":"1005","jaf-ts-walk":"1007","jaf-css-diagnose":"1010","jaf-html-diagnose":"1020","jaf-init-schema":"2000","jaf-sys-startup":"9000"}
|
package/rules/jaf/rules.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
{"title":"JAF System Rules","version":"1.1.0","prefix":"JAF","rules":{"jaf-js-diagnose":{"severity":"blocker","filetype":["js","html"],"group":["jaf-js"],"status":"production","$internal":true},"jaf-ts-diagnose":{"severity":"blocker","filetype":["ts"],"group":["jaf-ts"],"status":"production","$internal":true},"jaf-html-diagnose":{"severity":"minor","filetype":["html"],"group":["jet-html"],"status":"production","$internal":true},"jaf-css-diagnose":{"severity":"minor","filetype":["css","html"],"group":["jet-css"],"status":"production","$internal":true},"jaf-init-schema":{"severity":"major","filetype":["json"],"group":["jet-json"],"status":"production","$internal":true}}}
|
|
6
|
+
{"title":"JAF System Rules","version":"1.1.0","prefix":"JAF","rules":{"jaf-js-diagnose":{"severity":"blocker","filetype":["js","html"],"group":["jaf-js"],"status":"production","$internal":true},"jaf-ts-diagnose":{"severity":"blocker","filetype":["ts"],"group":["jaf-ts"],"status":"production","$internal":true},"jaf-ts-walk":{"severity":"blocker","filetype":["ts"],"group":["jaf-ts"],"status":"production","$internal":true},"jaf-html-diagnose":{"severity":"minor","filetype":["html"],"group":["jet-html"],"status":"production","$internal":true},"jaf-css-diagnose":{"severity":"minor","filetype":["css","html"],"group":["jet-css"],"status":"production","$internal":true},"jaf-init-schema":{"severity":"major","filetype":["json"],"group":["jet-json"],"status":"production","$internal":true}}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
const TEMPLATE="template";const OJ_BIND="oj-bind";const BODY="body";module.exports=function(ruleCtx,slotName){return _getSlotParent(ruleCtx,slotName)};function _getSlotParent(ruleCtx,slotName){var parent,isOjDefer=false,ret=null;parent=ruleCtx.tagNode.parent;isOjDefer=ruleCtx.tag==="oj-defer";if(parent&&parent.name){if(parent.name!==BODY){if(ruleCtx.utils.DomUtils.isSelfClosingTag(parent.name)){ret=_continueUpwards(ruleCtx,parent,slotName)}else{if(ruleCtx.utils.metaLib.
|
|
6
|
+
const TEMPLATE="template";const OJ_BIND="oj-bind";const OJ_DEFER="oj-defer";const BODY="body";module.exports=function(ruleCtx,slotName){return _getSlotParent(ruleCtx,slotName)};function _getSlotParent(ruleCtx,slotName){var parent,isOjDefer=false,ret=null;parent=ruleCtx.tagNode.parent;isOjDefer=ruleCtx.tag==="oj-defer";if(parent&&parent.name){if(parent.name!==BODY){if(ruleCtx.utils.DomUtils.isSelfClosingTag(parent.name)){ret=_continueUpwards(ruleCtx,parent,slotName)}else{if(ruleCtx.utils.metaLib.isTagSlotName(parent.name,slotName)){ret=parent}}if(!ret){if(isOjDefer&&parent.name===TEMPLATE||parent.name==="oj-switcher"){ret=parent}else if(parent.name===TEMPLATE||parent.name.startsWith(OJ_BIND)||parent.name===OJ_DEFER){ret=_continueUpwards(ruleCtx,parent,slotName)}}}}return ret};function _continueUpwards(ruleCtx,tag,slotName){var ret=null,parent;parent=tag.parent;while(parent){if(parent.name===TEMPLATE||parent.name.startsWith(OJ_BIND)||parent.name===OJ_DEFER){parent=parent.parent;continue}if(parent.name!==BODY){if(ruleCtx.utils.metaLib.isTagSlotName(parent.name,slotName)){ret=parent}}break}return ret};
|
package/rules/jet/msgid.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
{"oj-html-ojtag-deprecated":"0010","oj-html-ojtag-deprecated_1":"0011","oj-html-attr-json_1":"0020","oj-html-attr-json_2":"0021","oj-html-ojattr":"0040","oj-html-ojattr_1":"0041","oj-html-ojattr-520":"0040","oj-html-ojattr-value":"0060","oj-html-attr-2def":"0070","oj-html-attr-prefix-ro":"0073","oj-html-attr-prefix-expr":"0075","oj-html-attr-req":"0077","oj-html-ojattr-deprecated":"0080","oj-html-ojattr-deprecated_1":"0081","oj-html-ojattr-enum-deprecated":"0085","oj-html-ojevent":"0090","oj-html-jq-databind_1":"0100","oj-html-jq-databind_2":"0110","oj-html-jq-databind_3":"0120","oj-html-databind-all":"0130","oj-html-ojslot":"0140","oj-html-slot-name":"0150","oj-html-slot-pref-content":"0153","oj-html-slot-item-minmax":"0156","oj-html-slot-item-minmax_1":"0157","oj-html-binding-attr":"0160","oj-html-bindif-test":"0163","oj-html-bindforeach-data":"0165","oj-html-dlg-title":"0168","oj-html-attr-$unique_1":"0170","oj-html-attr-$unique_2":"0180","oj-html-tag-attr-noprefix":"0190","oj-html-label-for-prefix":"0195","oj-html-ojtag-globattr-noprefix":"0200","oj-html-ojtag-nonglobattr-prefix":"0210","oj-html-invalid-doctype":"0220","oj-html-missing-doctype":"0230","oj-html-oj-lib":"0240","oj-html-ko-comment":"0250","oj-html-ko-databind":"0260","oj-html-cca-count":"0270","oj-html-cdn":"0280","oj-html-ojattr-evt-syntax":"0290","oj-html-ojtag-datacmd":"0310","oj-html-ojtag-datacmd_1":"0311","oj-html-ojtag-datacmd_2":"0312","oj-html-ojtag-datacmd_3":"0313","oj-html-ojtag-datactx":"0320","oj-html-wctag-id":"0330","oj-html-wctag-id_1":"0331","oj-html-wctag-id_2":"0332","oj-html-wctag-for":"0340","oj-html-wctag-arialabelledby":"0350","oj-html-wctag-$props":"0360","oj-html-wctag-$props_1":"0361","oj-html-form-bindif":"0370","oj-html-combo-converter":"0380","oj-html-ojtag-ns":"0385","oj-html-ojtag-ns_1":"0386","oj-html-ojtag-ns_2":"0387","oj-html-unsup-theme":"0390","oj-html-unsup-theme_1":"0391","oj-html-form-noflex":"0395","oj-html-5-tag-obs":"0400","oj-html-5-attr-obs_1":"0410","oj-html-5-attr-obs_2":"0411","oj-html-redwood-cssvars":"0420","oj-html-redwood-cssnovars":"0421","oj-html-template-index":"0425","oj-form-maxcols":"0430","oj-form-maxcols_1":"0431","oj-form-maxcols_2":"0432","oj-html-form-layout-maxcols":"0435","oj-html-file-pick-accept":"0450","oj-html-file-pick-accept_1":"0451","oj-html-file-pick-accept_2":"0452","oj-html-wctag-packprivate":"0465","oj-html-picker-attrs":"0470","oj-acc-input-aria-label_1":"2000","oj-acc-input-aria-label_2":"2010","oj-acc-input-aria-label_3":"2020","oj-acc-input-aria-label_4":"2030","oj-acc-input-aria-label_5":"2031","oj-acc-input-aria-label_6":"2032","oj-acc-select-aria-label_1":"2040","oj-acc-select-aria-label_2":"2050","oj-acc-select-aria-label_3":"2060","oj-acc-select-aria-label_4":"2070","oj-acc-select-aria-label_5":"2071","oj-acc-select-aria-label_6":"2072","oj-acc-combobox-aria-label_1":"2080","oj-acc-combobox-aria-label_2":"2090","oj-acc-combobox-aria-label_3":"2100","oj-acc-combobox-aria-label_4":"2120","oj-acc-combobox-aria-label_5":"2121","oj-acc-combobox-aria-label_6":"2122","oj-acc-aria-labelledby":"2130","oj-acc-avatar-aria-role":"2140","oj-acc-film-strip-aria-label":"2150","oj-acc-aria-prop":"2160","oj-html-cca-tagname":"2200","oj-html-cca-tagname_1":"2201","oj-html-cspexpr":"2210","oj-html-cspexpr_1":"2211","oj-js-ojcomp-deprecated":"3000","oj-js-comp-meth-deprecated":"3020","oj-js-comp-meth-deprecated_1":"3022","oj-js-comp-meth-deprecated_2":"3023","oj-js-comp-attr-deprecated":"3025","oj-js-comp-attr-deprecated_1":"3026","oj-js-comp-attr-deprecated_2":"3027","oj-js-ojcomp-new":"3060","oj-js-ojcomp-exist":"3070","oj-js-ojcomp-exist_1":"3071","oj-js-var-undef":"3080","oj-js-var-undef_1":"3082","oj-js-poly-promise":"3090","oj-js-noconsole":"3100","oj-js-no-ext-final":"3200","oj-ts-ojcomp-deprecated":"3400","oj-ts-comp-meth-deprecated":"3420","oj-ts-comp-meth-deprecated_1":"3422","oj-ts-comp-meth-deprecated_2":"3423","oj-ts-comp-attr-deprecated":"3425","oj-ts-comp-attr-deprecated_1":"3426","oj-ts-comp-attr-deprecated_2":"3427","oj-ts-ojcomp-new":"3440","oj-ts-ojcomp-exist":"3445","oj-ts-ojcomp-exist_1":"3450","oj-ts-poly-promise":"3455","oj-ts-noconsole":"3460","oj-ts-no-ext-final":"3465","oj-json-syntax":"4000","oj-cca-comp-json-file":"9000","oj-cca-comp-json-schema":"9005","oj-cca-comp-json-compdeps":"9010","oj-cca-comp-zip":"9015","oj-cca-comp-zip-type":"9020","oj-cca-comp-zip-content":"9025","oj-cca-comp-zip-content-case":"9030","oj-cca-compjson-bp-obj":"9040","oj-cca-compjson-bp-ar":"9043","oj-cca-compjson-ns-reg":"9046","oj-cca-compjson-ns-reg_1":"9047","oj-cca-compjson-bp-jetver":"9049","oj-cca-compjson-bp-dsplyname":"9052","oj-html-style":"5000","oj-html-style_1":"5001","oj-html-style-deprecated":"5010","oj-html-ojstyle":"5015","oj-html-style-bp-color":"5020","oj-html-style-bp-font":"5025","oj-html-style-bp-display":"5030","oj-html-self-close":"5035","oj-html-style-bp-font-family":"5040","oj-html-style-abs-units":"5045","oj-html-style-abs-units_1":"5046","oj-html-style-abs-units_2":"5047","oj-html-stylesel":"5080","oj-html-stylesel_1":"5081","oj-html-stylesel_2":"5082","oj-html-stylesel_3":"5083","oj-html-stylesel_4":"5084","oj-html-stylesel_5":"5085","oj-html-stylesel_6":"5086","oj-html-stylesel_7":"5087","oj-html-input-isodate":"5095","oj-html-input-isodate_1":"5096","oj-html-input-isodate_2":"5097","oj-html-input-isodate_3":"5098","oj-html-input-isodate_4":"5099","oj-html-input-isodate_5":"5100","oj-html-input-isodate_6":"5101","oj-html-input-isodate_7":"5102","oj-html-input-isodate_8":"5103","oj-html-input-isodate_9":"5104","oj-css-style-override_1":"6010","oj-css-style-override_2":"6011","oj-css-style-bp-color":"6015","oj-css-style-deprecated":"6020","oj-css-style-bp-font":"6025","oj-css-style-bp-display":"6030","oj-css-style-bp-font-family":"6035","oj-css-style-abs-units":"6040","oj-css-style-abs-units_1":"6041","oj-css-bp-float":"6045","oj-css-bp-float_1":"6046","oj-css-bp-textalign":"6050","oj-css-bp-textalign_1":"6051","oj-css-bp-border-color":"6060","oj-css-bp-border-color_1":"6061","oj-css-var-override":"6065","oj-css-var-override_1":"6066","oj-css-bp-dir-flow":"6070"}
|
|
6
|
+
{"oj-html-ojtag-deprecated":"0010","oj-html-ojtag-deprecated_1":"0011","oj-html-attr-json_1":"0020","oj-html-attr-json_2":"0021","oj-html-ojattr":"0040","oj-html-ojattr_1":"0041","oj-html-ojattr-520":"0040","oj-html-ojattr-value":"0060","oj-html-attr-2def":"0070","oj-html-attr-prefix-ro":"0073","oj-html-attr-prefix-expr":"0075","oj-html-attr-req":"0077","oj-html-ojattr-deprecated":"0080","oj-html-ojattr-deprecated_1":"0081","oj-html-ojattr-deprecated_2":"0082","oj-html-ojattr-deprecated_3":"0083","oj-html-ojattr-enum-deprecated":"0085","oj-html-ojevent":"0090","oj-html-jq-databind_1":"0100","oj-html-jq-databind_2":"0110","oj-html-jq-databind_3":"0120","oj-html-databind-all":"0130","oj-html-ojslot":"0140","oj-html-slot-name":"0150","oj-html-slot-pref-content":"0153","oj-html-slot-item-minmax":"0156","oj-html-slot-item-minmax_1":"0157","oj-html-binding-attr":"0160","oj-html-bindif-test":"0163","oj-html-bindforeach-data":"0165","oj-html-dlg-title":"0168","oj-html-attr-$unique_1":"0170","oj-html-attr-$unique_2":"0180","oj-html-tag-attr-noprefix":"0190","oj-html-label-for-prefix":"0195","oj-html-ojtag-globattr-noprefix":"0200","oj-html-ojtag-nonglobattr-prefix":"0210","oj-html-invalid-doctype":"0220","oj-html-invalid-doctype_1":"0221","oj-html-missing-doctype":"0230","oj-html-oj-lib":"0240","oj-html-ko-comment":"0250","oj-html-ko-databind":"0260","oj-html-cca-count":"0270","oj-html-cdn":"0280","oj-html-ojattr-evt-syntax":"0290","oj-html-ojtag-datacmd":"0310","oj-html-ojtag-datacmd_1":"0311","oj-html-ojtag-datacmd_2":"0312","oj-html-ojtag-datacmd_3":"0313","oj-html-ojtag-datactx":"0320","oj-html-wctag-id":"0330","oj-html-wctag-id_1":"0331","oj-html-wctag-id_2":"0332","oj-html-wctag-for":"0340","oj-html-wctag-arialabelledby":"0350","oj-html-wctag-$props":"0360","oj-html-wctag-$props_1":"0361","oj-html-form-bindif":"0370","oj-html-combo-converter":"0380","oj-html-ojtag-ns":"0385","oj-html-ojtag-ns_1":"0386","oj-html-ojtag-ns_2":"0387","oj-html-unsup-theme":"0390","oj-html-unsup-theme_1":"0391","oj-html-form-noflex":"0395","oj-html-5-tag-obs":"0400","oj-html-5-attr-obs_1":"0410","oj-html-5-attr-obs_2":"0411","oj-html-redwood-cssvars":"0420","oj-html-redwood-cssnovars":"0421","oj-html-template-index":"0425","oj-form-maxcols":"0430","oj-form-maxcols_1":"0431","oj-form-maxcols_2":"0432","oj-html-form-layout-maxcols":"0435","oj-html-file-pick-accept":"0450","oj-html-file-pick-accept_1":"0451","oj-html-file-pick-accept_2":"0452","oj-html-wctag-packprivate":"0465","oj-html-picker-attrs":"0470","oj-html-wctag-nested":"0480","oj-html-notag-style":"0490","oj-html-notag-style_1":"0491","oj-html-msgs-cat-text":"0495","oj-html-msgs-cat-text_1":"0496","oj-html-msgs-cat-text_2":"0497","oj-html-msgs-cat-text_3":"0498","oj-html-no-style-tag":"0505","oj-html-alta-deprecated":"0510","oj-acc-input-aria-label_1":"2000","oj-acc-input-aria-label_2":"2010","oj-acc-input-aria-label_3":"2020","oj-acc-input-aria-label_4":"2030","oj-acc-input-aria-label_5":"2031","oj-acc-input-aria-label_6":"2032","oj-acc-select-aria-label_1":"2040","oj-acc-select-aria-label_2":"2050","oj-acc-select-aria-label_3":"2060","oj-acc-select-aria-label_4":"2070","oj-acc-select-aria-label_5":"2071","oj-acc-select-aria-label_6":"2072","oj-acc-combobox-aria-label_1":"2080","oj-acc-combobox-aria-label_2":"2090","oj-acc-combobox-aria-label_3":"2100","oj-acc-combobox-aria-label_4":"2120","oj-acc-combobox-aria-label_5":"2121","oj-acc-combobox-aria-label_6":"2122","oj-acc-aria-labelledby":"2130","oj-acc-avatar-aria-role":"2140","oj-acc-film-strip-aria-label":"2150","oj-acc-aria-prop":"2160","oj-html-cca-tagname":"2200","oj-html-cca-tagname_1":"2201","oj-html-cspexpr":"2210","oj-html-cspexpr_1":"2211","oj-js-ojcomp-deprecated":"3000","oj-js-comp-meth-deprecated":"3020","oj-js-comp-meth-deprecated_1":"3022","oj-js-comp-meth-deprecated_2":"3023","oj-js-comp-attr-deprecated":"3025","oj-js-comp-attr-deprecated_1":"3026","oj-js-comp-attr-deprecated_2":"3027","oj-js-ojcomp-new":"3060","oj-js-ojcomp-exist":"3070","oj-js-ojcomp-exist_1":"3071","oj-js-var-undef":"3080","oj-js-var-undef_1":"3082","oj-js-poly-promise":"3090","oj-js-noconsole":"3100","oj-js-no-ext-final":"3200","oj-ts-ojcomp-deprecated":"3400","oj-ts-comp-meth-deprecated":"3420","oj-ts-comp-meth-deprecated_1":"3422","oj-ts-comp-meth-deprecated_2":"3423","oj-ts-comp-attr-deprecated":"3425","oj-ts-comp-attr-deprecated_1":"3426","oj-ts-comp-attr-deprecated_2":"3427","oj-ts-ojcomp-new":"3440","oj-ts-ojcomp-exist":"3445","oj-ts-ojcomp-exist_1":"3450","oj-ts-poly-promise":"3455","oj-ts-noconsole":"3460","oj-ts-no-ext-final":"3465","oj-json-syntax":"4000","oj-cca-comp-json-file":"9000","oj-cca-comp-json-schema":"9005","oj-cca-comp-json-compdeps":"9010","oj-cca-comp-zip":"9015","oj-cca-comp-zip-type":"9020","oj-cca-comp-zip-content":"9025","oj-cca-comp-zip-content-case":"9030","oj-cca-compjson-bp-obj":"9040","oj-cca-compjson-bp-ar":"9043","oj-cca-compjson-ns-reg":"9046","oj-cca-compjson-ns-reg_1":"9047","oj-cca-compjson-bp-jetver":"9049","oj-cca-compjson-bp-dsplyname":"9052","oj-html-style":"5000","oj-html-style_1":"5001","oj-html-style-deprecated":"5010","oj-html-ojstyle":"5015","oj-html-style-bp-color":"5020","oj-html-style-bp-font":"5025","oj-html-style-bp-display":"5030","oj-html-self-close":"5035","oj-html-style-bp-font-family":"5040","oj-html-style-abs-units":"5045","oj-html-style-abs-units_1":"5046","oj-html-style-abs-units_2":"5047","oj-html-stylesel":"5080","oj-html-stylesel_1":"5081","oj-html-stylesel_2":"5082","oj-html-stylesel_3":"5083","oj-html-stylesel_4":"5084","oj-html-stylesel_5":"5085","oj-html-stylesel_6":"5086","oj-html-stylesel_7":"5087","oj-html-input-isodate":"5095","oj-html-input-isodate_1":"5096","oj-html-input-isodate_2":"5097","oj-html-input-isodate_3":"5098","oj-html-input-isodate_4":"5099","oj-html-input-isodate_5":"5100","oj-html-input-isodate_6":"5101","oj-html-input-isodate_7":"5102","oj-html-input-isodate_8":"5103","oj-html-input-isodate_9":"5104","oj-css-style-override_1":"6010","oj-css-style-override_2":"6011","oj-css-style-bp-color":"6015","oj-css-style-deprecated":"6020","oj-css-style-bp-font":"6025","oj-css-style-bp-display":"6030","oj-css-style-bp-font-family":"6035","oj-css-style-abs-units":"6040","oj-css-style-abs-units_1":"6041","oj-css-bp-float":"6045","oj-css-bp-float_1":"6046","oj-css-bp-textalign":"6050","oj-css-bp-textalign_1":"6051","oj-css-bp-border-color":"6060","oj-css-bp-border-color_1":"6061","oj-css-var-override":"6065","oj-css-var-override_1":"6066","oj-css-bp-dir-flow":"6070"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
const RULE_NAME="oj-acc-aria-prop";const ARIA="aria-";const
|
|
6
|
+
const RULE_NAME="oj-acc-aria-prop";const ARIA="aria-";const DESCRIPTION="Attributes beginning with <i>'aria-'</i> must be valid WAI-ARIA definitions.";const ARIA_LIST=["aria-atomic","aria-busy","aria-controls","aria-describedat","aria-describedby","aria-disabled","aria-dropeffect","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-autocomplete","aria-checked","aria-disabled","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-label","aria-level","aria-multiline","aria-multiselectable","aria-orientation","aria-pressed","aria-readonly","aria-required","aria-selected","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","aria-dropeffect","aria-grabbed","aria-activedescendant","aria-flowto","aria-posinset","aria-setsize"];function getName(){return RULE_NAME};function getShortDescription(){return"'aria' attribute must be a valid WAI-ARIA definition."};function getDescription(){return DESCRIPTION};function register(){return{"elem":_handle}};function _handle(ruleCtx){var attribs,attrib,attrPos,issue;attribs=ruleCtx.tagNode.attribs;if(attribs){for(attrib in attribs){if(attrib.startsWith(ARIA)&&!ARIA_LIST.includes(attrib)){issue=new ruleCtx.Issue("<"+ruleCtx.tagNode.name+"> '"+attrib+"' is not a valid WAI-ARIA definition");attrPos=ruleCtx.utils.DomUtils.getAttrPosition(ruleCtx.data,ruleCtx.node,attrib);issue.setPosition(attrPos.row,attrPos.col,attrPos.start,attrPos.end);ruleCtx.reporter.addIssue(issue,ruleCtx)}}}};module.exports={getName,getDescription,getShortDescription,register};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
const RULE_NAME="oj-acc-avatar-aria-role";const ROLE="role";const ARIA_LABEL="aria-label";const ARIA_LABELLEDBY="aria-labelledby";const DATABIND="data-bind";function getName(){return RULE_NAME};function getShortDescription(){return"<oj-avatar> must have an 'aria-label' or 'aria-labelledby' attribute if role=\"img\" has been specified"};function getDescription(){return"For accessibility, <oj-avatar> must have an <i>'aria-label'</i> or </i>'aria-labelledby'</i> attribute if <i>role='img'</i> has been specified"};function register(){return{"
|
|
6
|
+
const RULE_NAME="oj-acc-avatar-aria-role";const ROLE="role";const ARIA_LABEL="aria-label";const ARIA_LABELLEDBY="aria-labelledby";const DATABIND="data-bind";function getName(){return RULE_NAME};function getShortDescription(){return"<oj-avatar> must have an 'aria-label' or 'aria-labelledby' attribute if role=\"img\" has been specified"};function getDescription(){return"For accessibility, <oj-avatar> must have an <i>'aria-label'</i> or </i>'aria-labelledby'</i> attribute if <i>role='img'</i> has been specified"};function register(){return{"<oj-avatar>":_onTag}};function _onTag(ruleCtx){var attribs,attrib,hasLabel,attr,issue;var DomUtils=ruleCtx.utils.DomUtils;var attrPos;if(!DomUtils.hasAttrib(ruleCtx.node,ROLE)||DomUtils.getAttribValue(ruleCtx.node,ROLE)!=="img"){return}attribs=ruleCtx.node.attribs;if(_hasAttrib(attribs,DATABIND)){attrib=attribs["data-bind"];attr=DomUtils.extractAttribsFromDataBind(attrib);if(attr){hasLabel=attr[ARIA_LABEL]||attr[ARIA_LABELLEDBY]}}else{hasLabel=_hasAttrib(attribs,ARIA_LABEL)||_hasAttrib(attribs,ARIA_LABELLEDBY)}if(!hasLabel){issue=new ruleCtx.Issue("'role' attribute of 'img' specified on <oj-avatar>, but 'aria-label' or 'aria-labelledby' is missing");attrPos=DomUtils.getAttrPosition(ruleCtx.data,ruleCtx.node,"role");issue.setPosition(attrPos.row,attrPos.col,attrPos.start,attrPos.end);ruleCtx.reporter.addIssue(issue,ruleCtx)}};function _hasAttrib(attribs,attrName){var attrib,ret=false;for(attrib in attribs){attrib=attrib.charAt(0)===":"?attrib.substr(1):attrib;if(attrib===attrName){ret=true;break}}return ret};module.exports={getName,getDescription,getShortDescription,register};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
const helper=require("./helpers/acc-aria-label");const RULE_NAME="oj-acc-combobox-aria-label";const DESCRIPTION="For accessibility, a combobox element must have a matching <oj-label> with a <i>'for'</i> matching the input <i>'id'</i>"+", or an <i>aria-label</i> attribute.<p>If 'label-hint' is specified and 'label-edge' is not, the default "+"value for 'label-edge' is theme dependant (refer to configuration property 'theme'), and label generation may be affected.<p>"+"Set 'label-hint' or associate an 'oj-label'. If there is no visible label, then to make this accessible to screen readers, set "+"'label-hint' and label-edge='none' - this will render an 'aria-label' with the 'label-hint' text.";const SHORT_DESCRIPTION="For accessibility, a combobox element must have a matching <oj-label> with a 'for' matching the combobox 'id'";class Rule{getName(){return RULE_NAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(regCtx){this._theme=regCtx.config.theme;return{"
|
|
6
|
+
const helper=require("./helpers/acc-aria-label");const RULE_NAME="oj-acc-combobox-aria-label";const DESCRIPTION="For accessibility, a combobox element must have a matching <oj-label> with a <i>'for'</i> matching the input <i>'id'</i>"+", or an <i>aria-label</i> attribute.<p>If 'label-hint' is specified and 'label-edge' is not, the default "+"value for 'label-edge' is theme dependant (refer to configuration property 'theme'), and label generation may be affected.<p>"+"Set 'label-hint' or associate an 'oj-label'. If there is no visible label, then to make this accessible to screen readers, set "+"'label-hint' and label-edge='none' - this will render an 'aria-label' with the 'label-hint' text.";const SHORT_DESCRIPTION="For accessibility, a combobox element must have a matching <oj-label> with a 'for' matching the combobox 'id'";class Rule{getName(){return RULE_NAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(regCtx){this._theme=regCtx.config.theme;return{"<oj-combobox-many>":this._onCombo,"<oj-combobox-one>":this._onCombo}}_onCombo(ruleCtx,tagName){var issues;if(issues=helper(ruleCtx,tagName,this._theme)){issues.forEach(issue=>{ruleCtx.reporter.addIssue(issue,ruleCtx)})}}}module.exports=Rule;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
const RULE_NAME="oj-acc-film-strip-aria-label";function getName(){return RULE_NAME};function getShortDescription(){return"<oj-film-strip> must have an 'aria-label' or an 'aria-labelledby' attribute"};function getDescription(){return"For accessibility, <oj-film-strip> must have an <i>'aria-label'</i> or an 'aria-labelledby'</i> attribute."};function register(){return{"
|
|
6
|
+
const RULE_NAME="oj-acc-film-strip-aria-label";function getName(){return RULE_NAME};function getShortDescription(){return"<oj-film-strip> must have an 'aria-label' or an 'aria-labelledby' attribute"};function getDescription(){return"For accessibility, <oj-film-strip> must have an <i>'aria-label'</i> or an 'aria-labelledby'</i> attribute."};function register(){return{"<oj-film-strip>":_onTag}};function _onTag(ruleCtx){var attribs,attrib,attrib2,haveAriaLabel,dataBind,issue;if(!(attribs=ruleCtx.node.attribs)){return}for(attrib in attribs){attrib2=attrib.charAt(0)===":"?attrib.substr(1):attrib;if(attrib2==="aria-label"||attrib2==="aria-labelledby"){haveAriaLabel=true;break}else if(attrib2==="data-bind"){dataBind=attrib2}}if(!haveAriaLabel&&dataBind){dataBind=ruleCtx.utils.DomUtils.getAttribValue(ruleCtx.node,dataBind);haveAriaLabel=_inspectDataBind(dataBind)}if(!haveAriaLabel){issue=new ruleCtx.Issue("'aria-label' or 'aria-labelledby' missing on <oj-film-strip>");ruleCtx.reporter.addIssue(issue,ruleCtx)}};function _inspectDataBind(attr){var ret=false,i;attr=attr?attr.trim().toLowerCase():null;if(!attr||!attr.length){return ret}i=attr.indexOf("attr");if(i<0){return ret}attr=attr.substr(i+4).trim();if(attr.length){if(attr.charAt(0)===":"){attr=attr.substr(1).trim();if(attr.charAt(0)==="{"){attr=attr.substr(1).trim().split(":");if(attr.length>1){attr[0]=attr[0].trim();ret=attr[0].indexOf("aria-label")>=0||attr[0].indexOf("aria-labelledby")>=0}}}}return ret};module.exports={getName,getDescription,getShortDescription,register};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
const helper=require("./helpers/acc-aria-label");const RULE_NAME="oj-acc-input-aria-label";const DESCRIPTION="For accessibility, an input element must have a matching <oj-label> with a <i>'for'</i> matching the input <i>'id'</i>"+", or an <i>aria-label</i> attribute.<br>If 'label-hint' is specified and 'label-edge' is not, the default "+"value for 'label-edge' is theme dependant (refer to configuration property 'theme'), and label generation may be affected.<br>"+"Set 'label-hint' or associate an 'oj-label'. If there is no visible label, then to make this accessible to screen readers, set "+"'label-hint' and label-edge='none' - this will render an 'aria-label' with the 'label-hint' text.";const SHORT_DESCRIPTION="For accessibility, an input element must have a matching <oj-label> with a 'for' matching the input 'id'";class Rule{getName(){return RULE_NAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(regCtx){this._theme=regCtx.config.theme;return{"
|
|
6
|
+
const helper=require("./helpers/acc-aria-label");const RULE_NAME="oj-acc-input-aria-label";const DESCRIPTION="For accessibility, an input element must have a matching <oj-label> with a <i>'for'</i> matching the input <i>'id'</i>"+", or an <i>aria-label</i> attribute.<br>If 'label-hint' is specified and 'label-edge' is not, the default "+"value for 'label-edge' is theme dependant (refer to configuration property 'theme'), and label generation may be affected.<br>"+"Set 'label-hint' or associate an 'oj-label'. If there is no visible label, then to make this accessible to screen readers, set "+"'label-hint' and label-edge='none' - this will render an 'aria-label' with the 'label-hint' text.";const SHORT_DESCRIPTION="For accessibility, an input element must have a matching <oj-label> with a 'for' matching the input 'id'";class Rule{getName(){return RULE_NAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(regCtx){this._theme=regCtx.config.theme;return{"<oj-input-date>":this._onInput,"<oj-input-date-time>":this._onInput,"<oj-input-number>":this._onInput,"<oj-input-password>":this._onInput,"<oj-input-search>":this._onInput,"<oj-input-text>":this._onInput,"<oj-input-time>":this._onInput}}_onInput(ruleCtx,tagName){var issues;if(ruleCtx.utils.DomUtils.isChildOfElem("oj-table",ruleCtx.node)||ruleCtx.utils.DomUtils.isChildOfElem("oj-data-grid",ruleCtx.node)){return}if(issues=helper(ruleCtx,tagName,this._theme)){issues.forEach(issue=>{ruleCtx.reporter.addIssue(issue,ruleCtx)})}}}module.exports=Rule;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2018,
|
|
2
|
+
* Copyright (c) 2018, 2022, Oracle and/or its affiliates.
|
|
3
3
|
* Licensed under The Universal Permissive License (UPL), Version 1.0
|
|
4
4
|
* as shown at https://oss.oracle.com/licenses/upl/
|
|
5
5
|
*/
|
|
6
|
-
const helper=require("./helpers/acc-aria-label");const RULE_NAME="oj-acc-select-aria-label";const DESCRIPTION="For accessibility, a select element must have a matching <oj-label> with a <i>'for'</i> matching the input <i>'id'</i>"+", or an <i>aria-label</i> attribute.<br>If 'label-hint' is specified and 'label-edge' is not, the default "+"value for 'label-edge' is theme dependant (refer to configuration property 'theme'), and label generation may be affected.<br>"+"Set 'label-hint' or associate an 'oj-label'. If there is no visible label, then to make this accessible to screen readers, set "+"'label-hint' and label-edge='none' - this will render an 'aria-label' with the 'label-hint' text.";const SHORT_DESCRIPTION="For accessibility, a select element must have a matching <oj-label> with a 'for' matching the select 'id'";class Rule{getName(){return RULE_NAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(regCtx){this._theme=regCtx.config.theme;return{"
|
|
6
|
+
const helper=require("./helpers/acc-aria-label");const RULE_NAME="oj-acc-select-aria-label";const DESCRIPTION="For accessibility, a select element must have a matching <oj-label> with a <i>'for'</i> matching the input <i>'id'</i>"+", or an <i>aria-label</i> attribute.<br>If 'label-hint' is specified and 'label-edge' is not, the default "+"value for 'label-edge' is theme dependant (refer to configuration property 'theme'), and label generation may be affected.<br>"+"Set 'label-hint' or associate an 'oj-label'. If there is no visible label, then to make this accessible to screen readers, set "+"'label-hint' and label-edge='none' - this will render an 'aria-label' with the 'label-hint' text.";const SHORT_DESCRIPTION="For accessibility, a select element must have a matching <oj-label> with a 'for' matching the select 'id'";class Rule{getName(){return RULE_NAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(regCtx){this._theme=regCtx.config.theme;return{"<oj-select-many>":this._onSelect,"<oj-select-single>":this._onSelect,"<oj-select-one>":this._onSelect}}_onSelect(ruleCtx,tagName){var issues;if(issues=helper(ruleCtx,tagName,this._theme)){issues.forEach(issue=>{ruleCtx.reporter.addIssue(issue,ruleCtx)})}}}module.exports=Rule;
|