Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-maasglobal

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-maasglobal

ESLint config for MaaS projects

  • 6.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

eslint-config-maasglobal

DEPRECATED

This eslint config was used for old JavaScript based MaaS Global projects. The focus of development has since moved to TypeScript. The config available in this package has been deprecated as a result. Please migrate to eslint-config-maasglobal-ts that is used for all new MaaS Global projects.

Usage

In package.json reference eslint-config-maasglobal, eslint-plugin-import, eslint-plugin-jsdoc as one of devDependencies, and configure eslint as:

{
  "eslintConfig": {
    "extends": "maasglobal"
  }
}

Prettier integration

Note that provided eslint setup doesn't handle eventual code style formatting. This is supposed to be solely guarded by Prettier

Within new projects, ensure prettier as one of devDependencies and setup .prettierrc.js as:

'use strict';

module.exports = require('eslint-config-maasglobal/.prettierrc');

It's highly recommended that for consistent whitespace formatting, an IDE is configured to also apply Prettier formatting on each file save.

Scripts setup and CI integration

For proper CI integration it's recommended that all MaaS projects have following scripts preconfgured:

{
  "lint": "eslint --ignore-path=.gitignore .",
  "lint-updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'",
  "prettier-check-updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c",
  "prettify": "prettier --write --ignore-path .gitignore '**/*.{css,html,js,json,md,yaml,yml}'",
  "prettify-updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write"
}

Note: Scripts require additional git-list-updated dependency to be installed, reference it in devDependencies

In Travis CI configuration, ensure that following validation is made on each PR build (but not on branch deployment):

npm run lint-updated && npm run prettier-check-updated

Keywords

FAQs

Package last updated on 14 Feb 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