Update checked-in dependencies
This commit is contained in:
parent
2bb35eab2f
commit
200dd0cf5b
88 changed files with 1039 additions and 527 deletions
13
node_modules/eslint-plugin-github/lib/utils/get-element-type.js
generated
vendored
13
node_modules/eslint-plugin-github/lib/utils/get-element-type.js
generated
vendored
|
|
@ -16,15 +16,22 @@ function getElementType(context, node, lazyElementCheck = false) {
|
|||
|
||||
// check if the node contains a polymorphic prop
|
||||
const polymorphicPropName = settings?.github?.polymorphicPropName ?? 'as'
|
||||
|
||||
const prop = getProp(node.attributes, polymorphicPropName)
|
||||
const literalPropValue = getLiteralPropValue(getProp(node.attributes, polymorphicPropName))
|
||||
let checkConditionalMap = true
|
||||
|
||||
// If the prop is not a literal and we cannot determine it, don't fall back to the conditional map value, if it exists
|
||||
if (prop && !literalPropValue) {
|
||||
checkConditionalMap = false
|
||||
}
|
||||
const rawElement = getLiteralPropValue(getProp(node.attributes, polymorphicPropName)) ?? elementType(node)
|
||||
|
||||
// if a component configuration does not exists, return the raw element
|
||||
if (!settings?.github?.components?.[rawElement]) return rawElement
|
||||
|
||||
const defaultComponent = settings.github.components[rawElement]
|
||||
|
||||
// check if the default component is also defined in the configuration
|
||||
return defaultComponent ? defaultComponent : defaultComponent
|
||||
return checkConditionalMap ? settings.github.components[rawElement] : rawElement
|
||||
}
|
||||
|
||||
module.exports = {getElementType}
|
||||
|
|
|
|||
6
node_modules/eslint-plugin-github/package.json
generated
vendored
6
node_modules/eslint-plugin-github/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "eslint-plugin-github",
|
||||
"version": "4.10.2",
|
||||
"version": "5.0.0",
|
||||
"description": "An opinionated collection of ESLint shared configs and rules used by GitHub.",
|
||||
"main": "lib/index.js",
|
||||
"entries": [
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"lint:eslint-docs": "npm run update:eslint-docs -- --check",
|
||||
"lint:js": "eslint .",
|
||||
"pretest": "mkdir -p node_modules/ && ln -fs $(pwd) node_modules/",
|
||||
"test": "npm run eslint-check && npm run lint && mocha tests/**/*.js tests/",
|
||||
"test": "npm run eslint-check && npm run lint && mocha tests/**/*.js tests/**/*.mjs",
|
||||
"update:eslint-docs": "eslint-doc-generator"
|
||||
},
|
||||
"repository": {
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
"chai": "^5.0.0",
|
||||
"eslint": "^8.0.1",
|
||||
"eslint-doc-generator": "^1.4.3",
|
||||
"eslint-plugin-eslint-plugin": "^5.0.0",
|
||||
"eslint-plugin-eslint-plugin": "^6.1.0",
|
||||
"mocha": "^10.0.0",
|
||||
"npm-run-all": "^4.1.5"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue