• Stars
    star
    144
  • Rank 246,338 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 6 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ’₯ JavaScript Standard Style with custom tweaks

standardx

JavaScript Standard Style with custom tweaks

npm tests standard

Overview

This package allows users to follow JavaScript Standard Style, but deviate if needed. This can be done by adding an .eslintrc file to their project directory or by adding an "eslintConfig" attribute to your package.json. That eslint config will be layed on top of the standard ruleset.

If there is a standard attribute in your package.json for defining globals or ignoring files, rename it to standardx:

"standardx": {
    "global": [
      "chrome",
      "muon",
      "postMessage"
    ]
}

All other standard features remain intact (including --fix!)

Install

npm install standardx --global

Usage

Use standardx on the command line the same way you use standard:

Usage:
    standardx <flags> [FILES...]

    If FILES is omitted, then all JavaScript source files (*.js, *.jsx) in the current
    working directory are checked, recursively.

    Certain paths (node_modules/, coverage/, vendor/, *.min.js, bundle.js, and
    files/folders that begin with '.' like .git/) are automatically ignored.

    Paths in a project's root .gitignore file are also automatically ignored.

Flags:
        --fix       Automatically fix problems
    -v, --verbose   Show rule names for errors (to ignore specific rules)
        --version   Show current version
    -h, --help      Show usage information

Flags (advanced):
        --stdin     Read file text from stdin
        --global    Declare global variable
        --plugin    Use custom eslint plugin
        --env       Use custom eslint environment
        --parser    Use custom js parser (e.g. babel-eslint)

Configuring

Running standardx with no additional configuration is the same as running standard itself. (Except rename the "standard" property in package.json to "standardx" if you have one.)

If there are rules you would like turned off, modify the ruleset using eslint config. Check out Configuring eslint for more information.

Example: Allow snake_case by turning off the camelCase rule

Via: .eslintrc:

{
  "rules": {
    "camelcase": 0
  }
}

or via package.json:

{
  "name": "coolproject",
  "description": "My Cool Project",
  "version": "1.0.0",
  "author": "Fantastic Developer",
  "eslintConfig": {
    "rules": {
      "camelcase": 0
    }
  }
}

Now, running standardx (with no additional arguments) will allow snake_case without error!

Contributing

Contributions welcome! Please read the contributing guidelines first.

License

MIT

More Repositories

1

standard

🌟 JavaScript Style Guide, with linter & automatic code fixer
JavaScript
28,824
star
2

eslint-config-standard

ESLint Config for JavaScript Standard Style
TypeScript
2,546
star
3

semistandard

🍦 All the goodness of `standard/standard` with semicolons sprinkled on top.
JavaScript
1,383
star
4

eslint-config-standard-react

ESLint Shareable Config for React/JSX support in JavaScript Standard Style
JavaScript
453
star
5

ts-standard

Typescript style guide, linter, and formatter using StandardJS
JavaScript
428
star
6

snazzy

Format JavaScript Standard Style as Stylish (i.e. snazzy) output
JavaScript
420
star
7

awesome-standard

Documenting the explosion of packages in the standard ecosystem!
383
star
8

standard-engine

πŸš’ The guts of `standard` modularized for reuse
JavaScript
144
star
9

eslint-plugin-standard

ESlint Rules for the Standard Linter
JavaScript
124
star
10

vscode-standard

VS Code extension for JavaScript Standard Style (`standard`) with automatic fixing
TypeScript
119
star
11

eslint-config-standard-jsx

ESLint Shareable Config for JSX support in JavaScript Standard Style
JavaScript
102
star
12

standard-loader

webpack loader for linting your code with https://github.com/feross/standard
JavaScript
68
star
13

eslint-config-semistandard

πŸ’― semistandard eslint sharable config
JavaScript
61
star
14

atom-standardjs-snippets

⚑ A collection of JavaScript snippets for Atom, Standard Style
CoffeeScript
48
star
15

deglob

πŸ“‚ Take a list of glob patterns and return an array of file locations, respecting `.gitignore` and allowing for ignore patterns via `package.json`.
JavaScript
39
star
16

atom-standard-formatter

Atom package to format code using Javascript Standard Style.
JavaScript
35
star
17

standard-packages

List of packages that use `standard`
JavaScript
33
star
18

standard-www

πŸ‘† Website for JavaScript Standard Style (@standard)
CSS
30
star
19

standard-json

πŸ”›Format JavaScript Standard Style output to a JSON array.
JavaScript
21
star
20

standard-tap

🚰 Format JavaScript Standard Style as TAP output
JavaScript
17
star
21

brackets-standard

Brackets extension for standard, a simple linter with sensible defaults. No longer maintained, Try using https://github.com/zaggino/brackets-eslint and https://github.com/feross/eslint-config-standard
JavaScript
10
star
22

.github

9
star
23

standard-demo

🍰 Web demo of JavaScript Standard Style (Work In Progress)
JavaScript
9
star
24

standardizer

πŸ’« A tiny service to lint and format JavaScript code using JavaScript Standard Style.
JavaScript
8
star