Merge branch 'master' into magicpython

This commit is contained in:
Glavin Wiechert 2018-03-01 20:39:37 -04:00 committed by GitHub
commit 09d6ceb583
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
52 changed files with 2247 additions and 3278 deletions

View File

@ -11,53 +11,24 @@ notifications:
script: sh build-package.sh
language: generic
cache:
timeout: 1000
git:
depth: 10
depth: 1
php:
- '5.6'
python:
- '2.7'
go:
- release
matrix:
include:
- os: linux
dist: trusty
sudo: required
services:
- docker
env:
- ATOM_CHANNEL=stable
- os: linux
dist: trusty
sudo: required
services:
- docker
env:
- ATOM_CHANNEL=beta
# - os: linux
# dist: trusty
# sudo: require
# env:
# - ATOM_CHANNEL=stable
# - os: linux
# dist: trusty
# sudo: require
# env:
# - ATOM_CHANNEL=beta
- os: osx
env:
- ATOM_CHANNEL=stable
# - os: osx
# env:
# - ATOM_CHANNEL=beta
os:
- linux
- osx
sudo: required
env:
global:
- APM_TEST_PACKAGES="language-marko language-html-swig language-svg language-d mavensmate-atom language-lua language-puppet fuse"
- PATH="/home/travis/gopath/bin:$HOME/.linuxbrew/bin:$PATH"
matrix:
- ATOM_SCRIPT_NAME=atom-beta APM_SCRIPT_NAME=apm-beta
- ATOM_SCRIPT_NAME=atom APM_SCRIPT_NAME=apm
addons:
apt:
@ -71,9 +42,7 @@ addons:
- libgnome-keyring-dev
- fakeroot
- crystal
- ocaml
- camlp4
- opam
- aspcud
- php5-cli
- golang
@ -85,111 +54,38 @@ cache:
- vendor/bundle # gems are installed here, https://docs.travis-ci.com/user/languages/ruby/#Dependency-Management
- node_modules
- $HOME/.atom
- $HOME/.stack
- $HOME/.opam
before_install:
# Install Homebrew on Linux
# linux: Install Nix, Nix packages, upgrade pip, and install python packages
# osx: Update Homebrew, remove conflicting cask, brew bundle, symlink elm-format,
# upgrade pip, and install python packages
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
git clone --depth=1 https://github.com/Linuxbrew/brew.git ~/.linuxbrew || true;
curl https://nixos.org/nix/install | sh &&
. ~/.nix-profile/etc/profile.d/nix.sh &&
nix-env -i uncrustify R elm-format terraform atom atom-beta opam &&
pip install --upgrade pip &&
pip install --user -r requirements.txt;
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update && brew cask zap oclint && brew bundle &&
ln -s /usr/local/bin/elm-format-0.17 /usr/local/bin/elm-format &&
pip2 install --upgrade pip &&
pip2 install -r requirements.txt;
else
echo Error:TRAVIS_OS_NAME && exit 1;
fi
# Update Homebrew
- brew update
- brew tap homebrew/dupes
- brew tap homebrew/versions
# Ruby language support
# - gem install ruby-beautify --verbose
# - gem install rubocop
- gem install htmlbeautifier
- gem install puppet-lint
# Sass language support
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
gem install sass;
else
docker pull unibeautify/sass-convert;
fi
# Python language support
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo chmod 777 -R /opt/python;
pip install --upgrade pip;
pip install --user --upgrade autopep8;
pip install --user --upgrade isort;
else
pip install --upgrade pip;
pip install --upgrade autopep8;
pip install --upgrade isort;
fi
# SQL language support
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
pip install --user --upgrade sqlparse;
else
pip install --upgrade sqlparse;
fi
# Java, C, C++, C#, Objective-C, D, Pawn, Vala
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install uncrustify;
else
docker pull unibeautify/uncrustify;
fi
- bundle install
# R
- brew tap homebrew/science
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install r;
rscript --version;
else
docker pull unibeautify/rscript;
fi
- Rscript --version
# PHP
- brew tap homebrew/homebrew-php
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install php56 || true;
brew gist-logs php56 || true;
echo -e "\n[Phar]\nphar.readonly = Off\n" >> /usr/local/etc/php/5.6/php.ini;
brew install php-cs-fixer || true;
brew gist-logs php-cs-fixer || true;
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget http://get.sensiolabs.org/php-cs-fixer.phar -O php-cs-fixer;
chmod a+x php-cs-fixer;
mv php-cs-fixer $HOME/.linuxbrew/bin/php-cs-fixer;
fi
- composer install
# CoffeeScript
- npm install coffee-formatter
# Haskell
# - brew install haskell-stack
# - stack setup
# - stack install stylish-haskell
# Elm
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
curl -L -o /tmp/elm-format.tgz
https://github.com/avh4/elm-format/releases/download/0.7.0-exp/elm-format-0.17-0.7.0-exp-mac-x64.tgz;
tar xvzf /tmp/elm-format.tgz -C /usr/local/bin;
fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
curl -L -o /tmp/elm-format.tgz https://github.com/avh4/elm-format/releases/download/0.7.0-exp/elm-format-0.17-0.7.0-exp-linux-x64.tgz;
tar xvzf /tmp/elm-format.tgz -C $HOME/.linuxbrew/bin;
fi
# OCaml
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install ocaml;
brew install opam;
fi
- opam init --auto-setup
# - opam init --auto-setup
# Init environment variables for opam
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
eval `opam config env`;
fi
- opam install --yes ocp-indent
# Crystal
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install crystal-lang; fi
# Bash
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
pip install --user beautysh;
else
pip install beautysh;
fi
# terraform
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install terraform;
else
docker pull hashicorp/terraform;
fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# eval `opam config env`;
# fi
# - opam install --yes ocp-indent

11
Brewfile Normal file
View File

@ -0,0 +1,11 @@
tap 'homebrew/php'
tap 'caskroom/versions'
brew 'uncrustify'
brew 'r'
brew 'composer'
brew 'opam'
brew 'crystal-lang'
brew 'terraform'
brew 'elm-format'
cask 'atom'
cask 'atom-beta'

View File

@ -1,5 +1,23 @@
# Next
- Add support for MagicPython grammar [#1851](https://github.com/Glavin001/atom-beautify/issues/1851)
- Add "Reindent" option for sqlformat. See [#1926](https://github.com/Glavin001/atom-beautify/pull/1926).
- Add hindent and brittany beautifiers for haskell
- Breaking change to `pybeautifier`: Fix typo, change `formater` to `formatter`. See [#1898](https://github.com/Glavin001/atom-beautify/pull/1898).
- Fixes [#1773](https://github.com/Glavin001/atom-beautify/issues/1773) and [#793](https://github.com/Glavin001/atom-beautify/issues/793). ruby-beautify with Rubocop now respects `Exclude` settings, and properly loads inherited config files (like `~/.rubocop.yml`)
- Add hindent and brittany beautifiers for haskell
- Fix [#1862](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for ocp-indent as an executable
- See [#601](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for tsx files
- See [#1497](https://github.com/Glavin001/atom-beautify/issues/1497) and [#802](https://github.com/Glavin001/atom-beautify/issues/802)
- ...
# v0.30.9 (2017-11-22)
- Fix [#1949](https://github.com/Glavin001/atom-beautify/issues/1949): Fix beautify on save when text has not changed.
# v0.30.8 (2017-11-22)
- Fix [#1949](https://github.com/Glavin001/atom-beautify/issues/1949): Fix beautify on save when text has not changed.
# v0.30.7 (2017-11-21)
- Refactor handleSaveEvent to use onWillSave async ([#1924](https://github.com/Glavin001/atom-beautify/pull/1924), [#1895](https://github.com/Glavin001/atom-beautify/issues/1895))
# v0.30.6 (2017-10-30)
- See [#645](https://github.com/Glavin001/atom-beautify/issues/645). Add support for Terraform fmt.

6
Gemfile Normal file
View File

@ -0,0 +1,6 @@
source "https://rubygems.org"
gem "rubocop"
gem "htmlbeautifier"
gem "puppet-lint"
gem "sass"

View File

@ -6,6 +6,11 @@
[![Gitter](https://img.shields.io/gitter/room/Glavin001/atom-beautify.svg?style=flat-square)](https://gitter.im/Glavin001/atom-beautify)
[![Bountysource](https://img.shields.io/bountysource/team/atom-beautify/activity.svg?style=flat-square)](https://www.bountysource.com/teams/atom-beautify)
[![Paypal Donations](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X2RK5DKN6YXPJ&lc=CA&item_name=Atom%2dBeautify&item_number=atom%2dbeautify&currency_code=CAD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)
[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/unibeautify)
**Sign up for Unibeautify CI: [https://goo.gl/jmM4QN](https://goo.gl/jmM4QN)**
**Help improve Atom-Beautify by completing the quick questionnaire: [https://goo.gl/iEHBNr](https://goo.gl/iEHBNr)**
| Mac OS <img src="https://cloud.githubusercontent.com/assets/1885333/17059766/2530c9d8-4ffd-11e6-9529-3fa47dbff616.png" width="50px"> and <img src="https://cloud.githubusercontent.com/assets/1885333/17059750/11c4474e-4ffd-11e6-89e1-2486ca5b3234.png" width="100px"> | <img src="https://cloud.githubusercontent.com/assets/1885333/17059763/206a7d4a-4ffd-11e6-859e-7856902fb300.png" width="100px"> |
| --- | --- |
@ -65,6 +70,18 @@ Thank you.
Atom-Beautify is going to be completely rewritten with [Unibeautify](https://github.com/Unibeautify/unibeautify) at its core!
See [`unibeautify` branch](../../tree/unibeautify) for work in progress and [Issue #1174](https://github.com/Glavin001/atom-beautify/issues/1174).
### Poll: Improving installation of third-party beautifiers
Many users are experiencing issues when installing third party beautifiers (e.g. Uncrustify, PHP-CS-Fixer, and many more).
A possible solution is a "cloud" service which provides remote access to these beautifiers. Atom-Beautify would then communicate with these services, allowing for zero-installation beautification.
Please let us know what you think!
[![](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/Yes%2C%20cloud%20solution%20would%20be%20great!)](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/Yes%2C%20cloud%20solution%20would%20be%20great!/vote)
[![](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20enjoy%20manually%20installing%20beautifiers)](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20enjoy%20manually%20installing%20beautifiers/vote)
[![](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20am%20happy%20using%20Docker)](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20am%20happy%20using%20Docker/vote)
[![](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20do%20not%20want%20to%20send%20me%20code%20over%20the%20Internet)](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20do%20not%20want%20to%20send%20me%20code%20over%20the%20Internet/vote)
## Beautifiers
Some of the supported beautifiers are developed for Node.js and are automatically installed when Atom-Beautify is installed. However, other beautifiers are command-line interface (CLI) applications and require you to manually install them.

View File

@ -6,6 +6,11 @@
[![Gitter](https://img.shields.io/gitter/room/Glavin001/atom-beautify.svg?style=flat-square)](https://gitter.im/Glavin001/atom-beautify)
[![Bountysource](https://img.shields.io/bountysource/team/atom-beautify/activity.svg?style=flat-square)](https://www.bountysource.com/teams/atom-beautify)
[![Paypal Donations](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X2RK5DKN6YXPJ&lc=CA&item_name=Atom%2dBeautify&item_number=atom%2dbeautify&currency_code=CAD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)
[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/unibeautify)
**Sign up for Unibeautify CI: [https://goo.gl/jmM4QN](https://goo.gl/jmM4QN)**
**Help improve Atom-Beautify by completing the quick questionnaire: [https://goo.gl/iEHBNr](https://goo.gl/iEHBNr)**
| Mac OS <img src="https://cloud.githubusercontent.com/assets/1885333/17059766/2530c9d8-4ffd-11e6-9529-3fa47dbff616.png" width="50px"> and <img src="https://cloud.githubusercontent.com/assets/1885333/17059750/11c4474e-4ffd-11e6-89e1-2486ca5b3234.png" width="100px"> | <img src="https://cloud.githubusercontent.com/assets/1885333/17059763/206a7d4a-4ffd-11e6-859e-7856902fb300.png" width="100px"> |
| --- | --- |
@ -65,6 +70,18 @@ Thank you.
Atom-Beautify is going to be completely rewritten with [Unibeautify](https://github.com/Unibeautify/unibeautify) at its core!
See [`unibeautify` branch](../../tree/unibeautify) for work in progress and [Issue #1174](https://github.com/Glavin001/atom-beautify/issues/1174).
### Poll: Improving installation of third-party beautifiers
Many users are experiencing issues when installing third party beautifiers (e.g. Uncrustify, PHP-CS-Fixer, and many more).
A possible solution is a "cloud" service which provides remote access to these beautifiers. Atom-Beautify would then communicate with these services, allowing for zero-installation beautification.
Please let us know what you think!
[![](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/Yes%2C%20cloud%20solution%20would%20be%20great!)](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/Yes%2C%20cloud%20solution%20would%20be%20great!/vote)
[![](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20enjoy%20manually%20installing%20beautifiers)](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20enjoy%20manually%20installing%20beautifiers/vote)
[![](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20am%20happy%20using%20Docker)](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20am%20happy%20using%20Docker/vote)
[![](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20do%20not%20want%20to%20send%20me%20code%20over%20the%20Internet)](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BY57P9ACSDQASVT7KYZKZESK/No%2C%20I%20do%20not%20want%20to%20send%20me%20code%20over%20the%20Internet/vote)
## Beautifiers
Some of the supported beautifiers are developed for Node.js and are automatically installed when Atom-Beautify is installed. However, other beautifiers are command-line interface (CLI) applications and require you to manually install them.
@ -74,6 +91,7 @@ Some of the supported beautifiers are developed for Node.js and are automaticall
| align-yaml | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| autopep8 | :warning: 2 executables | :warning: Only 1 of 2 executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [autopep8 (`autopep8`)](https://github.com/hhatto/autopep8) with `docker pull unibeautify/autopep8`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [autopep8 (`autopep8`)](https://github.com/hhatto/autopep8) by following https://github.com/hhatto/autopep8#installation<br/>2. Install [isort (`isort`)](https://github.com/timothycrosley/isort) by following https://github.com/timothycrosley/isort#installing-isort<br/> |
| beautysh | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [beautysh (`beautysh`)](https://github.com/bemeurer/beautysh) with `docker pull unibeautify/beautysh`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [beautysh (`beautysh`)](https://github.com/bemeurer/beautysh) by following https://github.com/bemeurer/beautysh#installation<br/> |
| brittany | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/lspitzner/brittany and follow the instructions. |
| clang-format | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [ClangFormat (`clang-format`)](https://clang.llvm.org/docs/ClangFormat.html) with `docker pull unibeautify/clang-format`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [ClangFormat (`clang-format`)](https://clang.llvm.org/docs/ClangFormat.html) by following https://clang.llvm.org/docs/ClangFormat.html<br/> |
| cljfmt | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| Coffee Formatter | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
@ -90,6 +108,7 @@ Some of the supported beautifiers are developed for Node.js and are automaticall
| gofmt | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://golang.org/cmd/gofmt/ and follow the instructions. |
| goimports | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [goimports (`goimports`)](https://godoc.org/golang.org/x/tools/cmd/goimports) with `docker pull unibeautify/goimports`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [goimports (`goimports`)](https://godoc.org/golang.org/x/tools/cmd/goimports) by following https://godoc.org/golang.org/x/tools/cmd/goimports<br/> |
| hh_format | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to http://hhvm.com/ and follow the instructions. |
| hindent | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/commercialhaskell/hindent and follow the instructions. |
| HTML Beautifier | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/threedaymonk/htmlbeautifier and follow the instructions. |
| JS Beautify | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| JSCS Fixer | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
@ -97,13 +116,14 @@ Some of the supported beautifiers are developed for Node.js and are automaticall
| Lua beautifier | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| Marko Beautifier | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| Nginx Beautify | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| ocp-indent | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://www.typerex.org/ocp-indent.html and follow the instructions. |
| ocp-indent | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [ocp-indent (`ocp-indent`)](https://www.typerex.org/ocp-indent.html) with `docker pull unibeautify/ocp-indent`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [ocp-indent (`ocp-indent`)](https://www.typerex.org/ocp-indent.html) by following https://www.typerex.org/ocp-indent.html#installation<br/> |
| Perltidy | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to http://perltidy.sourceforge.net/ and follow the instructions. |
| PHP-CS-Fixer | :warning: 2 executables | :warning: Only 1 of 2 executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [PHP-CS-Fixer (`php-cs-fixer`)](https://github.com/FriendsOfPHP/PHP-CS-Fixer) with `docker pull unibeautify/php-cs-fixer`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [PHP (`php`)](http://php.net/) by following http://php.net/manual/en/install.php<br/>2. Install [PHP-CS-Fixer (`php-cs-fixer`)](https://github.com/FriendsOfPHP/PHP-CS-Fixer) by following https://github.com/FriendsOfPHP/PHP-CS-Fixer#installation<br/> |
| PHPCBF | :warning: 2 executables | :warning: Only 1 of 2 executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [PHPCBF (`phpcbf`)](https://github.com/squizlabs/PHP_CodeSniffer) with `docker pull unibeautify/phpcbf`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [PHP (`php`)](http://php.net/) by following http://php.net/manual/en/install.php<br/>2. Install [PHPCBF (`phpcbf`)](https://github.com/squizlabs/PHP_CodeSniffer) by following https://github.com/squizlabs/PHP_CodeSniffer#installation<br/> |
| Prettier | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| Pretty Diff | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| Pug Beautify | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| puppet-lint | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to http://puppet-lint.com/ and follow the instructions. |
| puppet-lint | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [puppet-lint (`puppet-lint`)](http://puppet-lint.com/) with `docker pull unibeautify/puppet-lint`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [puppet-lint (`puppet-lint`)](http://puppet-lint.com/) by following http://puppet-lint.com/<br/> |
| pybeautifier | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/guyskk/pybeautifier and follow the instructions. |
| Remark | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
| Rubocop | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/bbatsov/rubocop and follow the instructions. |
@ -135,7 +155,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
| C++ | `C++` |`.h`, `.hh`, `.cc`, `.cpp`, `.cxx`, `.C`, `.cu`, `.c++`, `.hpp`, `.hxx`, `.h++`, `.cuh` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)**, [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) |
| Crystal | `Crystal` |`.cr` | **[`Crystal`](http://crystal-lang.org)** |
| C# | `C#` |`.cs` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |
| CSS | `CSS` |`.css` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Pretty Diff`](https://github.com/prettydiff/prettydiff), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
| CSS | `CSS` |`.css` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Prettier`](https://github.com/prettier/prettier), [`Pretty Diff`](https://github.com/prettydiff/prettydiff), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
| CSV | `CSV` |`.csv` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
| D | `D` |`.d` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)**, [`dfmt`](https://github.com/Hackerpilot/dfmt) |
| EJS | `EJS`, `JavaScript Template`, `HTML (Angular)` |`.ejs` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
@ -148,17 +168,17 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
| Go | `Go` |`.go` | **[`gofmt`](https://golang.org/cmd/gofmt/)**, [`goimports`](https://godoc.org/golang.org/x/tools/cmd/goimports) |
| Golang Template | `HTML (Go)`, `Go Template` |`.gohtml` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
| Handlebars | `Handlebars`, `HTML (Handlebars)` |`.hbs`, `.handlebars` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| Haskell | `Haskell` |`.hs` | **[`stylish-haskell`](https://github.com/jaspervdj/stylish-haskell)** |
| Haskell | `Haskell` |`.hs` | **[`stylish-haskell`](https://github.com/jaspervdj/stylish-haskell)**, [`brittany`](https://github.com/lspitzner/brittany), [`hindent`](https://github.com/commercialhaskell/hindent) |
| HTML | `HTML` |`.html` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| Jade | `Jade`, `Pug` |`.jade`, `.pug` | **[`Pug Beautify`](https://github.com/vingorius/pug-beautify)** |
| Java | `Java` |`.java` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |
| JavaScript | `JavaScript` |`.js` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`ESLint Fixer`](https://github.com/eslint/eslint), [`JSCS Fixer`](https://github.com/jscs-dev/node-jscs/), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| JSON | `JSON` |`.json` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| JavaScript | `JavaScript` |`.js` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`ESLint Fixer`](https://github.com/eslint/eslint), [`JSCS Fixer`](https://github.com/jscs-dev/node-jscs/), [`Prettier`](https://github.com/prettier/prettier), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| JSON | `JSON` |`.json` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Prettier`](https://github.com/prettier/prettier), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| JSX | `JSX`, `JavaScript (JSX)`, `Babel ES6 JavaScript`, `JavaScript with JSX` |`.jsx`, `.js` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`JS Beautify`](https://github.com/beautify-web/js-beautify) |
| LaTeX | `BibTeX`, `LaTeX`, `TeX` |`.bib`, `.tex`, `.sty`, `.cls`, `.dtx`, `.ins`, `.bbx`, `.cbx` | **[`Latex Beautify`](https://github.com/cmhughes/latexindent.pl)** |
| LESS | `LESS` |`.less` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`CSScomb`](https://github.com/csscomb/csscomb.js) |
| LESS | `LESS` |`.less` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Prettier`](https://github.com/prettier/prettier) |
| Lua | `Lua` |`.lua`, `.ttslua` | **[`Lua beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/lua-beautifier/beautifier.coffee)** |
| Markdown | `GitHub Markdown` |`.markdown`, `.md` | **[`Tidy Markdown`](https://github.com/slang800/tidy-markdown)**, [`Remark`](https://github.com/wooorm/remark) |
| Markdown | `GitHub Markdown` |`.markdown`, `.md` | **[`Tidy Markdown`](https://github.com/slang800/tidy-markdown)**, [`Prettier`](https://github.com/prettier/prettier), [`Remark`](https://github.com/wooorm/remark) |
| Marko | `Marko` |`.marko` | **[`Marko Beautifier`](https://github.com/marko-js/marko-prettyprint)** |
| Mustache | `HTML (Mustache)` |`.mustache` | **[`JS Beautify`](https://github.com/beautify-web/js-beautify)**, [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| Nginx | `nginx` |`.conf` | **[`Nginx Beautify`](https://github.com/denysvitali/nginxbeautify)** |
@ -175,19 +195,20 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
| Ruby | `Ruby`, `Ruby on Rails` |`.rb` | **[`Rubocop`](https://github.com/bbatsov/rubocop)**, [`Ruby Beautify`](https://github.com/erniebrodeur/ruby-beautify) |
| Rust | `Rust` |`.rs`, `.rlib` | **[`rustfmt`](https://github.com/rust-lang-nursery/rustfmt)** |
| Sass | `Sass` |`.sass` | **[`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax)** |
| SCSS | `SCSS` |`.scss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
| SCSS | `SCSS` |`.scss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`Prettier`](https://github.com/prettier/prettier), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
| Spacebars | `Spacebars` | | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
| SQL | `SQL (Rails)`, `SQL` |`.sql` | **[`sqlformat`](https://github.com/andialbrecht/sqlparse)** |
| SVG | `SVG` |`.svg` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
| Swig | `HTML (Swig)`, `SWIG` |`.swig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
| Terraform | `Terraform` |`.tf` | **[`terraformfmt`](https://www.terraform.io/docs/commands/fmt.html)** |
| TSS | `TSS` |`.tss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
| TSX | `TypeScriptReact` |`.tsx` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)** |
| Twig | `HTML (Twig)` |`.twig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
| TypeScript | `TypeScript` |`.ts` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)** |
| TypeScript | `TypeScript` |`.ts` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)**, [`Prettier`](https://github.com/prettier/prettier) |
| UX Markup | `UX` |`.ux` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
| Vala | `Vala` |`.vala`, `.vapi` | **[`Uncrustify`](https://github.com/uncrustify/uncrustify)** |
| Visualforce | `Visualforce` |`.page` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
| Vue | `Vue Component` |`.vue` | **[`Vue Beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/vue-beautifier.coffee)** |
| Vue | `Vue Component` |`.vue` | **[`Vue Beautifier`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/vue-beautifier.coffee)**, [`Prettier`](https://github.com/prettier/prettier) |
| XML | `SLD`, `XML`, `XHTML`, `XSD`, `XSL`, `JSP`, `GSP` |`.sld`, `.xml`, `.xhtml`, `.xsd`, `.xsl`, `.jsp`, `.gsp`, `.plist`, `.recipe`, `.config` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`JS Beautify`](https://github.com/beautify-web/js-beautify) |
| XTemplate | `XTemplate` |`.xtemplate` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
| YAML | `YAML` |`.yml`, `.yaml` | **[`align-yaml`](https://github.com/jonschlinkert/align-yaml)** |

View File

@ -10,136 +10,35 @@ environment:
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
matrix:
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.8"
PYTHON_ARCH: "32"
RUBY_VERSION: 23
# - PYTHON: "C:\\Python27-x64"
# PYTHON_VERSION: "2.7.8"
# PYTHON_ARCH: "64"
#
# - PYTHON: "C:\\Python33"
# PYTHON_VERSION: "3.3.5"
# PYTHON_ARCH: "32"
#
# - PYTHON: "C:\\Python33-x64"
# PYTHON_VERSION: "3.3.5"
# PYTHON_ARCH: "64"
#
# - PYTHON: "C:\\Python34"
# PYTHON_VERSION: "3.4.1"
# PYTHON_ARCH: "32"
#
# - PYTHON: "C:\\Python34-x64"
# PYTHON_VERSION: "3.4.1"
# PYTHON_ARCH: "64"
PATH: C:\Ruby23\bin;C:\Ruby23-x64\DevKit\mingw\bin;C:\Python27;C:\Python27\Scripts;%PATH%
init:
- cmd: rd /s /q %CHOCOLATEYINSTALL%
- ps: iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
install:
- ECHO "Filesystem root:"
- ps: "ls \"C:/\""
- cinst atom -y
- cd %APPVEYOR_BUILD_FOLDER%
# Add Atom's bin (apm, etc) to PATH
- SET PATH=%LOCALAPPDATA%\atom\bin;%PATH%
- cinst packages.config -y
- refreshenv
- apm install
# Install CLI beautifiers
# https://packaging.python.org/guides/supporting-windows-using-appveyor/
- pip install -r requirements.txt
# Install Python (from the official .msi of http://python.org) and pip when
# not already installed.
- "powershell ./appveyor/install.ps1"
# Gemfile Install
- bundle install
# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
# Check that we have the expected version and architecture for Python
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
# Install the build dependencies of the project. If some dependencies contain
# compiled extensions and are not provided as pre-built wheel packages,
# pip will build them from source using the MSVC compiler matching the
# target Python version and architecture
- "%CMD_IN_ENV% pip install --upgrade autopep8"
- where autopep8
- "%CMD_IN_ENV% pip install --upgrade isort"
- where isort
- "%CMD_IN_ENV% pip install --upgrade sqlparse"
# Ruby & Gem
- SET PATH=C:\Ruby%RUBY_VERSION%\bin;C:\Ruby23-x64\DevKit\mingw\bin;%PATH%
# Rubocop
- gem install rubocop
- where rubocop
# HTMLBeautifier
- gem install htmlbeautifier
- where htmlbeautifier
# Puppet-Lint
- gem install puppet-lint
- where puppet-lint
# Sass
- gem install sass
- where sass-convert
# emacs
- cinst emacs -y
- where emacs
# terraform
- cinst terraform -y
- where terraform
# FIXME: Enable allowEmptyChecksums, until someone fixes the checksum issue of php
- choco feature enable -n allowEmptyChecksums
# PHP
- ps: Set-Service wuauserv -StartupType Manual
- cinst php -y
- ps: "ls \"C:\\tools\\php71\""
- "SET PATH=C:\\tools\\php71;%PATH%"
- where php
# PHP-CS-Fixer
- cinst curl -y # Use cURL to download file from URL
- curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer
- "SET PATH=%cd%;%PATH%" # Add current working directory to PATH
- where php-cs-fixer
# Uncrustify
- curl -k -L https://sourceforge.net/projects/uncrustify/files/uncrustify/uncrustify-0.65/uncrustify-0.65-win32.zip/download -o uncrustify.zip
- cinst 7zip.commandline -y
- 7za e uncrustify.zip -ouncrustify-d
- "SET PATH=%cd%\\uncrustify-d;%PATH%"
- where uncrustify
- composer install
# elm-format
- curl -k -L https://github.com/avh4/elm-format/releases/download/0.7.0-exp/elm-format-0.18-0.7.0-exp-win-i386.zip -o elm-format.zip
- 7za e elm-format.zip -oelm-format-d
- "SET PATH=%cd%\\elm-format-d;%PATH%"
- where elm-format
# Beautysh
- pip install beautysh
- where beautysh
- npm install -g elm-format@exp
build_script:
- cd %APPVEYOR_BUILD_FOLDER%
# Install languages to Atom
- apm install language-marko language-html-swig language-svg language-elm language-d mavensmate-atom language-lua language-puppet fuse
# Show current PATH
- echo %PATH%
- apm install --packages-file atom-packages.txt
# Run tests on package
#- "%LOCALAPPDATA%\\atom\\bin\\atom.cmd --test spec"
- apm test --path %LOCALAPPDATA%/atom/bin/atom.cmd

View File

@ -1,180 +0,0 @@
# Sample script to install Python and pip under Windows
# Authors: Olivier Grisel, Jonathan Helmus and Kyle Kastner
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
$MINICONDA_URL = "http://repo.continuum.io/miniconda/"
$BASE_URL = "https://www.python.org/ftp/python/"
$GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
$GET_PIP_PATH = "C:\get-pip.py"
function DownloadPython ($python_version, $platform_suffix) {
$webclient = New-Object System.Net.WebClient
$filename = "python-" + $python_version + $platform_suffix + ".msi"
$url = $BASE_URL + $python_version + "/" + $filename
$basedir = $pwd.Path + "\"
$filepath = $basedir + $filename
if (Test-Path $filename) {
Write-Host "Reusing" $filepath
return $filepath
}
# Download and retry up to 3 times in case of network transient errors.
Write-Host "Downloading" $filename "from" $url
$retry_attempts = 2
for($i=0; $i -lt $retry_attempts; $i++){
try {
$webclient.DownloadFile($url, $filepath)
break
}
Catch [Exception]{
Start-Sleep 1
}
}
if (Test-Path $filepath) {
Write-Host "File saved at" $filepath
} else {
# Retry once to get the error message if any at the last try
$webclient.DownloadFile($url, $filepath)
}
return $filepath
}
function InstallPython ($python_version, $architecture, $python_home) {
Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home
if (Test-Path $python_home) {
Write-Host $python_home "already exists, skipping."
return $false
}
if ($architecture -eq "32") {
$platform_suffix = ""
} else {
$platform_suffix = ".amd64"
}
$msipath = DownloadPython $python_version $platform_suffix
Write-Host "Installing" $msipath "to" $python_home
$install_log = $python_home + ".log"
$install_args = "/qn /log $install_log /i $msipath TARGETDIR=$python_home"
$uninstall_args = "/qn /x $msipath"
RunCommand "msiexec.exe" $install_args
if (-not(Test-Path $python_home)) {
Write-Host "Python seems to be installed else-where, reinstalling."
RunCommand "msiexec.exe" $uninstall_args
RunCommand "msiexec.exe" $install_args
}
if (Test-Path $python_home) {
Write-Host "Python $python_version ($architecture) installation complete"
} else {
Write-Host "Failed to install Python in $python_home"
Get-Content -Path $install_log
Exit 1
}
}
function RunCommand ($command, $command_args) {
Write-Host $command $command_args
Start-Process -FilePath $command -ArgumentList $command_args -Wait -Passthru
}
function InstallPip ($python_home) {
$pip_path = $python_home + "\Scripts\pip.exe"
$python_path = $python_home + "\python.exe"
if (-not(Test-Path $pip_path)) {
Write-Host "Installing pip..."
$webclient = New-Object System.Net.WebClient
$webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH)
Write-Host "Executing:" $python_path $GET_PIP_PATH
Start-Process -FilePath "$python_path" -ArgumentList "$GET_PIP_PATH" -Wait -Passthru
} else {
Write-Host "pip already installed."
}
}
function DownloadMiniconda ($python_version, $platform_suffix) {
$webclient = New-Object System.Net.WebClient
if ($python_version -eq "3.4") {
$filename = "Miniconda3-3.5.5-Windows-" + $platform_suffix + ".exe"
} else {
$filename = "Miniconda-3.5.5-Windows-" + $platform_suffix + ".exe"
}
$url = $MINICONDA_URL + $filename
$basedir = $pwd.Path + "\"
$filepath = $basedir + $filename
if (Test-Path $filename) {
Write-Host "Reusing" $filepath
return $filepath
}
# Download and retry up to 3 times in case of network transient errors.
Write-Host "Downloading" $filename "from" $url
$retry_attempts = 2
for($i=0; $i -lt $retry_attempts; $i++){
try {
$webclient.DownloadFile($url, $filepath)
break
}
Catch [Exception]{
Start-Sleep 1
}
}
if (Test-Path $filepath) {
Write-Host "File saved at" $filepath
} else {
# Retry once to get the error message if any at the last try
$webclient.DownloadFile($url, $filepath)
}
return $filepath
}
function InstallMiniconda ($python_version, $architecture, $python_home) {
Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home
if (Test-Path $python_home) {
Write-Host $python_home "already exists, skipping."
return $false
}
if ($architecture -eq "32") {
$platform_suffix = "x86"
} else {
$platform_suffix = "x86_64"
}
$filepath = DownloadMiniconda $python_version $platform_suffix
Write-Host "Installing" $filepath "to" $python_home
$install_log = $python_home + ".log"
$args = "/S /D=$python_home"
Write-Host $filepath $args
Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru
if (Test-Path $python_home) {
Write-Host "Python $python_version ($architecture) installation complete"
} else {
Write-Host "Failed to install Python in $python_home"
Get-Content -Path $install_log
Exit 1
}
}
function InstallMinicondaPip ($python_home) {
$pip_path = $python_home + "\Scripts\pip.exe"
$conda_path = $python_home + "\Scripts\conda.exe"
if (-not(Test-Path $pip_path)) {
Write-Host "Installing pip..."
$args = "install --yes pip"
Write-Host $conda_path $args
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru
} else {
Write-Host "pip already installed."
}
}
function main () {
InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON
InstallPip $env:PYTHON
}
main

View File

@ -1,47 +0,0 @@
:: To build extensions for 64 bit Python 3, we need to configure environment
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
::
:: To build extensions for 64 bit Python 2, we need to configure environment
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
::
:: 32 bit builds do not require specific environment configurations.
::
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
:: cmd interpreter, at least for (SDK v7.0)
::
:: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
:: http://stackoverflow.com/a/13751649/163740
::
:: Author: Olivier Grisel
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
@ECHO OFF
SET COMMAND_TO_RUN=%*
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%"
IF %MAJOR_PYTHON_VERSION% == "2" (
SET WINDOWS_SDK_VERSION="v7.0"
) ELSE IF %MAJOR_PYTHON_VERSION% == "3" (
SET WINDOWS_SDK_VERSION="v7.1"
) ELSE (
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
EXIT 1
)
IF "%PYTHON_ARCH%"=="64" (
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
SET DISTUTILS_USE_SDK=1
SET MSSdk=1
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
ECHO Executing: %COMMAND_TO_RUN%
call %COMMAND_TO_RUN% || EXIT 1
) ELSE (
ECHO Using default MSVC build environment for 32 bit architecture
ECHO Executing: %COMMAND_TO_RUN%
call %COMMAND_TO_RUN% || EXIT 1
)

10
atom-packages.txt Normal file
View File

@ -0,0 +1,10 @@
language-marko
language-html-swig
language-svg
language-d
mavensmate-atom
language-lua
language-elm
language-puppet
fuse
react

View File

@ -1,63 +1,21 @@
#!/bin/sh
echo "Downloading latest Atom release..."
ATOM_CHANNEL="${ATOM_CHANNEL:=stable}"
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
curl -s -L "https://atom.io/download/mac?channel=$ATOM_CHANNEL" \
-H 'Accept: application/octet-stream' \
-o "atom.zip"
mkdir atom
unzip -q atom.zip -d atom
if [ "$ATOM_CHANNEL" = "stable" ]; then
export ATOM_APP_NAME="Atom.app"
export ATOM_SCRIPT_NAME="atom.sh"
export ATOM_SCRIPT_PATH="./atom/${ATOM_APP_NAME}/Contents/Resources/app/atom.sh"
else
export ATOM_APP_NAME="Atom ${ATOM_CHANNEL}.app"
export ATOM_SCRIPT_NAME="atom-${ATOM_CHANNEL}"
export ATOM_SCRIPT_PATH="./atom-${ATOM_CHANNEL}"
ln -s "./atom/${ATOM_APP_NAME}/Contents/Resources/app/atom.sh" "${ATOM_SCRIPT_PATH}"
fi
export PATH="$PWD/atom/${ATOM_APP_NAME}/Contents/Resources/app/apm/bin:$PATH"
export ATOM_PATH="./atom"
export APM_SCRIPT_PATH="./atom/${ATOM_APP_NAME}/Contents/Resources/app/apm/node_modules/.bin/apm"
else
curl -s -L "https://atom.io/download/deb?channel=$ATOM_CHANNEL" \
-H 'Accept: application/octet-stream' \
-o "atom.deb"
if [ "$TRAVIS_OS_NAME" != "osx" ]; then
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
export DISPLAY=":99"
dpkg-deb -x atom.deb "$HOME/atom"
if [ "$ATOM_CHANNEL" = "stable" ]; then
export ATOM_SCRIPT_NAME="atom"
export APM_SCRIPT_NAME="apm"
else
export ATOM_SCRIPT_NAME="atom-$ATOM_CHANNEL"
export APM_SCRIPT_NAME="apm-$ATOM_CHANNEL"
fi
export ATOM_SCRIPT_PATH="$HOME/atom/usr/bin/$ATOM_SCRIPT_NAME"
export APM_SCRIPT_PATH="$HOME/atom/usr/bin/$APM_SCRIPT_NAME"
fi
echo "Using Atom version:"
"$ATOM_SCRIPT_PATH" -v
"$ATOM_SCRIPT_NAME" -v
echo "Using APM version:"
"$APM_SCRIPT_PATH" -v
"$APM_SCRIPT_NAME" -v
echo "Downloading package dependencies..."
"$APM_SCRIPT_PATH" clean
"$APM_SCRIPT_PATH" install
"$APM_SCRIPT_NAME" clean
"$APM_SCRIPT_NAME" install
TEST_PACKAGES="${APM_TEST_PACKAGES:=none}"
if [ "$TEST_PACKAGES" != "none" ]; then
echo "Installing atom package dependencies..."
for pack in $TEST_PACKAGES ; do
"$APM_SCRIPT_PATH" install $pack
done
fi
echo "Installing atom package dependencies..."
"$APM_SCRIPT_NAME" install --packages-file atom-packages.txt
if [ -f ./node_modules/.bin/coffeelint ]; then
if [ -d ./src ]; then
@ -100,7 +58,7 @@ fi
if [ -d ./spec ]; then
echo "Running specs..."
"$ATOM_SCRIPT_PATH" --test spec
"$ATOM_SCRIPT_NAME" --test spec
else
echo "Missing spec folder! Please consider adding a test suite in `./spec`"
exit 1

5
composer.json Normal file
View File

@ -0,0 +1,5 @@
{
"require": {
"friendsofphp/php-cs-fixer": ">0"
}
}

View File

@ -60,6 +60,11 @@
Beautifiers
</a>
</li>
<li>
<a href='class/Brittany.html'>
Brittany
</a>
</li>
</ul>
</ul>
<ul>
@ -150,6 +155,11 @@
HTMLBeautifier
</a>
</li>
<li>
<a href='class/Hindent.html'>
Hindent
</a>
</li>
</ul>
</ul>
<ul>
@ -419,6 +429,15 @@
(src&#47;languages)
</small>
</li>
<li>
<a href='file/src/beautifiers/brittany.coffee.html'>
brittany.coffee
</a>
<small>
(src&#47;beautifiers)
</small>
</li>
</ul>
</ul>
<ul>
@ -713,6 +732,15 @@
(src&#47;languages)
</small>
</li>
<li>
<a href='file/src/beautifiers/hindent.coffee.html'>
hindent.coffee
</a>
<small>
(src&#47;beautifiers)
</small>
</li>
</ul>
</ul>
<ul>

View File

@ -46,7 +46,7 @@
=
</dt>
<dd>
<pre><code class='coffeescript'>[&#39;uncrustify&#39;, &#39;autopep8&#39;, &#39;coffee-formatter&#39;, &#39;coffee-fmt&#39;, &#39;cljfmt&#39;, &#39;clang-format&#39;, &#39;crystal&#39;, &#39;dfmt&#39;, &#39;elm-format&#39;, &#39;htmlbeautifier&#39;, &#39;csscomb&#39;, &#39;gherkin&#39;, &#39;gofmt&#39;, &#39;latex-beautify&#39;, &#39;fortran-beautifier&#39;, &#39;js-beautify&#39;, &#39;jscs&#39;, &#39;lua-beautifier&#39;, &#39;ocp-indent&#39;, &#39;perltidy&#39;, &#39;php-cs-fixer&#39;, &#39;phpcbf&#39;, &#39;prettydiff&#39;, &#39;pug-beautify&#39;, &#39;puppet-fix&#39;, &#39;remark&#39;, &#39;rubocop&#39;, &#39;ruby-beautify&#39;, &#39;rustfmt&#39;, &#39;sass-convert&#39;, &#39;sqlformat&#39;, &#39;stylish-haskell&#39;, &#39;tidy-markdown&#39;, &#39;typescript-formatter&#39;, &#39;vue-beautifier&#39;, &#39;yapf&#39;, &#39;erl_tidy&#39;, &#39;marko-beautifier&#39;, &#39;formatR&#39;, &#39;beautysh&#39;]</code></pre>
<pre><code class='coffeescript'>[&#39;uncrustify&#39;, &#39;autopep8&#39;, &#39;brittany&#39;, &#39;coffee-formatter&#39;, &#39;coffee-fmt&#39;, &#39;cljfmt&#39;, &#39;clang-format&#39;, &#39;crystal&#39;, &#39;dfmt&#39;, &#39;elm-format&#39;, &#39;htmlbeautifier&#39;, &#39;csscomb&#39;, &#39;gherkin&#39;, &#39;gofmt&#39;, &#39;latex-beautify&#39;, &#39;fortran-beautifier&#39;, &#39;hindent&#39;, &#39;js-beautify&#39;, &#39;jscs&#39;, &#39;lua-beautifier&#39;, &#39;ocp-indent&#39;, &#39;perltidy&#39;, &#39;php-cs-fixer&#39;, &#39;phpcbf&#39;, &#39;prettydiff&#39;, &#39;pug-beautify&#39;, &#39;puppet-fix&#39;, &#39;remark&#39;, &#39;rubocop&#39;, &#39;ruby-beautify&#39;, &#39;rustfmt&#39;, &#39;sass-convert&#39;, &#39;sqlformat&#39;, &#39;stylish-haskell&#39;, &#39;tidy-markdown&#39;, &#39;typescript-formatter&#39;, &#39;vue-beautifier&#39;, &#39;yapf&#39;, &#39;erl_tidy&#39;, &#39;marko-beautifier&#39;, &#39;formatR&#39;, &#39;beautysh&#39;]</code></pre>
<div class='docstring'>
<p>List of beautifier names</p><p>To register a beautifier add its name here</p>
</div>

View File

@ -0,0 +1,204 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../javascript/application.js'></script>
<script src='../javascript/search.js'></script>
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../'></div>
<div id='header'>
<div id='menu'>
<a href='../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>Brittany</span>
</div>
</div>
<div id='content'>
<h1>
Class:
Brittany
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers&#47;brittany.coffee</td>
</tr>
<tr>
<td>Inherits:</td>
<td>
<a href='../class/Beautifier.html'>Beautifier</a>
</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='name-variable'>
name
=
</dt>
<dd>
<pre><code class='coffeescript'>&quot;brittany&quot;</code></pre>
</dd>
<dt id='link-variable'>
link
=
</dt>
<dd>
<pre><code class='coffeescript'>&quot;https:&#47;&#47;github.com&#47;lspitzner&#47;brittany&quot;</code></pre>
</dd>
<dt id='options-variable'>
options
=
</dt>
<dd>
<pre><code class='coffeescript'>{
Haskell: true
}</code></pre>
</dd>
</dl>
<h3 class='inherited'>
Variable inherited from
<a href='../class/Beautifier.html'>Beautifier</a>
</h3>
<p class='inherited'>
<a href='../class/Beautifier.html#Promise-variable'>Promise</a>
<a href='../class/Beautifier.html#name-variable'>name</a>
<a href='../class/Beautifier.html#options-variable'>options</a>
<a href='../class/Beautifier.html#languages-variable'>languages</a>
<a href='../class/Beautifier.html#beautify-variable'>beautify</a>
<a href='../class/Beautifier.html#_envCache-variable'>_envCache</a>
<a href='../class/Beautifier.html#_envCacheDate-variable'>_envCacheDate</a>
<a href='../class/Beautifier.html#_envCacheExpiry-variable'>_envCacheExpiry</a>
<a href='../class/Beautifier.html#logger-variable'>logger</a>
</p>
<h2>Instance Method Summary</h2>
<ul class='summary'>
<li>
<span class='signature'>
<a href='#beautify-dynamic'>
#
(void)
<b>beautify</b><span>(text, language, options)</span>
</a>
</span>
<span class='desc'>
</span>
</li>
</ul>
<h2>
<small>Inherited Method Summary</small>
<h3 class='inherited'>
Methods inherited from
<a href='../class/Beautifier.html'>Beautifier</a>
</h3>
<p class='inherited'>
<a href='../class/Beautifier.html#deprecate-dynamic'>#deprecate</a>
<a href='../class/Beautifier.html#tempFile-dynamic'>#tempFile</a>
<a href='../class/Beautifier.html#readFile-dynamic'>#readFile</a>
<a href='../class/Beautifier.html#findFile-dynamic'>#findFile</a>
<a href='../class/Beautifier.html#getShellEnvironment-dynamic'>#getShellEnvironment</a>
<a href='../class/Beautifier.html#which-dynamic'>#which</a>
<a href='../class/Beautifier.html#commandNotFoundError-dynamic'>#commandNotFoundError</a>
<a href='../class/Beautifier.html#run-dynamic'>#run</a>
<a href='../class/Beautifier.html#spawn-dynamic'>#spawn</a>
<a href='../class/Beautifier.html#setupLogger-dynamic'>#setupLogger</a>
</p>
</h2>
<h2>Instance Method Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='beautify-dynamic'>
#
(void)
<b>beautify</b><span>(text, language, options)</span>
<br>
</p>
</div>
</div>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,204 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../javascript/application.js'></script>
<script src='../javascript/search.js'></script>
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../'></div>
<div id='header'>
<div id='menu'>
<a href='../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>Hindent</span>
</div>
</div>
<div id='content'>
<h1>
Class:
Hindent
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers&#47;hindent.coffee</td>
</tr>
<tr>
<td>Inherits:</td>
<td>
<a href='../class/Beautifier.html'>Beautifier</a>
</td>
</tr>
</table>
<h2>Variables Summary</h2>
<dl class='constants'>
<dt id='name-variable'>
name
=
</dt>
<dd>
<pre><code class='coffeescript'>&quot;hindent&quot;</code></pre>
</dd>
<dt id='link-variable'>
link
=
</dt>
<dd>
<pre><code class='coffeescript'>&quot;https:&#47;&#47;github.com&#47;commercialhaskell&#47;hindent&quot;</code></pre>
</dd>
<dt id='options-variable'>
options
=
</dt>
<dd>
<pre><code class='coffeescript'>{
Haskell: true
}</code></pre>
</dd>
</dl>
<h3 class='inherited'>
Variable inherited from
<a href='../class/Beautifier.html'>Beautifier</a>
</h3>
<p class='inherited'>
<a href='../class/Beautifier.html#Promise-variable'>Promise</a>
<a href='../class/Beautifier.html#name-variable'>name</a>
<a href='../class/Beautifier.html#options-variable'>options</a>
<a href='../class/Beautifier.html#languages-variable'>languages</a>
<a href='../class/Beautifier.html#beautify-variable'>beautify</a>
<a href='../class/Beautifier.html#_envCache-variable'>_envCache</a>
<a href='../class/Beautifier.html#_envCacheDate-variable'>_envCacheDate</a>
<a href='../class/Beautifier.html#_envCacheExpiry-variable'>_envCacheExpiry</a>
<a href='../class/Beautifier.html#logger-variable'>logger</a>
</p>
<h2>Instance Method Summary</h2>
<ul class='summary'>
<li>
<span class='signature'>
<a href='#beautify-dynamic'>
#
(void)
<b>beautify</b><span>(text, language, options)</span>
</a>
</span>
<span class='desc'>
</span>
</li>
</ul>
<h2>
<small>Inherited Method Summary</small>
<h3 class='inherited'>
Methods inherited from
<a href='../class/Beautifier.html'>Beautifier</a>
</h3>
<p class='inherited'>
<a href='../class/Beautifier.html#deprecate-dynamic'>#deprecate</a>
<a href='../class/Beautifier.html#tempFile-dynamic'>#tempFile</a>
<a href='../class/Beautifier.html#readFile-dynamic'>#readFile</a>
<a href='../class/Beautifier.html#findFile-dynamic'>#findFile</a>
<a href='../class/Beautifier.html#getShellEnvironment-dynamic'>#getShellEnvironment</a>
<a href='../class/Beautifier.html#which-dynamic'>#which</a>
<a href='../class/Beautifier.html#commandNotFoundError-dynamic'>#commandNotFoundError</a>
<a href='../class/Beautifier.html#run-dynamic'>#run</a>
<a href='../class/Beautifier.html#spawn-dynamic'>#spawn</a>
<a href='../class/Beautifier.html#setupLogger-dynamic'>#setupLogger</a>
</p>
</h2>
<h2>Instance Method Details</h2>
<div class='methods'>
<div class='method_details'>
<p class='signature' id='beautify-dynamic'>
#
(void)
<b>beautify</b><span>(text, language, options)</span>
<br>
</p>
</div>
</div>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,123 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../../../javascript/application.js'></script>
<script src='../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>src</span>
&raquo;
<span class='title'>beautifiers</span>
&raquo;
<span class='title'>brittany.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
brittany.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers</td>
</tr>
<tr>
<td>
Classes:
</td>
<td>
<a href='../../../class/Brittany.html'>
StylishHaskell
</a>
</td>
</tr>
</table>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -0,0 +1,123 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<title>Atom-Beautify Documentation</title>
<script src='../../../javascript/application.js'></script>
<script src='../../../javascript/search.js'></script>
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
</head>
<body>
<div id='base' data-path='../../../'></div>
<div id='header'>
<div id='menu'>
<a href='../../../extra/README.md.html' title='Atom-Beautify'>
Atom-Beautify
</a>
&raquo;
<a href='../../../alphabetical_index.html' title='Index'>
Index
</a>
&raquo;
<span class='title'>src</span>
&raquo;
<span class='title'>beautifiers</span>
&raquo;
<span class='title'>hindent.coffee</span>
</div>
</div>
<div id='content'>
<h1>
File:
hindent.coffee
</h1>
<table class='box'>
<tr>
<td>Defined in:</td>
<td>src&#47;beautifiers</td>
</tr>
<tr>
<td>
Classes:
</td>
<td>
<a href='../../../class/Hindent.html'>
StylishHaskell
</a>
</td>
</tr>
</table>
</div>
<div id='footer'>
By
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo
</a>
2.1.2
&#10034;
Press H to see the keyboard shortcuts
&#10034;
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
&#10034;
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
</div>
<iframe id='search_frame'></iframe>
<div id='fuzzySearch'>
<input type='text'>
<ol></ol>
</div>
<div id='help'>
<p>
Quickly fuzzy find classes, mixins, methods, file:
</p>
<ul>
<li>
<span>T</span>
Open fuzzy finder dialog
</li>
</ul>
<p>
Control the navigation frame:
</p>
<ul>
<li>
<span>L</span>
Toggle list view
</li>
<li>
<span>C</span>
Show class list
</li>
<li>
<span>I</span>
Show mixin list
</li>
<li>
<span>F</span>
Show file list
</li>
<li>
<span>M</span>
Show method list
</li>
<li>
<span>E</span>
Show extras list
</li>
</ul>
<p>
You can focus and blur the search input:
</p>
<ul>
<li>
<span>S</span>
Focus search input
</li>
<li>
<span>Esc</span>
Blur search input
</li>
</ul>
</div>
</body>
</html>

View File

@ -65,6 +65,14 @@
src&#47;beautifiers
</small>
</li>
<li>
<a href='file/src/beautifiers/brittany.coffee.html' target='main'>
brittany.coffee
</a>
<small class='namespace'>
src&#47;beautifiers
</small>
</li>
<li>
<a href='file/src/beautifiers/clang-format.coffee.html' target='main'>
clang-format.coffee
@ -193,6 +201,14 @@
src&#47;beautifiers
</small>
</li>
<li>
<a href='file/src/beautifiers/hindent.coffee.html' target='main'>
hindent.coffee
</a>
<small class='namespace'>
src&#47;beautifiers
</small>
</li>
<li>
<a href='file/src/beautifiers/htmlbeautifier.coffee.html' target='main'>
htmlbeautifier.coffee

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
{-# LANGUAGE Wat #-}
import Bar
import Foo
import qualified Baz as Bang
data Person = Person {
name :: String,
address :: String
}

View File

@ -0,0 +1,33 @@
{-# LANGUAGE OverloadedStrings #-}
module TypeFun where
import Foo
import Bar
import qualified Baz as Bang
import Data.Typeable
data Person = Person {
name :: String,
address :: String
}
main :: IO ()
main = do
doSomethingOnType 'c'
doSomethingOnType (35 :: Integer)
doSomethingOnType "a string"
doSomethingOnType :: Typeable a => a -> IO ()
doSomethingOnType a = case show (typeOf a) of
"Char" -> print $ performActionOnChar a
"Integer" -> print $ performActionOnInt a
_ -> print "undefined!"
performActionOnChar :: Typeable a => a -> String
performActionOnChar a = case cast a :: Maybe Char of
Just c -> "Concatenating with string: " ++ [c]
Nothing -> "Cast went wrong..."
performActionOnInt :: Typeable a => a -> String
performActionOnInt a = case cast a :: Maybe Integer of
Just i -> "Concatenating with string: " ++ show (i + 10)
Nothing -> "Cast went wrong..."

View File

@ -0,0 +1,38 @@
{-# LANGUAGE OverloadedStrings #-}
module TypeFun where
import Bar
import qualified Baz as Bang
import Data.Typeable
import Foo
data Person = Person
{ name :: String
, address :: String
}
main :: IO ()
main = do
doSomethingOnType 'c'
doSomethingOnType (35 :: Integer)
doSomethingOnType "a string"
doSomethingOnType :: Typeable a => a -> IO ()
doSomethingOnType a =
case show (typeOf a) of
"Char" -> print $ performActionOnChar a
"Integer" -> print $ performActionOnInt a
_ -> print "undefined!"
performActionOnChar :: Typeable a => a -> String
performActionOnChar a =
case cast a :: Maybe Char of
Just c -> "Concatenating with string: " ++ [c]
Nothing -> "Cast went wrong..."
performActionOnInt :: Typeable a => a -> String
performActionOnInt a =
case cast a :: Maybe Integer of
Just i -> "Concatenating with string: " ++ show (i + 10)
Nothing -> "Cast went wrong..."

View File

@ -0,0 +1,36 @@
{-# LANGUAGE OverloadedStrings #-}
module TypeFun where
import Bar
import qualified Baz as Bang
import Data.Typeable
import Foo
data Person = Person {
name :: String,
address :: String
}
main :: IO ()
main = do
doSomethingOnType 'c'
doSomethingOnType (35 :: Integer)
doSomethingOnType "a string"
doSomethingOnType :: Typeable a => a -> IO ()
doSomethingOnType a =
case show (typeOf a) of
"Char" -> print $ performActionOnChar a
"Integer" -> print $ performActionOnInt a
_ -> print "undefined!"
performActionOnChar :: Typeable a => a -> String
performActionOnChar a =
case cast a :: Maybe Char of
Just c -> "Concatenating with string: " ++ [c]
Nothing -> "Cast went wrong..."
performActionOnInt :: Typeable a => a -> String
performActionOnInt a =
case cast a :: Maybe Integer of
Just i -> "Concatenating with string: " ++ show (i + 10)
Nothing -> "Cast went wrong..."

View File

@ -1,10 +1,36 @@
{-# LANGUAGE Wat #-}
{-# LANGUAGE OverloadedStrings #-}
module TypeFun where
import Foo
import Bar
import qualified Baz as Bang
import Data.Typeable
data Person = Person {
name :: String,
address :: String
}
main :: IO ()
main = do
doSomethingOnType 'c'
doSomethingOnType (35 :: Integer)
doSomethingOnType "a string"
doSomethingOnType :: Typeable a => a -> IO ()
doSomethingOnType a =
case show (typeOf a) of
"Char" -> print $ performActionOnChar a
"Integer" -> print $ performActionOnInt a
_ -> print "undefined!"
performActionOnChar :: Typeable a => a -> String
performActionOnChar a =
case cast a :: Maybe Char of
Just c -> "Concatenating with string: " ++ [c]
Nothing -> "Cast went wrong..."
performActionOnInt :: Typeable a => a -> String
performActionOnInt a =
case cast a :: Maybe Integer of
Just i -> "Concatenating with string: " ++ show (i + 10)
Nothing -> "Cast went wrong..."

View File

@ -0,0 +1,12 @@
class Test extends React.Component<Foo> {
render() {
return (
<div className="class">
<h2 className="anotherClass">
{this.foo.bar}
</h2>
{this.foo.bar.children}
</div>
);
}
}

View File

@ -0,0 +1,12 @@
class Test extends React.Component<Foo> {
render() {
return (
<div className="class">
<h2 className= "anotherClass">
{this.foo.bar}
</h2>
{this.foo.bar.children}
</div>
);
}
}

View File

@ -1,12 +1,12 @@
{
"name": "atom-beautify",
"main": "./src/beautify",
"version": "0.30.6",
"version": "0.30.9",
"private": true,
"description": "Beautify HTML, CSS, JavaScript, PHP, Python, Ruby, Java, C, C++, C#, Objective-C, CoffeeScript, TypeScript, Coldfusion, SQL, and more in Atom",
"repository": {
"type": "git",
"url": "https://github.com/Glavin001/atom-beautify"
"url": "git@github.com:Glavin001/atom-beautify.git"
},
"bugs": {
"url": "https://github.com/Glavin001/atom-beautify/issues"
@ -150,55 +150,65 @@
{
"name": "Steven Zeck",
"url": "https://github.com/szeck87"
},
{
"name": "Christian Kjær Laustsen",
"email": "ckl@codetalk.io",
"url": "https://github.com/Tehnix"
},
{
"name": "Faheel Ahmad",
"url": "https://github.com/faheel"
}
],
"engines": {
"atom": ">=1.6.0 <2.0.0"
"atom": ">=1.21.0 <2.0.0"
},
"dependencies": {
"align-yaml": "^0.1.8",
"async": "^2.4.1",
"async": "^2.6.0",
"atom-message-panel": "^1.3.0",
"atom-space-pen-views": "^2.2.0",
"bluebird": "^3.5.0",
"bluebird": "^3.5.1",
"coffee-fmt": "^0.12.0",
"coffee-formatter": "^0.1.2",
"coffee-script": "^1.12.6",
"csscomb": "^4.2.0",
"diff": "^3.2.0",
"editorconfig": "^0.13.2",
"eslint": "^4.0.0",
"event-kit": "^2.3.0",
"diff": "^3.4.0",
"editorconfig": "^0.15.0",
"eslint": "^4.16.0",
"event-kit": "^2.4.0",
"expand-home-dir": "0.0.3",
"extend": "^3.0.1",
"gherkin": "^2.12.2",
"handlebars": "^4.0.10",
"js-beautify": "^1.6.14",
"handlebars": "^4.0.11",
"js-beautify": "^1.7.5",
"jscs": "^3.0.7",
"lodash": "^4.17.4",
"loophole": "^1.1.0",
"marko-prettyprint": "^1.3.6",
"marko-prettyprint": "^1.4.0",
"nginxbeautify": "^2.0.1",
"node-cljfmt": "0.5.3",
"node-dir": "0.1.17",
"node-uuid": "1.4.8",
"open": "0.0.5",
"prettier": "^1.10.2",
"prettydiff2": "^2.2.7",
"pug-beautify": "^0.1.1",
"remark": "6.0.1",
"season": "6.0.0",
"semver": "^5.3.0",
"season": "^6.0.2",
"semver": "^5.5.0",
"shell-env": "^0.3.0",
"space-pen": "5.1.2",
"strip-json-comments": "^2.0.1",
"temp": "^0.8.3",
"tidy-markdown": "2.0.3",
"typescript": "2.4.1",
"typescript-formatter": "5.2.0",
"tidy-markdown": "2.0.4",
"typescript": "^2.6.2",
"typescript-formatter": "^7.0.0",
"underscore-plus": "^1.6.6",
"universal-analytics": "0.4.13",
"which": "1.2.14",
"winston": "2.3.1",
"universal-analytics": "^0.4.16",
"which": "^1.3.0",
"winston": "^2.4.0",
"yaml-front-matter": "3.4.0"
},
"activationHooks": [
@ -277,7 +287,8 @@
"atom-beautify:beautify-language-xml",
"atom-beautify:beautify-language-xtemplate",
"atom-beautify:beautify-language-yaml",
"atom-beautify:beautify-language-terraform"
"atom-beautify:beautify-language-terraform",
"atom-beautify:beautify-language-tsx"
],
".tree-view .file .name": [
"atom-beautify:beautify-file"
@ -342,6 +353,8 @@
"gherkin",
"fortran",
"haskell",
"hindent",
"brittany",
"jade",
"jsx",
"latex",
@ -412,7 +425,9 @@
"align-yaml",
"goimports",
"terraform",
"terraformfmt"
"terraformfmt",
"tsx",
"prettier"
],
"devDependencies": {
"coffeelint": "1.16.0"

9
packages.config Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="atom" />
<package id="emacs" />
<package id="terraform" />
<package id="composer" />
<!--package id="uncrustify" /-->
</packages>
</xml>

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
autopep8
isort
sqlparse
beautysh

View File

@ -54,6 +54,7 @@ describe "BeautifyLanguages", ->
dependentPackages = [
'autocomplete-plus'
'fuse'
'react'
# 'linter'
# 'atom-typescript' # it logs too much...
]

View File

@ -0,0 +1,24 @@
###
Requires https://github.com/lspitzner/brittany
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Brittany extends Beautifier
name: "brittany"
link: "https://github.com/lspitzner/brittany"
isPreInstalled: false
options: {
Haskell: false
}
beautify: (text, language, options) ->
@run("brittany", [
@tempFile("input", text)
], {
help: {
link: "https://github.com/lspitzner/brittany"
}
})

View File

@ -7,7 +7,7 @@ module.exports = class CoffeeFormatter extends Beautifier
link: "https://github.com/Glavin001/Coffee-Formatter"
options: {
CoffeeScript: true
CoffeeScript: false
}
beautify: (text, language, options) ->

View File

@ -0,0 +1,27 @@
###
Requires https://github.com/commercialhaskell/hindent
###
"use strict"
Beautifier = require('./beautifier')
module.exports = class Hindent extends Beautifier
name: "hindent"
link: "https://github.com/commercialhaskell/hindent"
isPreInstalled: false
options: {
Haskell: false
}
beautify: (text, language, options) ->
@run("hindent", [
tempFile = @tempFile("temp", text)
], {
help: {
link: "https://github.com/commercialhaskell/hindent"
}
})
.then(=>
@readFile(tempFile)
)

View File

@ -37,6 +37,7 @@ module.exports = class Beautifiers extends EventEmitter
'uncrustify'
'align-yaml'
'autopep8'
'brittany'
'coffee-formatter'
'coffee-fmt'
'cljfmt'
@ -52,6 +53,7 @@ module.exports = class Beautifiers extends EventEmitter
'goimports'
'latex-beautify'
'fortran-beautifier'
'hindent'
'js-beautify'
'jscs'
'eslint'
@ -61,6 +63,7 @@ module.exports = class Beautifiers extends EventEmitter
'perltidy'
'php-cs-fixer'
'phpcbf'
'prettier'
'prettydiff'
'pybeautifier'
'pug-beautify'

View File

@ -8,7 +8,24 @@ Beautifier = require('./beautifier')
module.exports = class OCPIndent extends Beautifier
name: "ocp-indent"
link: "https://www.typerex.org/ocp-indent.html"
isPreInstalled: false
executables: [
{
name: "ocp-indent"
cmd: "ocp-indent"
homepage: "https://www.typerex.org/ocp-indent.html"
installation: "https://www.typerex.org/ocp-indent.html#installation"
version: {
parse: (text) ->
try
text.match(/(\d+\.\d+\.\d+)/)[1]
catch
text.match(/(\d+\.\d+)/)[1] + ".0"
}
docker: {
image: "unibeautify/ocp-indent"
}
}
]
options: {
OCaml: true

View File

@ -0,0 +1,47 @@
"use strict"
Beautifier = require('./beautifier')
prettier = require("prettier")
path = require("path")
module.exports = class Prettier extends Beautifier
name: "Prettier"
link: "https://github.com/prettier/prettier"
options: {
_:
tabWidth: "indent_size"
useTabs: ["indent_with_tabs", "indent_char", (indent_with_tabs, indent_char) ->
return (indent_with_tabs is true) or (indent_char is "\t")
]
JavaScript:
bracketSpacing: "object_curly_spacing"
TypeScript: false
CSS: false
LESS: false
SCSS: false
Vue: false
JSON: false
Markdown: false
}
beautify: (text, language, options, context) ->
return new @Promise((resolve, reject) ->
_ = require('lodash')
prettierLanguage = _.find(prettier.getSupportInfo().languages, 'name': language)
if prettierLanguage
parser = prettierLanguage.parsers[0]
else
reject(new Error("Unknown language for Prettier"))
filePath = context.filePath and path.dirname context.filePath
try
prettier.resolveConfig(filePath).then((configOptions) ->
result = prettier.format(text, configOptions or options, parser)
prettier.clearConfigCache()
resolve result
)
catch err
reject(err)
)

View File

@ -8,21 +8,28 @@ module.exports = class PuppetFix extends Beautifier
# this is what displays as your Default Beautifier in Language Config
name: "puppet-lint"
link: "http://puppet-lint.com/"
isPreInstalled: false
options: {
Puppet: true
}
cli: (options) ->
if not options.puppet_path?
return new Error("'puppet-lint' path is not set!" +
" Please set this in the Atom Beautify package settings.")
else
return options.puppet_path
executables: [
{
name: "puppet-lint"
cmd: "puppet-lint"
homepage: "http://puppet-lint.com/"
installation: "http://puppet-lint.com/"
version: {
parse: (text) -> text.match(/puppet-lint (\d+\.\d+\.\d+)/)[1]
}
docker: {
image: "unibeautify/puppet-lint"
}
}
]
beautify: (text, language, options) ->
@run("puppet-lint", [
@exe("puppet-lint").run([
'--fix'
tempFile = @tempFile("input", text)
], {

View File

@ -14,7 +14,7 @@ MULTI_LINE_OUTPUT_TABLE = {
'NOQA': 6
}
format = (data, formaters) ->
format = (data, formatters) ->
return new Promise (resolve, reject) ->
client = new net.Socket()
client.on 'error', (error) ->
@ -22,7 +22,7 @@ format = (data, formaters) ->
reject(error)
client.connect PORT, HOST, ->
client.setEncoding('utf8')
client.write(JSON.stringify({'data': data, 'formaters': formaters}))
client.write(JSON.stringify({'data': data, 'formatters': formatters}))
response = ''
client.on 'data', (chunk) ->
response += chunk
@ -45,22 +45,22 @@ module.exports = class PythonBeautifier extends Beautifier
}
beautify: (text, language, options) ->
formater = {'name': options.formater}
if options.formater == 'autopep8'
formater.config = {
formatter = {'name': options.formatter}
if options.formatter == 'autopep8'
formatter.config = {
'ignore': options.ignore
'max_line_length': options.max_line_length
}
else if options.formater == 'yapf'
formater.config = {'style_config': options.style_config}
formaters = [formater]
else if options.formatter == 'yapf'
formatter.config = {'style_config': options.style_config}
formatters = [formatter]
if options.sort_imports
multi_line_output = MULTI_LINE_OUTPUT_TABLE[options.multi_line_output]
formaters.push
formatters.push
'name': 'isort'
'config': {'multi_line_output': multi_line_output}
return new @Promise (resolve, reject) ->
format(text, formaters)
format(text, formatters)
.then (data) ->
resolve(data)
.catch (error) ->

View File

@ -4,6 +4,7 @@ Requires https://github.com/bbatsov/rubocop
"use strict"
Beautifier = require('./beautifier')
path = require('path')
module.exports = class Rubocop extends Beautifier
name: "Rubocop"
@ -16,53 +17,50 @@ module.exports = class Rubocop extends Beautifier
rubocop_path: true
}
beautify: (text, language, options) ->
beautify: (text, language, options, context) ->
fullPath = context.filePath or ""
[projectPath, _relativePath] = atom.project.relativizePath(fullPath)
# Find the rubocop path
@Promise.all([
@which(options.rubocop_path) if options.rubocop_path
@which('rubocop')
]).then((paths) =>
])
.then((paths) =>
@debug('rubocop paths', paths)
_ = require 'lodash'
path = require 'path'
# Get first valid, absolute path
rubocopPath = _.find(paths, (p) -> p and path.isAbsolute(p) )
rubocopPath = paths.find((p) -> p and path.isAbsolute(p)) or "rubocop"
@verbose('rubocopPath', rubocopPath)
@debug('rubocopPath', rubocopPath, paths)
configFile = path.join(atom.project.getPaths()[0], ".rubocop.yml")
fs = require 'fs'
if fs.existsSync(configFile)
@debug("rubocop", config, fs.readFileSync(configFile, 'utf8'))
else
# Find or generate a config file if non exists
configFile = @findFile(path.dirname(fullPath), ".rubocop.yml")
if !configFile?
yaml = require("yaml-front-matter")
# Generate config file
config = {
"Style/IndentationWidth":
"Width": options.indent_size
}
tempConfig = @tempFile("rubocop-config", yaml.safeDump(config))
configFile = @tempFile("rubocop-config", yaml.safeDump(config))
@debug("rubocop", config, configFile)
rubocopArguments = [
"--auto-correct"
"--force-exclusion"
"--stdin", "atom-beautify.rb" # filename is required but not used
]
rubocopArguments.push("--config", tempConfig) if tempConfig?
@debug("rubocop arguments", rubocopArguments)
# Check if PHP-CS-Fixer path was found
if rubocopPath?
@run(rubocopPath, [
"--auto-correct"
"--config", configFile
tempFile = @tempFile("temp", text, '.rb')
], {ignoreReturnCode: true})
.then(=>
@readFile(tempFile)
)
else
@run("rubocop", [
"--auto-correct"
"--config", configFile
tempFile = @tempFile("temp", text, '.rb')
], {ignoreReturnCode: true})
.then(=>
@readFile(tempFile)
)
)
@run(rubocopPath, rubocopArguments, {
ignoreReturnCode: true,
cwd: projectPath,
onStdin: (stdin) -> stdin.end text
}).then((stdout) =>
@debug("rubocop output", stdout)
# Rubocop output an error if stdout is empty
return text if stdout.length == 0
result = stdout.split("====================\n")
result[result.length - 1]
)
)

View File

@ -17,7 +17,7 @@ module.exports = class Sqlformat extends Beautifier
beautify: (text, language, options) ->
@run("sqlformat", [
@tempFile("input", text)
"--reindent"
"--reindent=#{options.reindent}" if options.reindent?
"--indent_width=#{options.indent_size}" if options.indent_size?
"--keywords=#{options.keywords}" if (options.keywords? && options.keywords != 'unchanged')
"--identifiers=#{options.identifiers}" if (options.identifiers? && options.identifiers != 'unchanged')

View File

@ -5,14 +5,21 @@ module.exports = class TypeScriptFormatter extends Beautifier
name: "TypeScript Formatter"
link: "https://github.com/vvakame/typescript-formatter"
options: {
TypeScript: true
TypeScript:
indent_with_tabs: true
tab_width: true
indent_size: true
TSX:
indent_with_tabs: true
tab_width: true
indent_size: true
}
beautify: (text, language, options) ->
return new @Promise((resolve, reject) =>
try
format = require("typescript-formatter/lib/formatter").default
format = require("typescript-formatter/lib/formatter").format
formatterUtils = require("typescript-formatter/lib/utils")
# @verbose('format', format, formatterUtils)
@ -25,8 +32,13 @@ module.exports = class TypeScriptFormatter extends Beautifier
opts.indentSize = options.indent_size
opts.indentStyle = 'space'
if language is "TSX"
fileName = 'test.tsx'
else
fileName = ''
@verbose('typescript', text, opts)
result = format('', text, opts)
result = format(fileName, text, opts)
@verbose(result)
resolve result
catch e

View File

@ -96,9 +96,10 @@ beautify = ({ editor, onSave, language }) ->
if not text?
# Do nothing, is undefined
# console.log 'beautifyCompleted'
return resolve(text)
else if text instanceof Error
showError(text)
return reject(text)
return resolve(text)
else if typeof text is "string"
if oldText isnt text
@ -127,15 +128,18 @@ beautify = ({ editor, onSave, language }) ->
# otherwise setScrollTop is not working, probably because the cursor
# addition happens asynchronously
setTimeout ( ->
# console.log "setScrollTop"
setScrollTop editor, origScrollTop
return resolve(text)
), 0
else
return setTimeout(() ->
resolve(text)
, 0)
else
error = new Error("Unsupported beautification result '#{text}'.")
showError(error)
return reject(error)
return resolve(text)
# else
# console.log "Already Beautiful!"
@ -506,20 +510,17 @@ debug = () ->
handleSaveEvent = ->
atom.workspace.observeTextEditors (editor) ->
pendingPaths = {}
beautifyOnSaveHandler = ({path: filePath}) ->
logger.verbose('Should beautify on this save?')
if pendingPaths[filePath]
logger.verbose("Editor with file path #{filePath} already beautified!")
return
buffer = editor.getBuffer()
path ?= require('path')
# Get Grammar
grammar = editor.getGrammar().name
# Get file extension
fileExtension = path.extname(filePath)
# Remove prefix "." (period) in fileExtension
fileExtension = fileExtension.substr(1)
# Set path of buffer for unsaved files
if editor.getPath() is undefined
editor.getBuffer().setPath(filePath)
# Get Grammar from the editor
grammar = editor.getGrammar().name
# Get language
languages = beautifier.languages.getLanguages({grammar, extension: fileExtension})
if languages.length < 1
@ -535,23 +536,11 @@ handleSaveEvent = ->
beautify({editor, onSave: true})
.then(() ->
logger.verbose('Done beautifying file', filePath)
if editor.isAlive() is true
logger.verbose('Saving TextEditor...')
# Store the filePath to prevent infinite looping
# When Whitespace package has option "Ensure Single Trailing Newline" enabled
# It will add a newline and keep the file from converging on a beautified form
# and saving without emitting onDidSave event, because there were no changes.
pendingPaths[filePath] = true
Promise.resolve(editor.save()).then(() ->
delete pendingPaths[filePath]
logger.verbose('Saved TextEditor.')
)
)
.catch((error) ->
return showError(error)
)
disposable = editor.onDidSave(({path : filePath}) ->
# TODO: Implement debouncing
disposable = editor.getBuffer().onWillSave(({path: filePath}) ->
beautifyOnSaveHandler({path: filePath})
)
plugin.subscriptions.add disposable

View File

@ -17,6 +17,8 @@ module.exports = {
"hs"
]
defaultBeautifier: "stylish-haskell"
options: []
}

View File

@ -68,6 +68,7 @@ module.exports = class Languages
"svg"
"swig"
"tss"
"tsx"
"twig"
"typescript"
"ux_markup"

View File

@ -108,5 +108,9 @@ module.exports = {
default: "System Default"
enum: ["CRLF","LF","System Default"]
description: "Override EOL from line-ending-selector"
object_curly_spacing:
type: 'boolean'
default: false
description: "Insert spaces between brackets in object literals"
}

View File

@ -35,7 +35,7 @@ module.exports = {
items:
type: 'string'
description: "do not fix these errors/warnings"
formater:
formatter:
type: 'string'
default: 'autopep8'
enum: ['autopep8', 'yapf']

View File

@ -26,6 +26,10 @@ module.exports = {
default: null
minimum: 0
description: "Indentation size/length"
reindent:
type: 'boolean'
default: true
description: "Change indentations of the statements. Uncheck this option to preserve indentation"
keywords:
type: 'string'
default: "upper"

21
src/languages/tsx.coffee Normal file
View File

@ -0,0 +1,21 @@
module.exports = {
name: "TSX"
namespace: "tsx"
fallback: ['js']
###
Supported Grammars
###
grammars: [
"TypeScriptReact"
]
###
Supported extensions
###
extensions: [
"tsx"
]
}

View File

@ -18,4 +18,6 @@ module.exports = {
"ts"
]
defaultBeautifier: "TypeScript Formatter"
}

View File

@ -350,10 +350,9 @@
"type": "integer",
"default": null,
"minimum": 0,
"description": "Indentation size/length (Supported by Coffee Formatter, coffee-fmt)",
"description": "Indentation size/length (Supported by coffee-fmt)",
"title": "Indent size",
"beautifiers": [
"Coffee Formatter",
"coffee-fmt"
],
"key": "indent_size",
@ -365,10 +364,9 @@
"indent_char": {
"type": "string",
"default": null,
"description": "Indentation character (Supported by Coffee Formatter, coffee-fmt)",
"description": "Indentation character (Supported by coffee-fmt)",
"title": "Indent char",
"beautifiers": [
"Coffee Formatter",
"coffee-fmt"
],
"key": "indent_char",
@ -377,27 +375,12 @@
"namespace": "js"
}
},
"indent_level": {
"type": "integer",
"default": 0,
"description": "Initial indentation level (Supported by Coffee Formatter)",
"title": "Indent level",
"beautifiers": [
"Coffee Formatter"
],
"key": "indent_level",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"indent_with_tabs": {
"type": "boolean",
"default": null,
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by Coffee Formatter, coffee-fmt)",
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by coffee-fmt)",
"title": "Indent with tabs",
"beautifiers": [
"Coffee Formatter",
"coffee-fmt"
],
"key": "indent_with_tabs",
@ -406,242 +389,6 @@
"namespace": "js"
}
},
"preserve_newlines": {
"type": "boolean",
"default": true,
"description": "Preserve line-breaks (Supported by Coffee Formatter)",
"title": "Preserve newlines",
"beautifiers": [
"Coffee Formatter"
],
"key": "preserve_newlines",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"max_preserve_newlines": {
"type": "integer",
"default": 10,
"description": "Number of line-breaks to be preserved in one chunk (Supported by Coffee Formatter)",
"title": "Max preserve newlines",
"beautifiers": [
"Coffee Formatter"
],
"key": "max_preserve_newlines",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"space_in_paren": {
"type": "boolean",
"default": false,
"description": "Add padding spaces within paren, ie. f( a, b ) (Supported by Coffee Formatter)",
"title": "Space in paren",
"beautifiers": [
"Coffee Formatter"
],
"key": "space_in_paren",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"jslint_happy": {
"type": "boolean",
"default": false,
"description": "Enable jslint-stricter mode (Supported by Coffee Formatter)",
"title": "Jslint happy",
"beautifiers": [
"Coffee Formatter"
],
"key": "jslint_happy",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"space_after_anon_function": {
"type": "boolean",
"default": false,
"description": "Add a space before an anonymous function's parens, ie. function () (Supported by Coffee Formatter)",
"title": "Space after anon function",
"beautifiers": [
"Coffee Formatter"
],
"key": "space_after_anon_function",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"brace_style": {
"type": "string",
"default": "collapse",
"enum": [
"collapse",
"collapse-preserve-inline",
"expand",
"end-expand",
"none"
],
"description": "[collapse|collapse-preserve-inline|expand|end-expand|none] (Supported by Coffee Formatter)",
"title": "Brace style",
"beautifiers": [
"Coffee Formatter"
],
"key": "brace_style",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"break_chained_methods": {
"type": "boolean",
"default": false,
"description": "Break chained method calls across subsequent lines (Supported by Coffee Formatter)",
"title": "Break chained methods",
"beautifiers": [
"Coffee Formatter"
],
"key": "break_chained_methods",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"keep_array_indentation": {
"type": "boolean",
"default": false,
"description": "Preserve array indentation (Supported by Coffee Formatter)",
"title": "Keep array indentation",
"beautifiers": [
"Coffee Formatter"
],
"key": "keep_array_indentation",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"keep_function_indentation": {
"type": "boolean",
"default": false,
"description": " (Supported by Coffee Formatter)",
"title": "Keep function indentation",
"beautifiers": [
"Coffee Formatter"
],
"key": "keep_function_indentation",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"space_before_conditional": {
"type": "boolean",
"default": true,
"description": " (Supported by Coffee Formatter)",
"title": "Space before conditional",
"beautifiers": [
"Coffee Formatter"
],
"key": "space_before_conditional",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"eval_code": {
"type": "boolean",
"default": false,
"description": " (Supported by Coffee Formatter)",
"title": "Eval code",
"beautifiers": [
"Coffee Formatter"
],
"key": "eval_code",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"unescape_strings": {
"type": "boolean",
"default": false,
"description": "Decode printable characters encoded in xNN notation (Supported by Coffee Formatter)",
"title": "Unescape strings",
"beautifiers": [
"Coffee Formatter"
],
"key": "unescape_strings",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"wrap_line_length": {
"type": "integer",
"default": 0,
"description": "Wrap lines at next opportunity after N characters (Supported by Coffee Formatter)",
"title": "Wrap line length",
"beautifiers": [
"Coffee Formatter"
],
"key": "wrap_line_length",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"end_with_newline": {
"type": "boolean",
"default": false,
"description": "End output with newline (Supported by Coffee Formatter)",
"title": "End with newline",
"beautifiers": [
"Coffee Formatter"
],
"key": "end_with_newline",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"end_with_comma": {
"type": "boolean",
"default": false,
"description": "If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by Coffee Formatter)",
"title": "End with comma",
"beautifiers": [
"Coffee Formatter"
],
"key": "end_with_comma",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"end_of_line": {
"type": "string",
"default": "System Default",
"enum": [
"CRLF",
"LF",
"System Default"
],
"description": "Override EOL from line-ending-selector (Supported by Coffee Formatter)",
"title": "End of line",
"beautifiers": [
"Coffee Formatter"
],
"key": "end_of_line",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"disabled": {
"title": "Disable Beautifying Language",
"order": -3,
@ -893,6 +640,7 @@
"beautifiers": [
"CSScomb",
"JS Beautify",
"Prettier",
"Pretty Diff",
"SassConvert"
],
@ -1132,6 +880,7 @@
"enum": [
"CSScomb",
"JS Beautify",
"Prettier",
"Pretty Diff",
"SassConvert"
]
@ -1563,6 +1312,20 @@
"namespace": "js"
}
},
"object_curly_spacing": {
"type": "boolean",
"default": false,
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify)",
"title": "Object curly spacing",
"beautifiers": [
"JS Beautify"
],
"key": "object_curly_spacing",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"indent_inner_html": {
"type": "boolean",
"default": false,
@ -2632,6 +2395,8 @@
"description": "Options for language Haskell",
"collapsed": true,
"beautifiers": [
"brittany",
"hindent",
"stylish-haskell"
],
"grammars": [
@ -2655,6 +2420,8 @@
"default": "stylish-haskell",
"description": "Default Beautifier to be used for Haskell",
"enum": [
"brittany",
"hindent",
"stylish-haskell"
]
},
@ -3139,6 +2906,7 @@
"JS Beautify",
"JSCS Fixer",
"ESLint Fixer",
"Prettier",
"Pretty Diff"
],
"grammars": [
@ -3152,10 +2920,11 @@
"type": "integer",
"default": null,
"minimum": 0,
"description": "Indentation size/length (Supported by JS Beautify, Pretty Diff)",
"description": "Indentation size/length (Supported by JS Beautify, Prettier, Pretty Diff)",
"title": "Indent size",
"beautifiers": [
"JS Beautify",
"Prettier",
"Pretty Diff"
],
"key": "indent_size",
@ -3167,10 +2936,11 @@
"indent_char": {
"type": "string",
"default": null,
"description": "Indentation character (Supported by JS Beautify, Pretty Diff)",
"description": "Indentation character (Supported by JS Beautify, Prettier, Pretty Diff)",
"title": "Indent char",
"beautifiers": [
"JS Beautify",
"Prettier",
"Pretty Diff"
],
"key": "indent_char",
@ -3196,10 +2966,11 @@
"indent_with_tabs": {
"type": "boolean",
"default": null,
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Pretty Diff)",
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Prettier, Pretty Diff)",
"title": "Indent with tabs",
"beautifiers": [
"JS Beautify",
"Prettier",
"Pretty Diff"
],
"key": "indent_with_tabs",
@ -3450,6 +3221,21 @@
"namespace": "js"
}
},
"object_curly_spacing": {
"type": "boolean",
"default": false,
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify, Prettier)",
"title": "Object curly spacing",
"beautifiers": [
"JS Beautify",
"Prettier"
],
"key": "object_curly_spacing",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"disabled": {
"title": "Disable Beautifying Language",
"order": -3,
@ -3467,6 +3253,7 @@
"JS Beautify",
"JSCS Fixer",
"ESLint Fixer",
"Prettier",
"Pretty Diff"
]
},
@ -3486,6 +3273,7 @@
"collapsed": true,
"beautifiers": [
"JS Beautify",
"Prettier",
"Pretty Diff"
],
"grammars": [
@ -3797,6 +3585,20 @@
"namespace": "js"
}
},
"object_curly_spacing": {
"type": "boolean",
"default": false,
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify)",
"title": "Object curly spacing",
"beautifiers": [
"JS Beautify"
],
"key": "object_curly_spacing",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"disabled": {
"title": "Disable Beautifying Language",
"order": -3,
@ -3812,6 +3614,7 @@
"description": "Default Beautifier to be used for JSON",
"enum": [
"JS Beautify",
"Prettier",
"Pretty Diff"
]
},
@ -4160,6 +3963,20 @@
"namespace": "js"
}
},
"object_curly_spacing": {
"type": "boolean",
"default": false,
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify)",
"title": "Object curly spacing",
"beautifiers": [
"JS Beautify"
],
"key": "object_curly_spacing",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"disabled": {
"title": "Disable Beautifying Language",
"order": -3,
@ -4350,6 +4167,7 @@
"collapsed": true,
"beautifiers": [
"CSScomb",
"Prettier",
"Pretty Diff"
],
"grammars": [
@ -4554,6 +4372,7 @@
"description": "Default Beautifier to be used for LESS",
"enum": [
"CSScomb",
"Prettier",
"Pretty Diff"
]
},
@ -4633,6 +4452,7 @@
"description": "Options for language Markdown",
"collapsed": true,
"beautifiers": [
"Prettier",
"Remark",
"Tidy Markdown"
],
@ -4700,6 +4520,7 @@
"default": "Tidy Markdown",
"description": "Default Beautifier to be used for Markdown",
"enum": [
"Prettier",
"Remark",
"Tidy Markdown"
]
@ -6109,7 +5930,7 @@
"namespace": "python"
}
},
"formater": {
"formatter": {
"type": "string",
"default": "autopep8",
"enum": [
@ -6117,12 +5938,12 @@
"yapf"
],
"description": "formatter used by pybeautifier (Supported by autopep8, pybeautifier)",
"title": "Formater",
"title": "Formatter",
"beautifiers": [
"autopep8",
"pybeautifier"
],
"key": "formater",
"key": "formatter",
"language": {
"name": "Python",
"namespace": "python"
@ -6567,6 +6388,7 @@
"collapsed": true,
"beautifiers": [
"CSScomb",
"Prettier",
"Pretty Diff",
"SassConvert"
],
@ -6772,6 +6594,7 @@
"description": "Default Beautifier to be used for SCSS",
"enum": [
"CSScomb",
"Prettier",
"Pretty Diff",
"SassConvert"
]
@ -6915,6 +6738,20 @@
"namespace": "sql"
}
},
"reindent": {
"type": "boolean",
"default": true,
"description": "Change indentations of the statements. Uncheck this option to preserve indentation (Supported by sqlformat)",
"title": "Reindent",
"beautifiers": [
"sqlformat"
],
"key": "reindent",
"language": {
"name": "SQL",
"namespace": "sql"
}
},
"keywords": {
"type": "string",
"default": "upper",
@ -7366,6 +7203,76 @@
}
}
},
"tsx": {
"title": "TSX",
"type": "object",
"description": "Options for language TSX",
"collapsed": true,
"beautifiers": [
"TypeScript Formatter"
],
"grammars": [
"TypeScriptReact"
],
"extensions": [
"tsx"
],
"properties": {
"indent_size": {
"type": "integer",
"default": null,
"minimum": 0,
"description": "Indentation size/length (Supported by TypeScript Formatter)",
"title": "Indent size",
"beautifiers": [
"TypeScript Formatter"
],
"key": "indent_size",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"indent_with_tabs": {
"type": "boolean",
"default": null,
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by TypeScript Formatter)",
"title": "Indent with tabs",
"beautifiers": [
"TypeScript Formatter"
],
"key": "indent_with_tabs",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"disabled": {
"title": "Disable Beautifying Language",
"order": -3,
"type": "boolean",
"default": false,
"description": "Disable TSX Beautification"
},
"default_beautifier": {
"title": "Default Beautifier",
"order": -2,
"type": "string",
"default": "TypeScript Formatter",
"description": "Default Beautifier to be used for TSX",
"enum": [
"TypeScript Formatter"
]
},
"beautify_on_save": {
"title": "Beautify On Save",
"order": -1,
"type": "boolean",
"default": false,
"description": "Automatically beautify TSX files on save"
}
}
},
"twig": {
"title": "Twig",
"type": "object",
@ -7540,6 +7447,7 @@
"description": "Options for language TypeScript",
"collapsed": true,
"beautifiers": [
"Prettier",
"TypeScript Formatter"
],
"grammars": [
@ -7564,34 +7472,6 @@
"namespace": "js"
}
},
"indent_char": {
"type": "string",
"default": null,
"description": "Indentation character (Supported by TypeScript Formatter)",
"title": "Indent char",
"beautifiers": [
"TypeScript Formatter"
],
"key": "indent_char",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"indent_level": {
"type": "integer",
"default": 0,
"description": "Initial indentation level (Supported by TypeScript Formatter)",
"title": "Indent level",
"beautifiers": [
"TypeScript Formatter"
],
"key": "indent_level",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"indent_with_tabs": {
"type": "boolean",
"default": null,
@ -7606,242 +7486,6 @@
"namespace": "js"
}
},
"preserve_newlines": {
"type": "boolean",
"default": true,
"description": "Preserve line-breaks (Supported by TypeScript Formatter)",
"title": "Preserve newlines",
"beautifiers": [
"TypeScript Formatter"
],
"key": "preserve_newlines",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"max_preserve_newlines": {
"type": "integer",
"default": 10,
"description": "Number of line-breaks to be preserved in one chunk (Supported by TypeScript Formatter)",
"title": "Max preserve newlines",
"beautifiers": [
"TypeScript Formatter"
],
"key": "max_preserve_newlines",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"space_in_paren": {
"type": "boolean",
"default": false,
"description": "Add padding spaces within paren, ie. f( a, b ) (Supported by TypeScript Formatter)",
"title": "Space in paren",
"beautifiers": [
"TypeScript Formatter"
],
"key": "space_in_paren",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"jslint_happy": {
"type": "boolean",
"default": false,
"description": "Enable jslint-stricter mode (Supported by TypeScript Formatter)",
"title": "Jslint happy",
"beautifiers": [
"TypeScript Formatter"
],
"key": "jslint_happy",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"space_after_anon_function": {
"type": "boolean",
"default": false,
"description": "Add a space before an anonymous function's parens, ie. function () (Supported by TypeScript Formatter)",
"title": "Space after anon function",
"beautifiers": [
"TypeScript Formatter"
],
"key": "space_after_anon_function",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"brace_style": {
"type": "string",
"default": "collapse",
"enum": [
"collapse",
"collapse-preserve-inline",
"expand",
"end-expand",
"none"
],
"description": "[collapse|collapse-preserve-inline|expand|end-expand|none] (Supported by TypeScript Formatter)",
"title": "Brace style",
"beautifiers": [
"TypeScript Formatter"
],
"key": "brace_style",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"break_chained_methods": {
"type": "boolean",
"default": false,
"description": "Break chained method calls across subsequent lines (Supported by TypeScript Formatter)",
"title": "Break chained methods",
"beautifiers": [
"TypeScript Formatter"
],
"key": "break_chained_methods",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"keep_array_indentation": {
"type": "boolean",
"default": false,
"description": "Preserve array indentation (Supported by TypeScript Formatter)",
"title": "Keep array indentation",
"beautifiers": [
"TypeScript Formatter"
],
"key": "keep_array_indentation",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"keep_function_indentation": {
"type": "boolean",
"default": false,
"description": " (Supported by TypeScript Formatter)",
"title": "Keep function indentation",
"beautifiers": [
"TypeScript Formatter"
],
"key": "keep_function_indentation",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"space_before_conditional": {
"type": "boolean",
"default": true,
"description": " (Supported by TypeScript Formatter)",
"title": "Space before conditional",
"beautifiers": [
"TypeScript Formatter"
],
"key": "space_before_conditional",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"eval_code": {
"type": "boolean",
"default": false,
"description": " (Supported by TypeScript Formatter)",
"title": "Eval code",
"beautifiers": [
"TypeScript Formatter"
],
"key": "eval_code",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"unescape_strings": {
"type": "boolean",
"default": false,
"description": "Decode printable characters encoded in xNN notation (Supported by TypeScript Formatter)",
"title": "Unescape strings",
"beautifiers": [
"TypeScript Formatter"
],
"key": "unescape_strings",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"wrap_line_length": {
"type": "integer",
"default": 0,
"description": "Wrap lines at next opportunity after N characters (Supported by TypeScript Formatter)",
"title": "Wrap line length",
"beautifiers": [
"TypeScript Formatter"
],
"key": "wrap_line_length",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"end_with_newline": {
"type": "boolean",
"default": false,
"description": "End output with newline (Supported by TypeScript Formatter)",
"title": "End with newline",
"beautifiers": [
"TypeScript Formatter"
],
"key": "end_with_newline",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"end_with_comma": {
"type": "boolean",
"default": false,
"description": "If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by TypeScript Formatter)",
"title": "End with comma",
"beautifiers": [
"TypeScript Formatter"
],
"key": "end_with_comma",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"end_of_line": {
"type": "string",
"default": "System Default",
"enum": [
"CRLF",
"LF",
"System Default"
],
"description": "Override EOL from line-ending-selector (Supported by TypeScript Formatter)",
"title": "End of line",
"beautifiers": [
"TypeScript Formatter"
],
"key": "end_of_line",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"disabled": {
"title": "Disable Beautifying Language",
"order": -3,
@ -7856,6 +7500,7 @@
"default": "TypeScript Formatter",
"description": "Default Beautifier to be used for TypeScript",
"enum": [
"Prettier",
"TypeScript Formatter"
]
},
@ -8028,6 +7673,7 @@
"description": "Options for language Vue",
"collapsed": true,
"beautifiers": [
"Prettier",
"Vue Beautifier"
],
"grammars": [
@ -8330,6 +7976,20 @@
"namespace": "js"
}
},
"object_curly_spacing": {
"type": "boolean",
"default": false,
"description": "Insert spaces between brackets in object literals (Supported by Vue Beautifier)",
"title": "Object curly spacing",
"beautifiers": [
"Vue Beautifier"
],
"key": "object_curly_spacing",
"language": {
"name": "JavaScript",
"namespace": "js"
}
},
"indent_inner_html": {
"type": "boolean",
"default": false,
@ -8519,6 +8179,7 @@
"default": "Vue Beautifier",
"description": "Default Beautifier to be used for Vue",
"enum": [
"Prettier",
"Vue Beautifier"
]
},
@ -9321,6 +8982,22 @@
}
}
},
"ocp-indent": {
"key": "ocp-indent",
"title": "ocp-indent",
"type": "object",
"collapsed": true,
"description": "Options for ocp-indent executable.",
"properties": {
"path": {
"key": "path",
"title": "Binary/Script Path",
"type": "string",
"default": "",
"description": "Absolute path to the \"ocp-indent\" executable's binary/script."
}
}
},
"php": {
"key": "php",
"title": "PHP",
@ -9369,6 +9046,22 @@
}
}
},
"puppet-lint": {
"key": "puppet-lint",
"title": "puppet-lint",
"type": "object",
"collapsed": true,
"description": "Options for puppet-lint executable.",
"properties": {
"path": {
"key": "path",
"title": "Binary/Script Path",
"type": "string",
"default": "",
"description": "Absolute path to the \"puppet-lint\" executable's binary/script."
}
}
},
"sass-convert": {
"key": "sass-convert",
"title": "SassConvert",