* Re-export ActionFunc types from mattermost-redux from types/store * Start using ActionFunc types from types/store instead of mattermost-redux These are all the places where the type checker failed when I added the web app version of ActionFunc. I'll move all the other files in a separate commit. * Use ActionFunc types from types/store everywhere outside mattermost-redux * Make types/store versions of ActionFunc use web app GlobalState * Stop passing GlobalState into ActionFunc explicitly * Stop casting as GlobalState where it's no longer needed * Prevent importing mattermost-redux version of ActionFunc in the rest of the app * Fix no-restricted-imports applying incorrectly to mattermost-redux and types/store
63 строки
1.3 KiB
JSON
63 строки
1.3 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"
|
|
}]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|