All Projects → prettier → Plugin Swift

prettier / Plugin Swift

Prettier Swift Plugin - WARNING: The AST parser is not stable yet

Programming Languages

javascript
184084 projects - #8 most used programming language
swift
15916 projects

Labels

Projects that are alternatives of or similar to Plugin Swift

react-component-library-lerna
Build your own React component library managed with lerna, presented with storybook and published in private npm registry.
Stars: ✭ 55 (-79.78%)
Mutual labels:  prettier
node-backend-template
A template for NodeJS backend projects
Stars: ✭ 19 (-93.01%)
Mutual labels:  prettier
create-react-typescript-app
Integrating Reactjs with Typescript + ESLint
Stars: ✭ 20 (-92.65%)
Mutual labels:  prettier
prettier-webpack-plugin
Process your Webpack dependencies with Prettier
Stars: ✭ 47 (-82.72%)
Mutual labels:  prettier
react-native-template-ts
[DEPRECATED] ⚛️ Start a new React Native project with TypeScript, Prettier & TSLint
Stars: ✭ 34 (-87.5%)
Mutual labels:  prettier
spacemacs-prettier
Adds prettier-js formatter to spacemacs locally. Temporary solution until prettier-js is launched on MELPA
Stars: ✭ 16 (-94.12%)
Mutual labels:  prettier
prettier-eslint-atom
DEPRECATED IN FAVOR OF prettier-atom + ESLint integration
Stars: ✭ 64 (-76.47%)
Mutual labels:  prettier
happy-web
Project built during Rocketseat's Next Level Week #3
Stars: ✭ 19 (-93.01%)
Mutual labels:  prettier
gatsby-starter-antoine
My opinionated Gatsby.js starter
Stars: ✭ 17 (-93.75%)
Mutual labels:  prettier
awesome-address-book
This project shows a basic address book built with ReactJS, Redux Toolkit and Typescript 📖
Stars: ✭ 20 (-92.65%)
Mutual labels:  prettier
nextjs-baseweb
Slightly opinionated scaffold of Next.js and Base Web.
Stars: ✭ 46 (-83.09%)
Mutual labels:  prettier
prettier-markdown
Parse code blocks in markdown files and run prettier on them
Stars: ✭ 37 (-86.4%)
Mutual labels:  prettier
walrus
🎉 Cli development framework.
Stars: ✭ 17 (-93.75%)
Mutual labels:  prettier
eslint-config-adjunct
A reasonable collection of plugins to use alongside your main esLint configuration
Stars: ✭ 39 (-85.66%)
Mutual labels:  prettier
nest-boilerplate
Nest.js boilerplate with CircleCI, Commitizen, Commitlint, Docker-Compose, ESLint, GitHub Actions, Husky, Lint-staged, OpenAPI, Prettier, PostGreSQL, Travis CI, TypeORM
Stars: ✭ 16 (-94.12%)
Mutual labels:  prettier
OSAPI
👋 OSAPI 是依靠通用性后台管理平台搭建的API管理平台,基于 vue3、Nestjs 技术栈实现,包含 RBAC 角色权限模块、数据展示、编辑等模块。
Stars: ✭ 32 (-88.24%)
Mutual labels:  prettier
vite-react-ts-tailwind-firebase-starter
Starter using Vite + React + TypeScript + Tailwind CSS. And already set up Firebase(v9), Prettier and ESLint.
Stars: ✭ 108 (-60.29%)
Mutual labels:  prettier
SENT-template
Skip setup and start code with SENT (Sapper Express Node Template) and other tools
Stars: ✭ 69 (-74.63%)
Mutual labels:  prettier
node-boilerplate
Node Typescript Boilerplate for Microservices. Skeleton for Node.js Apps written in TypeScript (with Setup Instructions for ESLint, Prettier, and Husky)
Stars: ✭ 92 (-66.18%)
Mutual labels:  prettier
next-pwa-template
Next.js progressive web app template
Stars: ✭ 266 (-2.21%)
Mutual labels:  prettier

🚧 Work in Progress! 🚧

Prettier Swift

Swift Plugin for the Opinionated Code Formatter

Gitter Travis npm version code style: prettier Follow+Prettier+on+Twitter

What does it do?

⚠️ Warning ⚠️ This plugin might eat your homework in its early stage. It also depends on Swift's lib/Syntax which is in flux. Please stage or commit your code before performing any in-place formatting.

You can check out how it formatted Artsy's Eidolon.

Prerequisites

You need one of the following:

  1. A snapshot from March 30, 2018 or later,
  2. a recent manual build from Swift's master, or
  3. Swift 4.2 (once it's available as a beta or released completely).

Assuming you picked (1) please follow the installation instructions, which recommend updating your PATH at the end:

TOOLCHAIN=swift-DEVELOPMENT-SNAPSHOT-2018-03-30-a.xctoolchain
export PATH=/Library/Developer/Toolchains/${TOOLCHAIN}/usr/bin/:"${PATH}"

Alternatively you can pass the full path to the swiftc binary via the environment variable PRETTIER_SWIFT_SWIFTC:

TOOLCHAIN=swift-DEVELOPMENT-SNAPSHOT-2018-03-30-a.xctoolchain
export PRETTIER_SWIFT_SWIFTC=/Library/Developer/Toolchains/${TOOLCHAIN}/usr/bin/swiftc

Contributing

If you're interested in contributing to the development of Prettier for Swift, you can follow the CONTRIBUTING guide from Prettier, as it all applies to this repository too.

To test it out on a Swift file:

  • Clone this repository.
  • Run yarn.
  • Create a file called test.swift.
  • Run yarn prettier test.swift to check the output.

Install

yarn add --dev --exact prettier prettier/plugin-swift

Use

prettier --write "**/*.swift"

Maintainers

Marcel Jackwerth
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].