plugin for public-frontend
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-path-checker
:
npm install eslint-path-checker --save-dev
Add eslint-path-checker
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"eslint-path-checker"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"eslint-path-checker/path-checker": ["error", { "alias": "@" }],
"eslint-path-checker/public-api-import": [
"error",
{
"alias": "@",
"testFiles": ["**/*.test.*", "**/*.story.*", "**/StoreDecorator.tsx"]
}
],
"eslint-path-checker/layer-imports": [
"error",
{
"alias": "@",
"ignoreImportPatterns": ["**/StoreProvider", "**/testing"]
}
]
}
}
TODO: Run eslint-doc-generator to generate the rules list.