Files
team/webapp/channels/.eslintrc.json

67 lines
1.5 KiB
JSON

{
"root": true,
"extends": [
"plugin:@mattermost/react"
],
"plugins": [
"formatjs",
"no-only-tests"
],
"settings": {
"import/resolver": "webpack"
},
"rules": {
"react/prop-types": [
2,
{
"ignore": [
"location",
"history",
"component"
]
}
],
"react/no-unknown-property": [
2,
{
"ignore": [
"mask-type"
]
}
],
"react/style-prop-object": [2, {
"allow": ["Timestamp"]
}],
"formatjs/no-multiple-whitespaces": 2,
"react/jsx-fragments": ["error", "syntax"]
},
"overrides": [
{
"files": ["*.test.*", "src/tests/**"],
"rules": {
"no-only-tests/no-only-tests": ["error", {"focus": ["only", "skip"]}]
}
},
{
"files": ["*"],
"excludedFiles": ["src/packages/mattermost-redux/**"],
"rules": {
"@typescript-eslint/no-restricted-imports": [
"error",
{
"paths": [{
"name": "mattermost-redux/types/actions",
"importNames": ["DispatchFunc", "GetStateFunc", "ActionFunc", "ActionFuncAsync", "ThunkActionFunc"],
"message": "Use the web app version of it from types/store"
}],
"patterns": [{
"group": ["@mattermost/client/src/*", "@mattermost/components/src/*", "@mattermost/types/src/*"],
"message": "Don't include the src folder when importing from packages in webapp/platform"
}]
}
]
}
}
]
}