Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add update-resources script #2171

Merged
merged 8 commits into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/check-for-resources-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check for utils resources update
on:
workflow_dispatch: null
schedule:
- cron: 0 0 * * 0 # At 00:00 on Sunday, see https://crontab.guru/#0_0_*_*_0

permissions:
contents: write
pull-requests: write

jobs:
check-for-resources-update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Packages
run: npm install
- name: Update
run: npm run update-resources
- uses: peter-evans/create-pull-request@v7
with:
commit-message: Updates resources with latest
branch: update-unicode-alias
branch-suffix: timestamp
title: Updates resources with latest
ota-meshi marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 3 additions & 5 deletions lib/utils/deprecated-html-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@
"big",
"blink",
"center",
"command",
"content",
"dir",
"element",
"font",
"frame",
"frameset",
"image",
"isindex",
"keygen",
"listing",
Expand All @@ -24,8 +20,10 @@
"nobr",
"noembed",
"noframes",
"param",
"plaintext",
"shadow",
"rb",
"rtc",
"spacer",
"strike",
"tt",
Expand Down
164 changes: 80 additions & 84 deletions lib/utils/html-elements.json
Original file line number Diff line number Diff line change
@@ -1,120 +1,116 @@
[
"html",
"body",
"base",
"head",
"link",
"meta",
"style",
"title",
"a",
"abbr",
"address",
"area",
"article",
"aside",
"audio",
"b",
"base",
"bdi",
"bdo",
"blockquote",
"body",
"br",
"button",
"canvas",
"caption",
"cite",
"code",
"col",
"colgroup",
"data",
"datalist",
"dd",
"del",
"details",
"dfn",
"dialog",
"div",
"dl",
"dt",
"em",
"embed",
"fencedframe",
"fieldset",
"figcaption",
"figure",
"footer",
"header",
"form",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"head",
"header",
"hgroup",
"nav",
"section",
"div",
"dd",
"dl",
"dt",
"figcaption",
"figure",
"hr",
"html",
"i",
"iframe",
"img",
"input",
"ins",
"kbd",
"label",
"legend",
"li",
"link",
"main",
"map",
"mark",
"menu",
"meta",
"meter",
"nav",
"noscript",
"object",
"ol",
"optgroup",
"option",
"output",
"p",
"picture",
"portal",
"pre",
"ul",
"a",
"b",
"abbr",
"bdi",
"bdo",
"br",
"cite",
"code",
"data",
"dfn",
"em",
"i",
"kbd",
"mark",
"progress",
"q",
"rp",
"rt",
"rtc",
"ruby",
"s",
"samp",
"script",
"search",
"section",
"select",
"slot",
"small",
"source",
"span",
"strong",
"style",
"sub",
"summary",
"sup",
"time",
"u",
"var",
"wbr",
"area",
"audio",
"map",
"track",
"video",
"embed",
"object",
"param",
"source",
"canvas",
"script",
"noscript",
"del",
"ins",
"caption",
"col",
"colgroup",
"table",
"thead",
"tbody",
"tfoot",
"td",
"template",
"textarea",
"tfoot",
"th",
"thead",
"time",
"title",
"tr",
"button",
"datalist",
"fieldset",
"form",
"input",
"label",
"legend",
"meter",
"optgroup",
"option",
"output",
"progress",
"select",
"textarea",
"details",
"dialog",
"menu",
"menuitem",
"summary",
"content",
"element",
"shadow",
"template",
"slot",
"blockquote",
"iframe",
"noframes",
"picture"
"track",
"u",
"ul",
"var",
"video",
"wbr"
]
6 changes: 0 additions & 6 deletions lib/utils/svg-elements.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
"animate",
"animateMotion",
"animateTransform",
"audio",
"canvas",
"circle",
"clipPath",
"defs",
"desc",
"discard",
"ellipse",
"feBlend",
"feColorMatrix",
Expand Down Expand Up @@ -39,7 +36,6 @@
"filter",
"foreignObject",
"g",
"iframe",
"image",
"line",
"linearGradient",
Expand All @@ -64,8 +60,6 @@
"textPath",
"title",
"tspan",
"unknown",
"use",
"video",
"view"
]
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"preversion": "npm test && git add .",
"version": "env-cmd -e version npm run update && npm run lint -- --fix && git add .",
"update": "node ./tools/update.js",
"update-resources": "node ./tools/update-resources.js",
"docs:watch": "vitepress dev docs",
"predocs:build": "npm run update",
"docs:build": "vitepress build docs"
Expand Down Expand Up @@ -90,6 +91,7 @@
"eslint-plugin-vue": "file:.",
"espree": "^9.6.1",
"events": "^3.3.0",
"jsdom": "^22.0.0",
"markdownlint-cli": "^0.42.0",
"mocha": "^10.7.3",
"nyc": "^17.1.0",
Expand Down
12 changes: 0 additions & 12 deletions tests/lib/rules/no-reserved-component-names.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,6 @@ const invalidElements = [
'menuitem',
'summary',
'Summary',
'content',
'Content',
'element',
'Element',
'shadow',
'Shadow',
'template',
'Template',
'slot',
Expand All @@ -278,8 +272,6 @@ const invalidElements = [
'Defs',
'desc',
'Desc',
'discard',
'Discard',
'ellipse',
'Ellipse',
'feBlend',
Expand Down Expand Up @@ -351,8 +343,6 @@ const invalidElements = [
'textPath',
'tspan',
'Tspan',
'unknown',
'Unknown',
'use',
'Use',
'view',
Expand All @@ -373,8 +363,6 @@ const invalidElements = [
'Blink',
'center',
'Center',
'command',
'Command',
FloEdelmann marked this conversation as resolved.
Show resolved Hide resolved
'dir',
'Dir',
'font',
Expand Down
6 changes: 6 additions & 0 deletions tools/lib/http.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
httpGet
}
function httpGet(url) {
return fetch(url).then((res) => res.text())
}
Loading