const ComponentName: FC = () => {
return (
<div>
<p>$0</p>
</div>
);
};
bats (Batch Automated Testing System) is a testing framework for Bash scripts. If you're like me, you like to have a pre-commit or pre-push hook in place that runs your program's tests and prevents you from doing dumb things like pushing failing code. I found a pre-commit python framework named pre-commit, which allows you to manage and import git hooks from various repos across multiple languages. However, I did not see any examples involving bash and bats.
After searching online for a bit and getting some help using Phind, I came up with the following config that will run bats on pre-commit and pre-merge-commit. It assumes you have a similar project folder structure to the bats tutorial.
project/
.git/
.pre-commit-config.yaml
vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct | |
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | |
if not vim.loop.fs_stat(lazypath) then | |
vim.fn.system({ | |
"git", | |
"clone", | |
"--filter=blob:none", | |
"https://github.com/folke/lazy.nvim.git", | |
"--branch=stable", -- latest stable release |
Note: WIP
- https://caniuse.com/ (28 March 2023)
- https://frontendchecklist.io (28 March 2023)
- https://moritzgiessmann.de/accessibility-cheatsheet (28 March 2023)
You may need to type more characters than shown initially, depending on the extensions you have installed, but VS Code will learn which commands you use most frequently and show those first.
- rewind = Reload Window
- kat = Kill All Terminals
- new = Create New File
- maxp = Toggle Maximized Panel
- Very useful when there is a lot of terminal output to read through
- With this command and other toggle-type commands, it can be convenient to follow up with ctrl+shift+p (repeat last command)
- tone = (Todo Tree Extension) Todo Tree: Go To Next