mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-09-11 15:26:19 +03:00
Reviewed remaining hlint rules.
This commit is contained in:
parent
89c9d6a1db
commit
ff2543b42f
@ -6,11 +6,8 @@
|
|||||||
- -XQuasiQuotes
|
- -XQuasiQuotes
|
||||||
- -XScopedTypeVariables
|
- -XScopedTypeVariables
|
||||||
|
|
||||||
# TODO: Review the remaining ignored hlint rules.
|
- ignore: {name: Use camelCase} # We can decide this on our own.
|
||||||
- ignore: {name: Use camelCase}
|
- ignore: {name: Eta reduce} # We can decide this on our own.
|
||||||
- ignore: {name: Eta reduce}
|
- ignore: {name: Use newtype instead of data} # We can decide this on our own.
|
||||||
- ignore: {name: Use first}
|
- ignore: {name: Use $>} # I find it makes code harder to read if enforced.
|
||||||
- ignore: {name: Use second}
|
- ignore: {name: Use list comprehension} # We can decide this on our own.
|
||||||
- ignore: {name: Use newtype instead of data}
|
|
||||||
- ignore: {name: Use $>}
|
|
||||||
- ignore: {name: Use list comprehension}
|
|
||||||
|
@ -5,6 +5,7 @@ module Wasp.Generator.PackageJsonGenerator
|
|||||||
)
|
)
|
||||||
where
|
where
|
||||||
|
|
||||||
|
import Data.Bifunctor (second)
|
||||||
import Data.List (find, intercalate)
|
import Data.List (find, intercalate)
|
||||||
import Data.Maybe (fromJust, isJust)
|
import Data.Maybe (fromJust, isJust)
|
||||||
import qualified Wasp.NpmDependency as ND
|
import qualified Wasp.NpmDependency as ND
|
||||||
@ -31,7 +32,7 @@ resolveNpmDeps waspDeps userDeps =
|
|||||||
where
|
where
|
||||||
conflictingUserDeps :: [(ND.NpmDependency, NpmDependenciesConflictError)]
|
conflictingUserDeps :: [(ND.NpmDependency, NpmDependenciesConflictError)]
|
||||||
conflictingUserDeps =
|
conflictingUserDeps =
|
||||||
map (\(dep, err) -> (dep, fromJust err)) $
|
map (second fromJust) $
|
||||||
filter (isJust . snd) $
|
filter (isJust . snd) $
|
||||||
map (\dep -> (dep, checkIfConflictingUserDep dep)) userDeps
|
map (\dep -> (dep, checkIfConflictingUserDep dep)) userDeps
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ where
|
|||||||
|
|
||||||
import Control.Monad.State
|
import Control.Monad.State
|
||||||
import qualified Data.Aeson as Aeson
|
import qualified Data.Aeson as Aeson
|
||||||
|
import Data.Bifunctor (first)
|
||||||
import Data.Text (Text, pack)
|
import Data.Text (Text, pack)
|
||||||
import Fixtures (systemSPRoot)
|
import Fixtures (systemSPRoot)
|
||||||
import StrongPath (Abs, Dir, File', Path', Rel, reldir, (</>))
|
import StrongPath (Abs, Dir, File', Path', Rel, reldir, (</>))
|
||||||
@ -71,7 +72,7 @@ instance MonadIO MockWriteableMonad where
|
|||||||
liftIO = undefined
|
liftIO = undefined
|
||||||
|
|
||||||
modifyLogs :: MonadState (a, b) m => (a -> a) -> m ()
|
modifyLogs :: MonadState (a, b) m => (a -> a) -> m ()
|
||||||
modifyLogs f = modify (\(logs, config) -> (f logs, config))
|
modifyLogs f = modify (first f)
|
||||||
|
|
||||||
newtype MockWriteableMonad a = MockWriteableMonad
|
newtype MockWriteableMonad a = MockWriteableMonad
|
||||||
{ unMockWriteableMonad :: State (MockWriteableMonadLogs, MockWriteableMonadConfig) a
|
{ unMockWriteableMonad :: State (MockWriteableMonadLogs, MockWriteableMonadConfig) a
|
||||||
|
Loading…
Reference in New Issue
Block a user