- JavaScript 82%
- TypeScript 18%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .woodpecker | ||
| src | ||
| test | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .yarnrc.yml | ||
| cspell.yml | ||
| eslint.config.mjs | ||
| LICENSE | ||
| NOTICE | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| yarn.lock | ||
Pixel Art Lint
Enforce rules in pixel art files.
Lint (Software)
Lint is the computer science term for a static code analysis tool used to flag programming errors, bugs, stylistic errors and suspicious constructs.
Installation
You must have the following software, install them if you don't:
Then, run the following commands in your terminal in a directory you're happy to clone the project to:
# Enable corepack, a package manager for package managers.
corepack enable
# Clone the project to your local machine.
git clone https://git.falco.fun/teaparty.diy/pixel-art-lint.git
cd pixel-art-lint
# Install project dependencies.
yarn install
# Install the project globally on your computer.
npm i -g .
You can check if the program was installed successfully with:
pixel-art-lint --help
Usage
This application only supports pixel art images in a 1:1 scale, where each pixel represents a single pixel. If you have pixel art that is scaled up, for example where 4 (2x2) or 16 (4x4) pixels represent a single pixel, you must downscale the image using the nearest neighbor algorithm first.
Once you're ready, run the following command:
pixel-art-lint path/to/pixel-art.png
If it prints nothing, then it passed. 🎉
If it prints an error message, it will include a path to the file that highlights where in the image errors were found. 🥺
Rules
| Name | Description | Example | Possible Fix |
|---|---|---|---|
| Require Staircases | When the same color is used to the top-left, top-right, bottom-left, or bottom-right of the cell, then a corresponding adjacent pixel that would connect the two must be assigned that color to create a staircase. | 🟥🟦🟦 🟦🟥🟦 🟦🟦🟥 |
🟥🟦🟦 🟥🟥🟦 🟦🟥🟥 |