@obamafoundation/eslint-plugin-of-svelte v1.0.18
eslint-plugin-of-svelte
ObamaFoundation ESLint Plugin
Installation
Make sure you've already installed ESLint in the project where you intend to use this linter.
npm i eslint --save-devNext, install @obamafoundation/eslint-plugin-of-svelte:
npm install @obamafoundation/eslint-plugin-of-svelte --save-devUsage
Add @obamafoundation/eslint-plugin-of-svelte to the plugins section of your .eslintrc configuration file:
{
"plugins": [
"@obamafoundation/of-svelte",
]
}Then configure the rules you want to use under the rules section. You must use the "@obamafoundation/of-svelte" prefix for your rule.
{
"rules": {
"@obamafoundation/of-svelte/no-placeholder-values": "error",
}
}Rules
The writing of rules relies heavily on the AST specification outlined by ESLint. For details on the Svelte AST implementation, you can visit the svelte AST guide for svelte-eslint-parser.
| Name | Description |
|---|---|
| no-placeholder-values | Do not apply placeholder values to inputs. |
Releasing to npm
Prior to merging with the main branch, first increment version in the PR branch:
npm version <version number>Then push to create new Github tag:
git push --follow-tagsThe workflow to push to npm will only run when merged to the main branch