我正在为一个项目使用NestJ框架。今天,EsLint发现了587个错误的问题。
所有装饰器都会产生此错误:
warning 'IsBoolean' is defined but never used @typescript-eslint/no-unused-vars
warning 'IsEmail' is defined but never used @typescript-eslint/no-unused-vars
warning 'IsEnum' is defined but never used
我有一个Vue.js 2项目,我要移植到TypeScript (一次有点)。我试图让ESLint解析我的TypeScript文件和Vue组件,但是当我运行vue-cli-service lint时,所有的.vue文件都报告了这个错误:
error: Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: src/path/to/Foo.vue.
The file must be i
我是Vue生态系统的新手,我正试图在一个测试项目中获得干净的eslint-plugin-vue结果。在下面的测试Home.vue文件中,我得到了一个警告:The "HelloWorld" component has been used but not registered (vue/no-unregistered-components)。有什么语法上正确的方法来清理这件事?
这是否是 ESLint规则本身的一个限制,即它不承认export default class Home extends Vue {}和@Component(...)语法?
<template>
我在react app + typescript中遇到了奇怪的eslint问题。我正在使用样式化的组件,我需要为我的组件创建自定义的道具接口,我遵循了文档,当我像在文档中编写示例时,我得到了这个eslint错误?有人知道这是怎么回事吗?
*eslint gives error here StyledMenuButtonProps is defined but never used*
interface StyledMenuButtonProps {
opened: boolean;
}
*and here the error is StyledMenuButtonProps is not
在将angular从9升级到10并运行npm run lint之后,我得到了这个实验> ng lint --fix
Schema validation failed with the following errors:
Data path "" should NOT have additional properties(tsConfig).
我的angular.json是:
..."lint": {
"builder": "@angular-eslint/builder:lint",
ESLint似乎无法解析".eslintrc.js“文件。
复制步骤:我设置了一个新的"hello world“TypeScript项目,如下所示:
# Make a new directory for our new project
mkdir test
# Go into the new directory
cd test
# Create a "package.json" file
npm init --yes
# Install TypeScript
npm install typescript --save-dev
# Install ESLint (
我正在使用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: {