Skip to content
Demonstrates the integration of various static analysis tools
TypeScript JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
src
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.huskyrc
.npmrc
.nvmrc
.prettierignore
.prettierrc
README.md
audit-ci.json
docker-compose.sonar.yml
jest.config.js
package.json
sonar-project.js
sonar-project.properties
tsconfig.json
yarn.lock

README.md

TypeScript Static Analysis Demo

This boilerplate demonstrates how to configure static source code analysis for a TypeScript project.

This repository demonstrates the static analysis approaches described in this post.

Supported commands:

# Runs jest tests
npm test

# Compiles the code
npm run build

# Runs ESLint analysis
npm run lint

# Automatically fixes ESLint violations
npm run lint-fix

# Checks for known dependency vulnerabilities
npm run audit-dependencies

# Start local SonarQube (requires docker)
# need to wait 1-2mins to start
# Visit http://localhost:9000. Use admin/admin to login
npm rum start-local-sonarqube

# Stops the local SonarQube
npm rum sop-local-sonarqube

# Run SonarQube analysis on a local instance (must be started)
npm run sonar

# Run analysis on a remote SonarQube
SONAR_SERVER="..." SONAR_TOKEN="..." npm run sonar
You can’t perform that action at this time.