npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tiagoboeing/create-styleguide

v1.0.4

Published

A CLI to automate style guide configs for JS based projects, this uses ESLint and Prettier.

Downloads

45

Readme

Style Guide CLI

npm (scoped) npm Snyk Vulnerabilities for npm package NPM

A CLI to add ESLint + Prettier and enforce a style guide based on ESLint standard. This automatize dependencies install and Prettier + ESLint configs, adding specific files for different frameworks/languages (in case of JS or TS).

Adding for JavaScript project

Framework/language support

| Framework / Language | Support? | | ----------------------------------------- | -------- | | Angular 2+ | ✅ Yes | | JavaScript (Browser + Node) | ✅ Yes | | React / Next.js | ✅ Yes | | TypeScript (use Angular template for now) | Roadmap |

Contribute sending a pull request or can be a sponsor

SO support

| SO | Support? | | ------- | ---------- | | Linux | ✅ Yes | | Windows | ✅ Yes | | MacOS | Not tested |

You can edit this README if test on MacOS. 😁

Use

Before run, remove following files from your project root if exists:

  • .editorconfig
  • .eslintignore
  • .eslintrc.json
  • .prettierrc

Run the command on root of your project. (Same folder of package.json)

$ npm init @tiagoboeing/styleguide

# or

$ npx @tiagoboeing/create-styleguide

# or

$ npm i -g @tiagoboeing/create-styleguide
$ create-styleguide

# after run, select a option and be happy! 🎉
? What the type of your project?
❯ JavaScript
  Angular 2+
  React / Next.js (TypeScript)

Before execute, do a backup or commit your files!

Development

To run local exists two strategies:

  1. Using directly NPM
# on root folder, run for register CLI on envs
$ npm link

# create any folder to run the CLI
$ mkdir test
$ cd test

# start a Node project to create a package.json
$ npm init -y

# and... run the CLI for apply magic 🚀
$ create-styleguide
  1. Using VSCode automated tasks (tasks.json and launch.json)

Press F5 key to run or use Ctrl + Shift + D to access run side menu and select "Launch" on context menu to run the all predefined tasks.

On .vscode/tasks.json you can change the CLI args in:

...
"args": [
  "--project",
  "javascript" <- here
],

Defaults

Same configs for all projects types

{
  "$schema": "http://json.schemastore.org/prettierrc",
  "semi": false,
  "singleQuote": true,
  "arrowParens": "avoid",
  "trailingComma": "none",
  "endOfLine": "auto",
  "tabWidth": 2,
  "printWidth": 95
}
# Editor configuration, see https://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false