Hello! I have a linting question. I'm using `sst` ...
# seed
g
Hello! I have a linting question. I'm using
sst
with
seed
, and noticed my lint isn't being run. The docs say this should run by default. I have a
.eslintrc.json
file and can run the lint manually with
yarn eslint src
. I have unit tests turned off on seed.run currently, is that required? Thanks!
f
Hey @Graham Tremper, do you have
linting
set to
false
in your
sst.json
?
Btw, which version of SST r u using?
g
No, no value for
linting
in my
sst.json
. I tried setting it to
true
explicitly with no affect as well.
Copy code
"@serverless-stack/cli": "0.69.0",
"@serverless-stack/resources": "0.69.0",
f
@Graham Tremper can you try running
sst build
locally and see if the linting is run?
g
yeah, not seeing linting in local build either. My "build" script is
yarn generate && sst build
where
yarn generate
is
prisma generate
. I get
eslint
"lint errors" when I run the lint manually with
yarn eslint src
.
f
Hey @Graham Tremper, yeah we took out linting and type checking as part of the
sst build
process.
@thdxr can confirm. The idea is that most linting and type errors should be caught inside the IDE these days. So running the checks are redundant and slows down the build.
Let me know if that makes sense.
g
Thanks for looking into this! Mainly just want to run on the build server, though I can just setup something to do that manually (github action or something)
f
U can actually do that right in SEED via a buildspec https://seed.run/docs/adding-a-build-spec.html#seedyml
U can run linting / type checking / jest inside the
before_deploy
step.
And if a command fails, the build fails.