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

@mondra/code-format-config

v1.1.0

Published

Linting rules for JavaScript, ReactJS and TypeScript project

Downloads

224

Readme

Code Format Config

Linting rules for JavaScript, ReactJS and TypeScript project. This package provides some standard coding rules via ESLint and Prettier.

Installation

npm i @mondra/code-format-config --save-dev

Usage

In order to use this package for rules, one need to follow these steps:

  • Install two VSCode extensions i.e. dbaeumer.vscode-eslint and esbenp.prettier-vscode.
  • Install this package by following Installation process mention above.
  • Create .eslintrc.js file under root of your project.
  • Create .prettierrc.js file under root of your project.
  • Type following code in both files mentioned below:

.eslintrc.js

module.exports = require('@mondra/code-format-config/eslint-config')

.prettierrc.js

module.exports = require('@mondra/code-format-config/prettier-config')

Then finally, restart your VSCode IDE.

Additionally one can setup scripts under package.json

package.json

{
    "scripts": {
        "lint:fix": "eslint -c .eslintrc.js --ext .js,.jsx,.ts,.tsx --fix src/",
        "prettier:fix": "prettier --config .prettierrc.js --write \"src/**/*.{js,jsx,ts,tsx}\"",
        "formatter": "npm run prettier:fix && npm run lint:fix"
    }
}

Note: Mind the formatter sequence, i.e. first run Prettier and then ESLint.

In order to run and fix all lint errors in project, execute following command in terminal.

npm run formatter

Contribute

Only Mondra team members can contribute to development of this package.

Develop

  • Clone components project from here - https://[email protected]/ProArchITSolutions/Mondra/_git/Mondra.CodeFormatConfig
  • npm install in the root directoy.
  • Checkout to your own branch feature/<branch-name> or bug/<branch-name> from main branch.
  • Update the package.
  • Update CHANGELOG.md
  • Bump the version appropriately in package.json X.X.X - Major.Minor.Patch
  • Once changes are committed, raise and complete the PR with title matching above version number.
  • You're done. Next follow build process.

Build

Now main branch is upto the date as per latest features or bug fixes, execute following command in terminal.

  • npm publish - This will publish the latest version of the library into npmjs.com

License

See in LICENSE.md