Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ def runAuditReport() {
'''
}

// For now, only failing on errors. See eslint.config.js for the lint configuration.
def runLint() {
sh label: 'run-lint', script: '''
export PATH=${NODE_HOME_DIR}/bin:$PATH
cd node-client-api
npm ci
npm run lint -- --quiet
'''
}

def runE2ETests() {
sh label: 'run-e2e-tests', script: '''
export JAVA_HOME=$JAVA_HOME_DIR
Expand Down Expand Up @@ -123,6 +133,7 @@ pipeline {
agent { label 'nodeclientpool' }
steps {
runAuditReport()
runLint()
runDockerCompose('ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-12')
runTests()
runE2ETests()
Expand Down
6 changes: 3 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ module.exports = [
"semi": ["error", "always"],

// Modern best practices
"eqeqeq": "error",
"eqeqeq": "warn", // TODO: Fix == vs === issues in follow-up PR
"curly": ["error", "all"], // Require braces for all control structures
"no-unused-vars": "error",
"no-unused-vars": "warn", // TODO: Fix unused variables in follow-up PR
"no-undef": "error",

// ES6+ modernization - GO TIME! 🚀
"prefer-const": "error", // Use const for variables never reassigned
"no-var": "error", // Disallow var, use let/const instead
"no-var": "warn", // TODO: Fix remaining var declarations in follow-up PR

// Spacing rules (disabled for initial setup - TODO: Fix in separate PR)
"arrow-spacing": "off",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"main": "./lib/marklogic.js",
"scripts": {
"doc": "gulp doc",
"lint": "gulp lint",
"test:setup": "node etc/test-setup.js",
"test:teardown": "node etc/test-teardown.js",
"test": "gulp test"
Expand Down