New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mondra/code-format-config

Package Overview
Dependencies
Maintainers
0
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mondra/code-format-config

Linting rules for JavaScript, ReactJS and TypeScript project

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
28
decreased by-62.67%
Maintainers
0
Weekly downloads
 
Created
Source

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://ProArchITSolutions@dev.azure.com/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

Keywords

FAQs

Package last updated on 21 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc