MCPcopy
hub / github.com/standard/standard

github.com/standard/standard @v17.1.2 sqlite

repository ↗ · DeepWiki ↗ · release v17.1.2 ↗
8 symbols 39 edges 9 files 0 documented · 0%
README

Standard - JavaScript Style Guide JavaScript Standard Style

discord External tests Internal tests status badge old Node test npm version npm downloads Standard - JavaScript Style Guide

Sponsored by    Socket – Supply Chain Dependency Security for JavaScript and npm    Wormhole

EnglishEspañol (Latinoamérica)FrançaisBahasa IndonesiaItaliano (Italian)日本語 (Japanese)한국어 (Korean)Português (Brasil)简体中文 (Simplified Chinese)繁體中文 (Taiwanese Mandarin)

JavaScript style guide, linter, and formatter

This module saves you (and others!) time in three ways:

  • No configuration. The easiest way to enforce code quality in your project. No decisions to make. No .eslintrc files to manage. It just works.
  • Automatically format code. Just run standard --fix and say goodbye to messy or inconsistent code.
  • Catch style issues & programmer errors early. Save precious code review time by eliminating back-and-forth between reviewer & contributor.

Give it a try by running npx standard --fix right now!

Table of Contents

Install

The easiest way to use JavaScript Standard Style is to install it globally as a Node command line program. Run the following command in Terminal:

$ npm install standard --global

Or, you can install standard locally, for use in a single project:

$ npm install standard --save-dev

Note: To run the preceding commands, Node.js and npm must be installed.

Usage

After you've installed standard, you should be able to use the standard program. The simplest use case would be checking the style of all JavaScript files in the current working directory:

$ standard
Error: Use JavaScript Standard Style
  lib/torrent.js:950:11: Expected '===' and instead saw '=='.

If you've installed standard locally, run with npx instead:

$ npx standard

You can optionally pass in a directory (or directories) using the glob pattern. Be sure to quote paths containing glob patterns so that they are expanded by standard instead of your shell:

$ standard "src/util/**/*.js" "test/**/*.js"

Note: by default standard will look for all files matching the patterns: **/*.js, **/*.jsx.

What you might do if you're clever

  1. Add it to package.json

json { "name": "my-cool-package", "devDependencies": { "standard": "*" }, "scripts": { "test": "standard && node my-tests.js" } }

  1. Style is checked automatically when you run npm test

bash $ npm test Error: Use JavaScript Standard Style lib/torrent.js:950:11: Expected '===' and instead saw '=='.

  1. Never give style feedback on a pull request again!

Why should I use JavaScript Standard Style?

The beauty of JavaScript Standard Style is that it's simple. No one wants to maintain multiple hundred-line style configuration files for every module/project they work on. Enough of this madness!

This module saves you (and others!) time in three ways:

  • No configuration. The easiest way to enforce consistent style in your project. Just drop it in.
  • Automatically format code. Just run standard --fix and say goodbye to messy or inconsistent code.
  • Catch style issues & programmer errors early. Save precious code review time by eliminating back-and-forth between reviewer & contributor.

Adopting standard style means ranking the importance of code clarity and community conventions higher than personal style. This might not make sense for 100% of projects and development cultures, however open source can be a hostile place for newbies. Setting up clear, automated contributor expectations makes a project healthier.

For more info, see the conference talk "Write Perfect Code with Standard and ESLint". In this talk, you'll learn about linting, when to use standard versus eslint, and how prettier compares to standard.

Who uses JavaScript Standard Style?

Free MIDIs, MIDI file downloads College essays, AP notes

| | [<img width=190 src=https://cdn.rawgit.com/standard

Core symbols most depended-on inside this repo

spawn
called by 6
test/external/clone.js
runStandard
called by 3
test/external/clone.js
markDisabled
called by 2
test/external/clone.js
npmInstall
called by 1
test/external/clone.js
runStandardFix
called by 1
test/external/clone.js
runGitReset
called by 1
test/external/clone.js
gitClone
called by 0
test/external/clone.js
gitPull
called by 0
test/external/clone.js

Shape

Function 8

Languages

TypeScript100%

Modules by API surface

test/external/clone.js8 symbols

Dependencies from manifests, versioned

cross-spawn7.0.3 · 1×
eslint8.41.0 · 1×
eslint-config-standard17.1.0 · 1×
eslint-config-standard-jsx11.0.0 · 1×
eslint-plugin-import2.27.5 · 1×
eslint-plugin-n15.7.0 · 1×
eslint-plugin-promise6.1.1 · 1×
eslint-plugin-react7.36.1 · 1×
hallmark4.2.0 · 1×
minimist1.2.8 · 1×
run-parallel-limit1.1.0 · 1×
run-series1.1.9 · 1×

For agents

$ claude mcp add standard \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact