我在运行yarn eslint时收到以下错误
/…/src/a.js
4:1 error Expected indentation of 1 tab but found 2 spaces indent
4:43 error Strings must use singlequote quotes
5:1 error Expected indentation of 2 tabs but found 4 spaces indent
6:1 error Expected indentation of 1 tab b
我正在尝试转换为@typescript-eslint,但文档似乎非常缺乏。例如,我得到的错误如下: Line 58: Expected a semicolon @typescript-eslint/member-delimiter-style 我不想强制使用分号或逗号。我找到了该规则的文档。https://github.com/bradzacher/eslint-plugin-typescript/blob/master/docs/rules/member-delimiter-style.md 但是它似乎没有给出如何在真正的eslint文件中配置它的任何示例!有人知
在将eslint升级到8之后,我在每个测试模块上得到了以下错误:
error Definition for rule 'jest/valid-describe' was not found jest/valid-describe
eslintrc.json的一部分:
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
我目前在Types或Interfaces中收到了一个关于函数参数的eslint警告。
执行以下操作:
type Test = {
fn: (param: string) => void
}
将导致以下警告:
'param' is defined but never used. Allowed unused args must match /^_/u.
下面是我的.eslintrc.json的样子:
{
"root": true,
"parser": "@typescript-eslint/parser",
&
我正在使用create app+ typescript + eslint应用程序,在构建过程中有这样的错误:
Line 1:8: 'React' was used before it was defined @typescript-eslint/no-use-before-define
组件中的代码以以下代码开头:
import React from "react";
Eslint设置:
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
我已经将eslint添加到我的nestjs 7项目中,并与未使用的vars错误混淆。 我在模块、生命周期方法和服务上遇到错误。也得到了类型的错误 import { Controller, Get } from '@nestjs/common';
import {
HealthCheck,
HealthCheckService, ---> got here the the error
MongooseHealthIndicator, ---> got here the the error
} from '@nestjs/terminus