An eslint plugin with rules to enforces proper usage of contracts.
This package is part of the Swarmion project. See its documentation for more insights.
pnpm add --save-dev @swarmion/eslint-plugin
or if using yarn
yarn add --dev @swarmion/eslint-plugin
or if using npm
npm install --save-dev @swarmion/eslint-plugin
Add @swarmion
to the plugins section of your .eslintrc
configuration file, then configure the rules you want to use under the rules section.
{
"plugins": ["@swarmion"],
"rules": {
"@swarmion/rule-name": "error"
}
}
You can also enable all the recommended rules for our plugin. Add plugin:@swarmion/recommended
in extends:
{
"extends": ["plugin:@swarmion/recommended"]
}
Key: ✅ = recommended, 🔧 = fixable
Name | Description | ✅ | 🔧 |
---|---|---|---|
@swarmion/no-undeclared-contracts |
Require that used contracts are defined in the serverless service file | ✅ |