Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/j9t/obsohtml
Detection of obsolete and proprietary HTML elements and attributes
https://github.com/j9t/obsohtml
Last synced: about 1 month ago
JSON representation
Detection of obsolete and proprietary HTML elements and attributes
- Host: GitHub
- URL: https://github.com/j9t/obsohtml
- Owner: j9t
- License: cc-by-sa-4.0
- Created: 2024-08-11T09:23:10.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-08-15T11:07:35.000Z (about 1 month ago)
- Last Synced: 2024-08-15T12:45:26.109Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@j9t/obsohtml
- Size: 163 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ObsoHTML, the Obsolete HTML Checker
ObsoHTML is a Node.js script designed to scan HTML, PHP, JavaScript, and TypeScript files for obsolete or proprietary HTML attributes and elements (in scripts, it would catch JSX syntax). It helps you identify and update deprecated HTML code to be more sure to use web standards.
## Usage
### 1. As a Node Module
#### Installation
```console
npm i @j9t/obsohtml
```(To install ObsoHTML globally, use the `-g` flag, as in `npm i -g @j9t/obsohtml`.)
#### Execution
The script accepts a folder path as a command line option, which can be specified in both short form (`-f`) and long form (`--folder`). The folder path can be either absolute or relative.
##### Example Commands
Use the default directory (user home directory):
```console
npx obsohtml
```Specify a folder using an absolute path (easiest and most common use case):
```console
npx obsohtml -f /path/to/folder
```Specify a folder using a relative path:
```console
npx obsohtml -f ../path/to/folder
```### 2. As a Standalone Script
#### Installation
Download or fork [the source repository](https://github.com/j9t/obsohtml).
#### Execution
The script accepts a folder path as a command line option, which can be specified in both short form (`-f`) and long form (`--folder`). The folder path can be either absolute or relative.
##### Example Commands
(All commands as run from the root directory of the downloaded repository.)
Use the default directory (user home directory):
```console
node bin/obsohtml.js
```Specify a folder using an absolute path (easiest and most common use case):
```console
node bin/obsohtml.js -f /path/to/folder
```Specify a folder using a relative path:
```console
node bin/obsohtml.js -f ../path/to/folder
```## Output
The script will output messages to the console indicating any obsolete attributes or elements found in the scanned files, along with the file paths where they were detected.
## Background
This started as an experiment, in which I used AI to produce this little HTML quality helper, its tests, and its documentation. While it’s pretty straightforward, I might have missed something. Please [file an issue](https://github.com/j9t/obsohtml/issues) or contact me directly if you spot a problem or have a suggestion.