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

@xola/jslint

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xola/jslint

Xola's ES Lint rules to format NodeJS Javascript & Typescript code

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
increased by121.78%
Maintainers
0
Weekly downloads
 
Created
Source

ESLint Configuration

This repository serves as the source for all of Xola's ESLint configuration using XO, a pluggable ESLint wrapper. This package should be installed for every Xola React app

Required Script Commands

Add the following commands in the scripts section of your package.json

"scripts": {
    "xola-lint": "xola-lint",
    "lint": "xola-lint src",
    "lint:report": "xola-lint --reporter=json src > eslint_report.json && echo 'ESLint report saved to eslint_report.json'",
},

Run Tests

To run ESLint against your entire source just run

npm run lint

If you would like to run lint against a specific file then invoke the xola-lint directly:

npm run xola-lint -- src/components/Alert.jsx

Rules

This uses the XO package along with several ES Lint rule packages customized for Xola's needs. Additionally it will use our prettier configuration to validate other needs.

Files used:

  1. .xo-config.json Contains the core ESLint rules
  2. The prettier key in package.json contains the default prettier rules

Run npm run xola-lint --print-config .xo-config.json to see all the rules

Fixing

You can automatically fix several violations by running:

npm run xola-lint -- <directory> --fix

FAQs

Package last updated on 20 Sep 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