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

@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

提供项目级别检测和修复 Node API,目前包括 Codemod 检查和修复、依赖检查和 bundle 体积检查

  • 1.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-11.76%
Maintainers
2
Weekly downloads
 
Created
Source

@applint/projectlint

提供项目级别检测和修复 Node API,目前包括 Codemod 检查和修复、项目依赖检查(冗余包和风险包)、项目 bundle 体积大小检查,对齐 @applint/applint 功能。

安装

npm i @applint/projectlint --save-dev

特性

Codemod

API
runTransforms

选项:

  • cwd: string, 运行 Codemod 的项目根路径
  • dry: boolean, 是否进行 Codemod dry-run,默认值是 true
  • jscodeshiftArgs: string[], jscodeshift 配置,默认值是 []

返回值:

result: TransformResult[]

interface TransformResult {
  // 规则名称
  transform: string;
  title: string;
  title_en: string;
  message: string;
  message_en: string;
  // 0: off 1: warn 2: error
  severity: number;
  tags: string[];
  dry: boolean;
  docs: string;
  output: string;
  npm_deprecate?: string;
}

例子:

import ProjectLint from '@applint/projectlint';

const cwd = '/workspace/demo';

const transforms = {
  'plugin-rax-component-to-component': 'error',
  'lint-config-to-iceworks-spec': 'warn',
};
const projectLint = new ProjectLint({ cwd, transforms });
const result = projectLint.scan();
console.log('run transforms result', result);
Codemod 列表

1. plugin-rax-component-to-component

更新 build-plugin-rax-componentbuild-plugin-component文档

2. lint-config-to-iceworks-spec

遵循阿里巴巴前端规范并使用 @iceworks/spec 最佳实践。文档

3. lint-config-to-applint-spec

遵循阿里巴巴大淘宝前端规范并使用 @applint/spec 最佳实践。文档

FAQs

Package last updated on 22 Apr 2022

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