package.json 相关配置如下

{

  "scripts": {

    "lint": "eslint pages/* component/* --fix"

  }

}

问题描述:  当我执行 git commit 操作时, 报错如下

Oops! Something went wrong! :(

ESLint: 5.0.1.
No files matching the pattern "component/*" were found.
Please check for typing mistakes in the pattern.

pre-commit:
pre-commit: We've failed to pass the specified git pre-commit hooks as the `lint`
pre-commit: hook returned an exit code (2). If you're feeling adventurous you can
pre-commit: skip the git pre-commit hooks by adding the following flags to your commit:
pre-commit:
pre-commit: git commit -n (or --no-verify)
pre-commit:
pre-commit: This is ill-advised since the commit is broken.
pre-commit:

问题原因:  没有component目录

使用git-premit时的问题的更多相关文章

  1. Git push 时每次都需要密码的疑惑

    2015.1.13更新: 在本地搭建Git服务器时,也是有每次操作需要密码的情况. 是因为每次做推送动作时,Git需要认证你是好人.所以需要密码. 可以在 /home/username/.ssh/au ...

  2. 设置Git提交时不用输入用户名和密码

    在用git提交时代码至github上时每次都要输入用户名和密码,当提交操作较为频繁时非常不方便,可以按下文中的介绍,设置成提交时不用输入用户名和密码: 1.在当前库下,已经运行过 git remote ...

  3. git clone时出现 error:inflate:data stream error(incorrect data check)

    git clone时出现 error:inflate:data stream error(incorrect data check) fatal:serrious inflate inconsiste ...

  4. 执行Git命令时出现各种 SSL certificate problem 的解决办法

    执行Git命令时出现各种 SSL certificate problem 的解决办法 来源  https://www.cnblogs.com/chenzc/p/5842932.html 比如我在win ...

  5. MAC OS 更新GIT版本时遇到的问题

    在更新git版本时,没有备份就删掉了原先的版本,在安装完2.18.0的新版本后,使用命令行git --version,返回错误git not a developer tool or in PATH. ...

  6. git pull时解决分支分叉(branch diverged)问题

    git pull时出现分支冲突(branch diverged) $ git status # On branch feature/worker-interface # Your branch and ...

  7. 解决git pull时出现的几个问题

    第1个问题: 解决GIT代码仓库不同步 今天在执行git pull时出现: 解决方法:执行git checkout -f,然后再执行git pull重新checkout 再执行git pull时就可以 ...

  8. (诊断)git review时出现fatal: ICLA contributor agreement requires current contact information.错误

    使用git review时出现错误: fatal: ICLA contributor agreement requires current contact information. Please re ...

  9. git push时提示"Everything up-to-date"

    从github上git clone下的项目,添加或修改文件后,git push时出现"Everything up-to-date" ,   即“一切都是最新的'. 通过 git s ...

  10. 如何修改git push时的密码

    如何修改git push时的密码 如下: 打开git bash 输入 cd ~/.ssh ls 确定有 id_rsa 和 id_rsa.pub文件 ssh-keygen -p -f id_rsa 第一 ...

随机推荐

  1. virtualbox+vagrant学习-3-Vagrant Share-5-Security

    Security 可以理解,分享你vagrant环境引发了一些安全问题. vagrant share的主要安全机制是通过隐藏的安全性以及SSH的加密密钥.此外,还有几个配置选项可用来帮助控制访问和管理 ...

  2. C#只能lock 引用类型的值 (转载)

    Lock:        C#只能lock 引用类型的值,如果lock一个int, bool,编译器会报错.    当一个互斥锁已被占用时,在同一线程中执行的代码仍可以获取和释放该锁.但是,在其他线程 ...

  3. 用HTML编写阿里云

    <!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8" ...

  4. 【OC底层】KVC原理

    定义 KVC的全称是Key-Value Coding,俗称“键值编码”,可以通过一个key来访问某个属性 常见的API有: - (void)setValue:(id)value forKeyPath: ...

  5. 内存管理与正则(re)模块

    内存管理 垃圾回收机制 不能被程序访问到的数据,就称之为垃圾 也就是失去了一个能够访问到值数据的名称空间,导致在内存中无作为 引用计数:是内存管理的原理 引用计数是用来记录值的内存地址被记录的次数 每 ...

  6. hadoop--hive数据仓库

    一.hive概述 Hive是基于 Hadoop 的一个[数据仓库工具],可以将结构化的数据文件映射为一张数据库表,并提供简单的 sql 查询功能,可以将 sql 语句转换为 MapReduce 任务进 ...

  7. 用NI的数据采集卡实现简单电子测试之4——半导体温度传感器

    本文从本人的163博客搬迁至此. 为了展示NImax(Measurement & Automation explorer)的强大配置功能,做了一个半导体温度传感器测试的示例. 一.半导体温度传 ...

  8. 在vivado中自定义编辑器

    在 Tools - Options - Text Editor 中选择 Custom Editor 这里我用的gvim,在Editor文本框中输入: C:/Vim/vim80/gvim.exe --r ...

  9. nodejs addon/module

    https://github.com/nodejs/node-addon-examples https://github.com/nodejs/node-gyp http://skitr.com/20 ...

  10. spark练习--由IP得到所在地

    今天我们就来介绍,如何根据一个IP来求出这个IP所在的地址是什么,首先我们如果要做这个内容,那么我们要有一个IP地址的所在地字典,这个我们可以在网上购买,形如: 1.0.1.0|1.0.3.255|1 ...