我正在尝试在如下所示的Next.js project.The文件结构中实现eslint
.eslintignore
.eslintrc.js
.next
.prettierrc
.stylelintrc.js
components
forms
modals
modules
node_modules
我的.eslintignore文件中有node_modules/*。当我尝试用eslint --fix /sources/**/*.js来处理这些东西时,我得到了下面的错误
You are linting "/sources/node_modules/ally.js", but al
在monorepo设置中,有些ESLint插件没有安装,而plugins数组中没有列出这些插件,这会导致错误。
我的项目在packages/**下有几个包
yarn lint
yarn run v1.15.2
$ eslint --config .eslintrc ./
Oops! Something went wrong! :(
ESLint: 5.16.0.
ESLint couldn't find the plugin "eslint-plugin-airbnb". This can happen for a couple different reasons:
我的react应用程序在使用npm start时正常工作,但当我尝试npm run build时,我遇到了麻烦。
Oops! Something went wrong! :(
ESLint: 6.8.0.
ESLint couldn't find the config "developit" to extend from. Please check that the name of the config is correct.
The config "developit" was referenced from the config file in
我正在为一个在浏览器JS引擎中运行的Javascript项目使用VSCode;它永远不会也不能在Node.js中运行。但智能感知非常戏剧性地警告我的代码中在Node.js中被弃用的功能。有没有办法告诉它,这不是一个节点,而是一个浏览器项目,只得到相关的警告? Strikethrough in code and warning in Intellisense popup
我收到一个错误:-
Parsing error: "parserOptions.project" has been set for u/typescript-eslint/parser.
The file does not match your project config: .eslintrc.js.
The file must be included in at least one of the projects provided.
IDE - WebStorm 20.1.1
项目结构:-
node_modules
src
--- testfile.js
.esl
我正在尝试将React CSS模块添加到我的项目中,但我遇到了eslint的问题。我的登录视图如下所示:
import React, { PropTypes as T } from 'react';
import {ButtonToolbar, Button} from 'react-bootstrap';
import Messages from '../Messages/Messages';
import AuthService from '../../utils/AuthService';
import CSSModul
在NextJs中执行npm run build时,我想禁用某些文件夹的eslint
我不想像这样配置:
module.exports = {
eslint: {
dirs: ['pages', 'utils'], // Only run ESLint on the 'pages' and 'utils' directories during production builds (next build)
},
}
因为添加所有有效文件夹比较复杂,但是if I could pass some folders to be
我正在执行一个包含以下内容的docker文件。
# Run npm install
RUN cd /srv/package/ && npm install --loglevel info && npm cache clean
WORKDIR ${HOME}
COPY ./.eslintrc.json \
./.eslintignore/
# Clean up environment
USER root
由于我的复制指令没有正确结束,我得到了以下错误。
Step 6 : COPY ./.eslintrc.json ./.eslintignore USER r