Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

standard-engine

Package Overview
Dependencies
Maintainers
9
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

standard-engine

Wrap your standards in a tortilla and cover it in special sauce.

  • 8.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
495K
increased by9.22%
Maintainers
9
Weekly downloads
 
Created

What is standard-engine?

The standard-engine npm package is a tool for creating JavaScript style guides and enforcing code style rules. It provides a way to define and apply custom linting rules, ensuring code consistency and quality across projects.

What are standard-engine's main functionalities?

Linting

This feature allows you to create a custom linter using standard-engine. You can define your own linting rules and apply them to your project files.

const standardEngine = require('standard-engine');
const opts = { 
  cmd: 'my-linter', 
  version: '1.0.0', 
  homepage: 'https://example.com', 
  bugs: 'https://example.com/issues', 
  eslintConfig: { 
    configFile: 'path/to/eslint/config' 
  } 
};
const linter = standardEngine.linter(opts);
linter.lintFiles(['src/**/*.js'], (err, results) => { 
  if (err) throw err; 
  console.log(results); 
});

Fixing

This feature allows you to automatically fix linting errors in your code. By setting the `fix` option to true, standard-engine will attempt to correct any issues it finds.

const standardEngine = require('standard-engine');
const opts = { 
  cmd: 'my-linter', 
  version: '1.0.0', 
  homepage: 'https://example.com', 
  bugs: 'https://example.com/issues', 
  eslintConfig: { 
    configFile: 'path/to/eslint/config' 
  } 
};
const linter = standardEngine.linter(opts);
linter.lintFiles(['src/**/*.js'], { fix: true }, (err, results) => { 
  if (err) throw err; 
  console.log(results); 
});

Custom Reporters

This feature allows you to use custom reporters to format the linting results. You can define your own formatter and pass it to standard-engine.

const standardEngine = require('standard-engine');
const opts = { 
  cmd: 'my-linter', 
  version: '1.0.0', 
  homepage: 'https://example.com', 
  bugs: 'https://example.com/issues', 
  eslintConfig: { 
    configFile: 'path/to/eslint/config' 
  },
  customFormatter: require('my-custom-formatter') 
};
const linter = standardEngine.linter(opts);
linter.lintFiles(['src/**/*.js'], (err, results) => { 
  if (err) throw err; 
  console.log(results); 
});

Other packages similar to standard-engine

Keywords

FAQs

Package last updated on 18 Feb 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc