chore(lint): add lint command (#5106)

fix/EE-1152/importing-images
Chaim Lev-Ari 3 years ago committed by GitHub
parent f9ffb1a712
commit bd47bb8cdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,4 @@
{
"go.lintTool": "golangci-lint",
"go.lintFlags": ["--fast", "-E", "exportloopref"]
}

@ -34,7 +34,10 @@
"start:toolkit": "grunt start:toolkit", "start:toolkit": "grunt start:toolkit",
"build:server:offline": "cd ./api/cmd/portainer && CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags '-s' && mv -f portainer ../../../dist/portainer", "build:server:offline": "cd ./api/cmd/portainer && CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags '-s' && mv -f portainer ../../../dist/portainer",
"clean:all": "grunt clean:all", "clean:all": "grunt clean:all",
"format": "prettier --loglevel warn --write \"**/*.{js,css,html}\"" "format": "prettier --loglevel warn --write \"**/*.{js,css,html}\"",
"lint": "yarn lint:client; yarn lint:server",
"lint:server": "cd api && golangci-lint run -E exportloopref",
"lint:client": "eslint --cache --fix ."
}, },
"scriptsComments": { "scriptsComments": {
"build": "Build the entire app (backend/frontend) in development mode", "build": "Build the entire app (backend/frontend) in development mode",
@ -171,4 +174,4 @@
"*.js": "eslint --cache --fix", "*.js": "eslint --cache --fix",
"*.{js,css,md,html}": "prettier --write" "*.{js,css,md,html}": "prettier --write"
} }
} }
Loading…
Cancel
Save