All Projects → arianacosta → Poetic

arianacosta / Poetic

Licence: mit
Automatically install and maintain ESLint, Prettier, EditorConfig and Airbnb rules for JavaScript, TypeScript and React.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Poetic

Prettier Eslint
Code ➡️ prettier ➡️ eslint --fix ➡️ Formatted Code ✨
Stars: ✭ 3,435 (+1981.82%)
Mutual labels:  eslint, prettier, formatter
Zoe
🌀 Zero-config ESLint toolchain with sensible defaults.
Stars: ✭ 113 (-31.52%)
Mutual labels:  eslint, linter, prettier
Typescript Express Starter
🚀 TypeScript Express Starter
Stars: ✭ 238 (+44.24%)
Mutual labels:  eslint, prettier, formatter
Prettier Eslint Cli
CLI for prettier-eslint
Stars: ✭ 451 (+173.33%)
Mutual labels:  eslint, prettier, formatter
prettier-eslint-atom
DEPRECATED IN FAVOR OF prettier-atom + ESLint integration
Stars: ✭ 64 (-61.21%)
Mutual labels:  formatter, eslint, prettier
Prettier Atom
An atom package for the prettier formatter.
Stars: ✭ 750 (+354.55%)
Mutual labels:  eslint, prettier, formatter
Unimport
A linter, formatter for finding and removing unused import statements.
Stars: ✭ 96 (-41.82%)
Mutual labels:  linter, formatter
Simple React Calendar
A simple react based calendar component to be used for selecting dates and date ranges
Stars: ✭ 97 (-41.21%)
Mutual labels:  eslint, prettier
Spotless
Keep your code spotless
Stars: ✭ 2,285 (+1284.85%)
Mutual labels:  prettier, formatter
Eslint Plugin I18n Json
Fully extendable eslint plugin for JSON i18n translation files.
Stars: ✭ 101 (-38.79%)
Mutual labels:  eslint, linter
Prettier
Prettier is an opinionated code formatter.
Stars: ✭ 41,411 (+24997.58%)
Mutual labels:  prettier, formatter
Lecture Frontend Dev Env
"[인프런] 프론트엔드 개발환경의 이해와 실습" 강의 실습 자료입니다.
Stars: ✭ 108 (-34.55%)
Mutual labels:  eslint, prettier
React Redux Saucepan
A minimal and universal react redux starter project. With hot reloading, linting and server-side rendering
Stars: ✭ 86 (-47.88%)
Mutual labels:  eslint, prettier
Parallel Prettier
Concurrent prettier runner
Stars: ✭ 84 (-49.09%)
Mutual labels:  prettier, formatter
Eslint Watch
ESLint with simple watching capabilities
Stars: ✭ 159 (-3.64%)
Mutual labels:  eslint, linter
Plugin Php
Prettier PHP Plugin
Stars: ✭ 1,243 (+653.33%)
Mutual labels:  prettier, formatter
Eslint Config Standard Jsx
ESLint Shareable Config for JSX support in JavaScript Standard Style
Stars: ✭ 79 (-52.12%)
Mutual labels:  eslint, linter
Drstring
DrString finds issues in your Swift docstrings and fixes them for you.
Stars: ✭ 133 (-19.39%)
Mutual labels:  linter, formatter
Javascriptprettier
A Visual Studio extension
Stars: ✭ 118 (-28.48%)
Mutual labels:  prettier, formatter
React Native Boilerplate
A React Native boilerplate with Expo, Redux, React Navigation, Styled Components and some 💕 included.
Stars: ✭ 135 (-18.18%)
Mutual labels:  eslint, prettier

Poetic

Automatic code styling for JavaScript, TypeScript and React.

NPM Status Code Size

Poetic installs and maintains ESLint, Prettier, EditorConfig and Airbnb rules for JavaScript, TypeScript and React.

Poetic installation example

Install

On the root of your project run:

npx poetic

Trying out Poetic is safe! You can review all the changes in Git before committing. If you don't like it, just discard it.

Features

  • Installs and configures ESLint, Prettier and EditorConfig
  • Provides a curated set of rules based on Airbnb and ESLint Recommended
  • Customizable project configurations that are shareable
  • Easy to maintain with a single dependency
  • Configures Visual Studio Code

Requirements

  • Yarn (There are some limitations with NPM that make it incompatible with ESLint as a subdependency)

Motivation

Keeping the code clean and organized is important to prevent bugs and to collaborate with others. Linters help identify possible errors and bad practices and formatters allow us to concentrate on the features without having to worry about the code format. Unfortunately, configuring and maintaining these tools is cumbersome and more often than not, the project ends up with incorrect configurations (if any at all).

The goal of Poetic is to simplify the setup and maintenance of code styling tools and rules while allowing full customization.

To learn more read the Configuring Eslint, Prettier, and Airbnb in 1 Line.

Supported File Types

  • Javascript (.js)
  • TypeScript (.ts)
  • React (.jsx,.tsx)
your-app/
├── package.json
└── src/
    └── [your source files]

Poetic checks the code inside the src/ directory by default. This can be changed in the package.json

Recommended Visual Studio Code Extensions

Poetic comes preconfigured to work with VSC, so that you can see the error indicators in real-time as well as automatic formatting on save. In order for these features to work, you need to install the following extensions:

Running on the CLI

Poetic provides a few handy NPM scripts that are useful for applying the code style from the command line:

  • yarn code:check - Checks linting and formatting (Useful for CI)
  • yarn code:clean - Applies linting and formatting (Useful for automatic fixes)
  • yarn code:lint - Applies linting only
  • yarn code:format - Applies formatting only

You may use these in conjunction with Husky to clean the code automatically before committing or pushing.

Customizing for your project

Poetic provides a base configuration that can be easily extended or overridden. It uses the native configurations you are familiar with, so that you can build your own rules on top of it. Feel free to edit the following files as you see fit:

  • ESLint:
    • .eslintrc.js (Linting rules)
    • .eslintignore (Ignored files)
  • Prettier:
    • .prettierrc (Formatting rules)
  • TypeScript:
    • tsconfig.json (TS compilation)
  • EditorConfig:
    • .editorconfig (Basic editor config)
  • Visual Studio Code:
    • .vscode/settings.json (IDE behavior)

Installing on a preconfigured project

It is strongly recommended to remove other versions of ESLint and Prettier prior to installing Poetic.

If your project has custom rules or configurations, those can be easily copied over to the files added by Poetic. The filename convention is the same, so it should be straight forward.

Plese note that existing configuration files might be modified. Make sure to review all changes before committing.

Contributing

We are looking for contributors that are passionate about code style and making it accessible to teams around the world.

To make Poetic useful for everyone, we need to understand your needs, so please let us know about things that could help you improve your workflow.

If you would like to submit a PR, these are some of the short-term goals, but feel free to improve other areas as well:

  • Improve rules
  • Test on different types of projects
  • Add configs for Webstorm
  • Improve the documentation

Visit the CONTRIBUTING section for instructions on how to develop, test and release Poetic.

Contacting Collaborators

Spread the ❤️ about Poetic

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