Skip to content

jacekk015/atom-standard-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atom-standard-formatter

Atom package to format your Javascript using Standard Style, Semi-Standard Style

Usage

Keybindings

Use Ctrl-Alt-F to format the current Javascript file. If a text selection is made, only the selected text will be formatted.

Format On Save

Automatically format your Javascript file on save by enabling the Format On Save package setting. This is off by default.

Menu

Packages > Standard Formatter > Format

Context menu

Standard Format Code

Settings

formatOnSave (default: false)

Format Javascript files when saving.

checkStyleDevDependencies (default: false)

Check code style in package.json devDependencies. If a valid style is not found it won't format.

| Note: This will use the nearest package.json

style (default: standard)

Choose the style formatter module you want to use. If checkStyleDevDependencies is true this setting will be ignored.

  • standard - equivalent to running standard --fix
  • semi-standard - equivalent to running semistandard --fix

honorPackageConfig (default: true)

Don't auto-format files included in the package.json's "ignore" configuration for the detected style.

| Note: This will use the nearest package.json

usePrettier (default: true)

Formats code with Prettier before Standard format

A note on formatting

This package relies on the excellent work from the following modules to perform formatting:

Code based on the https://github.com/standard/atom-standard-formatter package. Changes made:

  • Package updated to the newest software versions - original package wasn't updated since 2017
  • Removed Happiness, Standard-format, Semistandard-format
  • Added Prettier option