Custom rules to validate aem-boilerplate-xwalk projects
You'll first need to install ESLint:
npm i eslint --save-devNext, install eslint-plugin-xwalk:
npm install eslint-plugin-xwalk --save-devAdd xwalk to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"xwalk"
]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"xwalk/max-cells": "error"
}
}Or extend the recommended configuration
{
"extend" [
"plugin:xwalk/recommended"
]
}| Name | |
|---|---|
| ✅ | recommended |
💼 Configurations enabled in.
✅ Set in the recommended configuration.
| Name | Description | 💼 |
|---|---|---|
| invalid-field-name | Restrict characters used in field names. | ✅ |
| max-cells | Limit the number of cells in a block. | ✅ |
| no-custom-resource-types | Do not use custom resource types. Serverside extensibility with customer resource types is not supported. | ✅ |
| no-duplicate-fields | Avoid duplicate field names. | ✅ |
| no-orphan-collapsible-fields | Do not use collapsible field name suffixes without the actual field being present in the model. | ✅ |