Socket
Socket
Sign inDemoInstall

@applint/projectlint

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applint/projectlint

Lint tool on project level for [Rax](https://rax.js.org/), [ICE](https://ice.work/) and React projects.


Version published
Weekly downloads
5
increased by25%
Maintainers
2
Weekly downloads
 
Created
Source

@applint/projectlint

Lint tool on project level for Rax, ICE and React projects.

Install

npm i @applint/projectlint --save-dev

API

runTransforms()

You can use the runTransforms method to run codemod.

Options:

  • cwd: string, the target directory path
  • config: object, the project-lint configuration
  • dry: boolean, whether or not dry-run codemod. default: true
  • jscodeshiftArgs: string[], default is []

Return:

  • result: TransformResult[] (see interface)

Example:

import { runTransforms } from '@applint/projectlint';

const cwd = '/workspace/demo';

const transforms = {
  'plugin-rax-component-to-component': 'error',
  'lint-config-to-iceworks-spec': 'warn',
};

const result = runTransforms(cwd, transforms, false);
console.log('run transforms result', result);
Interface
interface TransformResult {
  /**
   * transform key, see `Included Transforms`
   */
  transform: string;
  /**
   * transform description title
   */
  title: string;
  /**
   * transform description English title
   */
  title_en: string;
  /**
   * transform description message
   */
  message: string;
  /**
   * transform description English message
   */
  message_en: string;
  /**
   * 0: off 1: warn 2: error
   */
  severity: number;
  /**
   * codemod tag, e.g.: `tags: ['performance']`
   */
  tags: string[];
  /**
   * whether dry run codemod or not
   */
  dry: boolean;
  /**
   * docs url
   */
  docs: string;
  /**
   * jscodeshift CLI output
   */
  output: string;
  /**
   * same as https://docs.npmjs.com/cli/v7/commands/npm-deprecate/ 
   */
  npm_deprecate?: string;
}

Included Transforms

1. plugin-rax-component-to-component

Update plugin-rax-component to plugin-component. docs

2. lint-config-to-iceworks-spec

Follow Alibaba FED lint rules and use @iceworks/spec best practices. docs

3. lint-config-to-applint-spec

Follow Alibaba Tao Technology lint rules and use @applint/spec best practices. docs

FAQs

Package last updated on 09 Dec 2021

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