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. 拥抱.NET Core系列:MemoryCache 缓存过期 (转载)

    阅读目录 MSCache项目 MSCache提供的过期方式 绝对时间到期 滑动时间到期 自定义过期策略 过期策略组合拳 缓存过期回调 写在最后 在上一篇”拥抱.NET Core系列:MemoryCac ...

  2. 大数据入门:Maven项目的创建及相关配置

    目录 Maven项目的创建及相关配置 一.Maven的介绍 1.Maven是什么: 2.Maven作用: 3.Maven项目的目录结构: 4.Maven的三点坐标: 5.maven的pom文件: 6. ...

  3. Scrapy-从数据库取出IP并判断是否可用

    import pymysql import requests conn = pymysql.connect(host="localhost",user="root&quo ...

  4. Golint的简易使用方法

    根据作者的说法: Golint is a linter for Go source code. Golint differs from gofmt. Gofmt reformats Go source ...

  5. 十张图了解Docker【转】

    这篇文章希望能够帮助读者深入理解Docker的命令,还有容器(container)和镜像(image)之间的区别,并深入探讨容器和运行中的容器之间的区别. 当我对Docker技术还是一知半解的时候,我 ...

  6. c++ 常量指针

    一.指向常量的指针 定义形式: const 类型 * 指针名; 不能通过指针修改地址里的值. int i=0x123; const int *p=&i; *p=; //错误 //前置const ...

  7. 【CQOI2017】小Q的棋盘

    题面 题解 根据题意,不回头是最好的(显然法) \(dfs\)找到最长链,设长度为\(\mathrm{L}\),然后分类讨论: 如果\(\mathrm{L} > m\),答案就是\(m + 1\ ...

  8. jzoj5341 捕老鼠

    Description 为了加快社会主义现代化,建设新农村,农夫约(Farmer Jo)决定给农庄里的仓库灭灭鼠.于是,猫被农夫约派去捕老鼠. 猫虽然擅长捕老鼠,但是老鼠们太健美了,身手敏捷,于是猫想 ...

  9. Eclipse实用插件

    Eclipse实用插件 安装:Help - Eclipse Marketplace 查看图片:QuickImage 主题:Darkest Dark 代码风格:https://blog.csdn.net ...

  10. 关于Memcached 你了解多少?

    好久没有写博客了,自从年后到现在要么就是加班 要么还是在加班 基本都是到夜里1点多 通宵的干,事情太多,项目太急  .难得今天闲暇一段时间来,看看书,写一写博客,没事就再重新的研究一下关于Memcac ...