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. 数字电路中应避免产生不必要的锁存器 Latch

    锁存器(Latch)是数字逻辑电路中很重要的一种基本电路,常见的锁存器包括三个端口:数据输入口.数据输出口.使能端.当使能端为高电平时,输入口的数据直接送到输出口,此时输入输出口可以看成是直接连通的: ...

  2. windows 下nginx配置php支持

    修改nginx配置 location ~ \.php$ { root D:/Learn/php/test/; fastcgi_pass ; fastcgi_index index.php; fastc ...

  3. kubernetes dns 初步理解和使用 dnsmasq dns服务器跟host机器同步

    1.安装DNS后,pod就可以通过dns来解析service,从而实现通信 2.创建一个dns测试工具pod apiVersion: extensions/v1beta1 kind: Deployme ...

  4. spark机制理解(一)

    一  基本术语 Application:  基于Spark的用用户程序,包含了Driver程序和集群上的Executor. Driver Program: 运行行main函数并且新建SparkCont ...

  5. Mac OS X 命令行用户应当知道的八个终端工具

    原文链接:Eight Terminal Utilities Every OS X Command Line User Should Know OS X  的Terminal 终端开辟了强大的UNIX实 ...

  6. ArcGIS中的坐标系统定义与投影转换(转)

    ArcGIS中的坐标系统定义与投影转换 ArcGIS中的坐标系统定义与投影转换 坐标系统是GIS数据重要的数学基础,用于表示地理要素.图像和观测结果的参照系统,坐标系统的定义能够保证地理数据在软件中正 ...

  7. PHP代码优化—array_push

    PHP中数组插入数据通常有这么几种: 定义的时候直接赋值 $arr = array('apple', 'banana'); 使用数组变量操作 $arr = array(); $arr[] = 'app ...

  8. MySQL数据表命令

    显示表的相关信息: show table status like "表名": show table status like "表名" \G       格式化, ...

  9. 分子量 (Molar Mass,ACM/ICPC Seoul 2005,UVa1586)

    习题 3-3 分子量 (Molar Mass,ACM/ICPC Seoul 2005,UVa1586) 给出一种物质的分子式(不带括号),求分子量.本题中的分子式只包含4种原子,分别为C,H,O,N, ...

  10. scala 读取文件加下的指定文件

    1,获取指定类型文件 def getFile(file:File): Array[File] ={ val files = file.listFiles().filter(! _.isDirector ...