eslint-plugin-bsd
v1.0.0
Published
ESLint plugin to ensure your code is Kosher and follows the Halacha
Maintainers
Readme
eslint-plugin-bsd
Ensures your code is Kosher and follows the Halacha
Installation
npm install eslint-plugin-bsd --save-devUsage
Add basad to the plugins section of your ESLint configuration file.
// eslint.config.js
import basad from "eslint-plugin-bsd";
export default [
{
files: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx"],
plugins: {
basad,
},
rules: {
"bsd/basad": "error",
},
},
];Or use the recommended configuration:
// eslint.config.js
import basad from "eslint-plugin-bsd";
export default [
{
files: ["**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx"],
...basad.configs.recommended,
},
];Rules
bsd/basad
Ensures that the first line of the file is a comment starting with // בס"ד.
This rule requires files to begin with the comment // בס"ד (Besiyata Dishmaya - "with the help of heaven").
This rule is fixable. When you use the quick fix option or run ESLint with --fix, it will automatically add // בס"ד at the top of your file.
Examples
Valid:
// בס"ד
const x = 1;// בס"ד
function test() {}Invalid:
const x = 1;// This is a regular comment
const x = 1;When using ESLint with --fix or via editor quick fix, these invalid cases will automatically be fixed to include // בס"ד at the top.
License
Unlicense
