Open GezzMC opened 6 years ago
Is this an issue with the utilities
module? Might be worth updating utilities
to work better with strict mode.
Thanks for the reply.
I suppose utilities
is one of the culprits that prevents the use of --use_strict
, but I don't do global installs of modules, or tweak the default downloads of dependencies. I let different packages download whatever packages they specify.
My general mode of operation is to figure out how to use a package as is without doing any mods, such as fixing dependencies. There could be other packages that also don't work with --use_strict
.
How it is is okay with me.
This is only a problem if you want it to be. Instead of
--use_strict
, I put"use strict";
in my jakefiles.I explain what I'm doing, so you know some of what people are doing with Jake.
I'm using
flow check
to check my typing in Jakefiles, so that's how this comes about. Instead of running jakefiles with your.bin/jake.cmd
, I use a command like this:Since I'm running things direct, I go ahead and try:
Errors start to crop up do to the
utilities
package. I started to hunt them down and make changes, but one problem is that there's more than onenode_modules/utilities
folder. So, I quit trying to fix things that way.With
flow check
, it wants to resolve the use of functionsdesc
andtask
in a Jakefile, so I import, likeconst jake = require("jake")
, and then usejake.desc
andjake.task
.That makes
flow
happy, but I still end up having to make exceptions for Jake, rather than run it like a normal Node module.For example, I have a simple JS file that imports 20 or so modules, to test that they're in the right path. In that file, I can't do a
const jake = require("jake")
because my general node command isnode --use_strict
.There's not a problem. But I have big plans for Jake, to do a lot of JavaScript in a Jake file, thus the reason for using Flow with Jake.
Thanks.