1.0.20 • Published 9 months ago

lion-pretty-lint v1.0.20

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

Overview:

The purpose of this module is to provide a unified starting point for Lion Energy JavaScript/TypeScript/JSX/React/Vue developers when it comes to code formatting (using Prettier) and code linting (using ESLint).

You should install this in all new projects (and existing ones as needed)!

Check us out on NPM!

Installation:

npm install -D lion-pretty-lint

VSCode

Install the following plugins:

Make Prettier your default formatter

  • Open VSCode settings: Ctrl+Shift+P -> Preferences: Open User Settings (JSON)
  • Add/update this line in your JSON settings
"editor.defaultFormatter": "esbenp.prettier-vscode"

This makes Prettier your default formatter for all associated file types.

If you just want to use Prettier for a specific file type (js, ts, jsx, etc.), then go into a file of that type and run

Ctrl+Shift+P -> Format Document With -> Configure Default Formatter -> Prettier - Code formatter

Automatically run Prettier on file save

You can manually run Prettier any time you want to format your code, but where's the fun in that?

Instead follow these instructions to auto-format on save:

  • Open VSCode settings: Ctrl+Shift+P -> Preferences: Open User Settings (JSON)
  • Add/update this line in your JSON settings:
"editor.formatOnSave": true

Auto-fix ESLint Errors (if possible) on file save

ESLint finds potential bugs, enforces code practices and can change formatting as well. This module has been designed to prefer Prettier for formatting and ESLint for bugs, but the combination of the two is 🔥!

  • Open VSCode settings: Ctrl+Shift+P -> Preferences: Open User Settings (JSON)
  • Add/update this line in your JSON settings:
"editor.codeActionsOnSave": {
  "source.fixAll.eslint": true
}
1.0.19

9 months ago

1.0.18

9 months ago

1.0.17

9 months ago

1.0.20

9 months ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago