smash-cli

smash-cli

  • Documentation
  • Examples
  • Blog
  • GitHub

›Middlewares

Getting Started

  • What is smash-cli?
  • Installation
  • Command Line Usage

Middlewares

  • smash-middleware-clean
  • smash-middleware-copy
  • smash-middleware-eslint
  • smash-middleware-helloworld
  • smash-middleware-jest
  • smash-middleware-shell
  • smash-middleware-webpack-v4

Templates

  • smash-template-react
  • smash-template-react-component
  • smash-template-revealjs

Programmatic APIs

  • smash-cli
  • smash-init
  • smash-dowload
  • smash-install
  • smash-run
  • smash-helper-logger
  • smash-helper-task-finder
  • smash-helper-middleware-installer
Edit

smash-middleware-eslint

npm

An ESLint middleware for smash-cli.

Usage

添加配置到 .smash/task.yml 里:

# 初始化ESLint配置
init:
  - name: smash-middleware-eslint
    options: --init

# 查找错误
check:
  - name: smash-middleware-eslint
    options:
      - ./
      - --ext .jsx,.js

# 查找并修复错误
lint:
  - name: smash-middleware-eslint
    options: ./ --ext .jsx,.js --fix

options 参数与 ESLint 的 ESLint 命令行 options 规则 一致 。

运行任务:

$ smash run lint

Links

  • ESLint Command Line Interface
  • ESLint Rules
← smash-middleware-copysmash-middleware-helloworld →
  • Usage
  • Links
smash-cli
Documentation
Getting StartedMiddlewaresTemplatesProgrammatic APIs
Examples
UsageContribute
Community
HelpUser ShowcaseIssuesYuque
More
BlogStar
Facebook Open Source
Copyright © 2020 www.smash-cli.com
粤ICP备18035177号-2 | 粤公网安备 44011302002170号