Socket
Socket
Sign inDemoInstall

@sap/di.code-validation.js

Package Overview
Dependencies
109
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @sap/di.code-validation.js

A javascript code validator for DI based on eslint, implements di.code-validation.core API.


Version published
Weekly downloads
24K
decreased by-30.51%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

di.code-validation.js

A javascript code validator for DI based on eslint, implements di.code-validation.core API.

Install

npm install di.code-validation.js --save-dev

Migrating to v2.0.0

We have made breaking changes to this release as a result of the migration to eslint v8.x.x. Some of the public APIs now provide asynchronous behavior - please review the usage example to refine your code.

Usage

const jsvalidator = require("di.code-validation.js");
const ValidationMetadata = require("di.code-validation.core").validationMetadata;
const FileResource = require("di.code-validation.core").fileResource;

const validationMetadata = new ValidationMetadata(<proLocation>);
const fileResources = [];
const fileResource = new FileResource(<full project path>, <full file path>);
fileResources.push(fileResource);
const result = await jsvalidator.validateFiles(validationMetadata, fileResources);

result structure

{
    "category" : <category for the rule>,
    "checker" : <base linter used>,
    "column" : 0,
    "line" : 2,
    "helpUrl" : <url for help documentation>,
    "message" : <message>,
    "path" : <full file path>,
    "ruleId" : <rule id>,
    "severity" : <error/warning/info>
}

FAQs

Last updated on 23 Nov 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc