ReactXP specific linting rules for ESLint
$ npm i eslint-plugin-reactxp @typescript-eslint/parser --save-dev
Add reactxp
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"parser": "@typescript-eslint/parser",
"plugins": ["reactxp"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"reactxp/no-unreferenced-styles": "error",
"reactxp/incorrect-this-props": "error"
}
}
{
"extends": "plugin:reactxp/recommended"
}
Name | Description |
---|---|
no-unreferenced-styles |
Disallow unused styles |
incorrect-this-props |
Disallow use this.props in methods with the props argument |
This software is released under the terms of the MIT license.