小编Tom*_*lin的帖子

在 Vim 状态行中显示多行流错误?

我正在使用 NVIM v0.2.2,并'w0rp/ale'配置为检查 Flow 错误。我在状态栏中看到一行错误消息。然而,流程错误往往是多行错误。如何配置编辑器以显示完整的多行流程错误?

这是我所看到的: 在此输入图像描述

这是我的nvim/init.vim文件:

" Install Vim Plug if not installed
if empty(glob('~/.config/nvim/autoload/plug.vim'))
  silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
    \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  autocmd VimEnter * PlugInstall
endif

call plug#begin()

Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
Plug 'rking/ag.vim'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-commentary'
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
Plug 'rakr/vim-one'
Plug 'itchyny/lightline.vim'
Plug 'w0rp/ale'

call plug#end()

let g:jsx_ext_required = 0 …
Run Code Online (Sandbox Code Playgroud)

vim eslint neovim flowtype vim-airline

5
推荐指数
1
解决办法
2633
查看次数

拖放赛普拉斯测试仅在Electron浏览器中失败

我已经根据似乎对人们有用的命令进行了拖放测试。该命令触发鼠标事件,这些事件被react-beautiful-dnd理解为拖放交互。在赛普拉斯GUI中,它的运行非常漂亮。我可以看到列表项正确拖放,并且测试通过。但是,当我运行在CI中使用的赛普拉斯电子浏览器时,它不起作用。尽管赛普拉斯通过我的选择器正确找到了可拖动元素,并调用了相同的鼠标事件触发器,但未报告任何类型的错误,但我看不到列表项移动。

我的假设是Cypress trigger方法在触发Electron浏览器中的某些事件时会遇到一些问题。任何提示或建议,不胜感激!

依存关系:

"cypress": "^3.1.4",
"react-beautiful-dnd": "^10.0.3",
"react": "^16.6.0"
Run Code Online (Sandbox Code Playgroud)

码:

/*
 * Drag and Drop
 *
 * Based on https://github.com/atlassian/react-beautiful-dnd/issues/162#issuecomment-448982174
 */
Cypress.Commands.add(
  'dragAndDrop',
  { prevSubject: 'optional' },
  (subject, offset = { x: 0, y: 0 }) => {
    const BUTTON_INDEX = 0;
    const SLOPPY_CLICK_THRESHOLD = 10;

    cy
      .wrap(subject)
      .first()
      .then(element => {
        const coords = element[0].getBoundingClientRect();

        // Use { force: true } to prevent Cypress from scrolling and interfering with the drag behavior.
        cy …
Run Code Online (Sandbox Code Playgroud)

reactjs electron cypress react-beautiful-dnd

5
推荐指数
0
解决办法
294
查看次数