All Projects → prettier → Prettier Atom

prettier / Prettier Atom

Licence: mit
An atom package for the prettier formatter.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Prettier Atom

prettier-eslint-atom
DEPRECATED IN FAVOR OF prettier-atom + ESLint integration
Stars: ✭ 64 (-91.47%)
Mutual labels:  atom, formatter, eslint, prettier
Github
Git and GitHub integration for Atom
Stars: ✭ 880 (+17.33%)
Mutual labels:  atom, atom-package, atom-editor
Prettier Eslint
Code ➡️ prettier ➡️ eslint --fix ➡️ Formatted Code ✨
Stars: ✭ 3,435 (+358%)
Mutual labels:  eslint, prettier, formatter
Prettier Eslint Cli
CLI for prettier-eslint
Stars: ✭ 451 (-39.87%)
Mutual labels:  eslint, prettier, formatter
Mighty React Snippets
Crafty React & Redux snippets for Atom Editor
Stars: ✭ 16 (-97.87%)
Mutual labels:  atom, atom-package, atom-editor
Markdown Themeable Pdf
ARCHIVED. NOT MAINTAINED. Themeable Markdown Converter (Print to PDF, HTML, JPEG or PNG)
Stars: ✭ 130 (-82.67%)
Mutual labels:  atom, atom-package, atom-editor
Atom React Snippets
esnext React snippets
Stars: ✭ 146 (-80.53%)
Mutual labels:  atom, atom-package, atom-editor
atom-carbon-now-sh
Atom package to open the current editor content in https://carbon.now.sh/
Stars: ✭ 15 (-98%)
Mutual labels:  atom, atom-package, atom-editor
language-mjml
Atom Editor package providing syntax support for MJML
Stars: ✭ 48 (-93.6%)
Mutual labels:  atom, atom-package, atom-editor
Typescript Express Starter
🚀 TypeScript Express Starter
Stars: ✭ 238 (-68.27%)
Mutual labels:  eslint, prettier, formatter
Poetic
Automatically install and maintain ESLint, Prettier, EditorConfig and Airbnb rules for JavaScript, TypeScript and React.
Stars: ✭ 165 (-78%)
Mutual labels:  eslint, prettier, formatter
atom-zurb-foundation
Zurb Foundation 6 for sites snippets.
Stars: ✭ 31 (-95.87%)
Mutual labels:  atom, atom-package, atom-editor
atom-ide-crystal
Crystal IDE package for Atom using the Scry Language Server
Stars: ✭ 24 (-96.8%)
Mutual labels:  atom, atom-package, atom-editor
Webpack React Boilerplate
Minimal React 16 and Webpack 4 boilerplate with babel 7, using the new webpack-dev-server, react-hot-loader, CSS-Modules
Stars: ✭ 358 (-52.27%)
Mutual labels:  eslint, prettier
Md Writer
✒️ Make Atom a better Markdown/AsciiDoc editor for writers and bloggers
Stars: ✭ 326 (-56.53%)
Mutual labels:  atom, atom-package
Apollo Upload Examples
A full stack demo of file uploads via GraphQL mutations using Apollo Server and apollo-upload-client.
Stars: ✭ 358 (-52.27%)
Mutual labels:  eslint, prettier
Snazzy
Format JavaScript Standard Style as Stylish (i.e. snazzy) output
Stars: ✭ 381 (-49.2%)
Mutual labels:  eslint, formatter
Nodejs Api Boilerplate
A boilerplate for kickstart your nodejs api project with JWT Auth and some new Techs :)
Stars: ✭ 364 (-51.47%)
Mutual labels:  eslint, prettier
React 2048 Game
🎮 A fancy 2048 game build with react, redux best practices.
Stars: ✭ 401 (-46.53%)
Mutual labels:  eslint, prettier
Markdown Preview Enhanced
One of the 'BEST' markdown preview extensions for Atom editor!
Stars: ✭ 3,478 (+363.73%)
Mutual labels:  atom, atom-package

Prettier for Atom Watch on GitHubStar on GitHubTweet

Version Downloads Build Status Code Coverage MIT License All Contributors PRs Welcome

Atom package to format your code using Prettier.

prettier demo

Problems with Latest Release (v0.55.0)?

We have recently switched to deferring most options to Prettier via a .prettierrc (or similar) file instead of specifying your options via the Atom package. This is to accommodate Prettier "plugins" which introduce all sorts of new functionality but can't work with the old paradigm.

However, this requires Prettier v1.13.4 or greater. If you are not ready to migrate, you can revert prettier-atom like this:

apm install [email protected]

Installation

apm install prettier-atom

Or go to Settings → Install and search for prettier-atom.

Make sure to restart Atom after the package is installed.

How to use

There are two ways to format your code:

  • Automatically format on save (requires enabling in Packages → Prettier → Toggle Format on Save)
  • Run the command Prettier: Format to invoke Prettier manually
    • Windows/Linux: ctrl + alt + f
    • Mac: control + option + f

Prettier will search up the file tree looking for a prettier config to use. If none is found, Prettier will use its default settings.

Prettier will also respect your .prettierignore file.

What version of Prettier gets used?

By default, we use the prettier instance in your project's node_modules directory. We highly recommend adding Prettier to your dependencies so that your team, CI tooling, and any scripts using Prettier all format code exactly the same way.

If Prettier can't be found in your project's node modules, then we fall back to using the version that comes bundled with the prettier-atom package (version changes are documented in the CHANGELOG).

Configuring default rules

Some users may not wish to create a new Prettier config for every project. Because Prettier searches recursively up the filepath, you can place a global prettier config at ~/.prettierrc to be used as a fallback.

Using ESLint

prettier-eslint demo

There are three ways to use ESLint with Prettier and prettier-atom:

1. Use ESLint to run Prettier

You can opt not to use prettier-atom and instead configure ESLint to run prettier. (see details)

2. Turn off ESLint's Formatting Rules

You can disable ESLint rules for things that Prettier itself fixes. This allows both tools to run alongside each other without conflicting with one another. (see details)

3. Use prettier-eslint

The prettier-eslint package (shipped with prettier-atom) will recursively search up the file tree for your ESLint settings and infer the corresponding Prettier settings to use when formatting. After formatting, prettier-eslint will invoke ESLint to fix remaining issues. Check the "ESLint Integration" checkbox to enable.

Note: If you are using the linter-eslint package alongside prettier-atom, please ensure you have unchecked its "Fix on save" checkbox. Leaving it enabled will cause a race condition between prettier-atom and linter-eslint. After it has finished formatting your code, prettier-atom will automatically invoke the linter package's lint command for you.

Using Stylelint

The prettier-stylelint package (shipped with prettier-atom) derives prettier settings from your stylelint configuration to use when formatting. After formatting, prettier-stylelint will invoke Stylelint to fix remaining issues. Check the "Stylelint Integration" checkbox to enable.

Note: prettier-atom automatically detects when you are in an Atom scope that stylelint supports and switches to using it instead of normal Prettier when formatting that file.

Troubleshooting formatting problems

If Prettier is not formatting something properly, please open an issue on the Prettier repository, not this repository.

Inspiration

This repository was created by James Long to go along with his Prettier project. Kent C. Dodds extended Prettier to add eslint --fix integration as prettier-eslint and forked the original prettier-atom plugin to create the prettier-eslint-atom plugin. Because it became clear that the plugins were very similar and thus maintenance made easier by combining the two, Rob Wise merged prettier-eslint-atom back into prettier-atom.

Maintainers

Rob Wise

Contributors

Thanks goes to these people (emoji key):


James Long

💬 💻 📖 🔌 👀

Rob Wise

💻 📖 💬 💡 👀 ⚠️

Kent C. Dodds

💻 📖 🚇

Luca Barone


Arnar Þór Sveinsson

💻

Adam Miskiewicz

💻

Ori Livni

💻

Leon Chen

💻

Christopher Chedeau

💬 💻 🔌

Christoph Geschwind

💻

Andrew Hutchings

💻

David Schnurr

💻

Ryan Cole

💻

Dara Hak

💻 📖

Stephen John Sorensen

💻

Lukas Geiger

💻 ⚠️

Viktor Charypar

💻 ⚠️

Mats Högberg

💻

Roman

💻

vaibhav

💻

Karl Horky

💻

Dan Abramov

💻

Murphy Randle

💻 🐛

Matthieu Lemoine

💻

Ron Green

💻

Harold Treen

🐛 💻

Nikita Mashukov

💻

Sam Horton

💻 ⚠️

olsonpm

💻

David Singleton

📖

Chris Drackett

💻 🎨

Lewis Liu

💻 ⚠️

Chance Dickson

💻

This project follows the all-contributors specification. Contributions of any kind are welcome!

LICENSE

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].