Comments (10)
已修复,请下载 v4.9.0 版本
from eslint-config-alloy.
这个是 eslint-config-alloy 的构建脚本自动添加的。
因为 eslint-plugin-vue 的 eqeqeq 规则继承了 coreRule:
https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/eqeqeq.js#L9
https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/utils/index.js#L505
from eslint-config-alloy.
不过如vue-plugin-vue所说,这并不是他们要做的事情,而应该是alloy 要做的事情。所以,我们要打开这条规则吗?
from eslint-config-alloy.
现在 vue 规则是关闭了 eqeqeq
开启了 vue/eqeqeq
。这样子做会有什么问题吗?
from eslint-config-alloy.
因为 typescript 规则里,所有继承 coreRule 的规则,都需要先关闭 core rule 再开启 ts rule,否则执行 eslint 检查时会有 bug。
所以这个构建流程也继承到了 vue 规则里
from eslint-config-alloy.
我的期望正如注释中所写必须使用 === 或 !==,禁止使用 == 或 !=,但是目前使用extends: ["alloy", "alloy/vue"]
的配置。无论是在*.js
文件或者在*.vue
文件的script
标签中,==
或者!=
都不会出现ESLint的报错。
from eslint-config-alloy.
在我另一个使用了extends: ["alloy", "alloy/typescript"],
配置的项目中,最终规则却是"eqeqeq": [ "error", "always" ],
,并且在*.ts
和*.js
中都是生效的,所以vue/eqeqeq
这条规则,目前看来是有问题的。
from eslint-config-alloy.
无论是在
*.js
文件或者在*.vue
文件的script
标签中,==
或者!=
都不会出现ESLint的报错。
在 *.vue
文件中应该是生效的,可以 clone 本项目,在这个文件 https://github.com/AlloyTeam/eslint-config-alloy/blob/master/test/vue/eqeqeq/bad.vue 中应该可以看到有报错信息
from eslint-config-alloy.
在 *.ts
和 *.js
文件中不生效可能是有问题的,我考虑一下 vue 不要去使用 ts 同样的构建流程吧。可能在 vue 中还是需要 eqeqeq
和 vue/eqeqeq
都开启
from eslint-config-alloy.
无论是在
*.js
文件或者在*.vue
文件的script
标签中,==
或者!=
都不会出现ESLint的报错。在
*.vue
文件中应该是生效的,可以 clone 本项目,在这个文件 https://github.com/AlloyTeam/eslint-config-alloy/blob/master/test/vue/eqeqeq/bad.vue 中应该可以看到有报错信息
这个确实可以,但是是在*.vue
文件的template
中生效,并没有在*.vue
文件的script
标签中生效,建议你把这个测试用例中加入script
的测试。
from eslint-config-alloy.
Related Issues (20)
- vite 新建react-ts 模板,报错且不生效
- Typo: no-unused-vars HOT 1
- [feature] eslint-config-alloy@3 中建议将parser由babel-eslint升级为@babel/eslint-parser HOT 2
- TypeScript should disable "no-undef" HOT 1
- 请问一下有没有对 typescript 5 的支持计划 HOT 1
- 安装[email protected]版本报错 HOT 5
- 为什么要启用这个 prefer-object-has-own 规则,有兼容性问题 HOT 1
- consistent type export/import HOT 6
- [feature] eslint rules conflict with mocha timeout HOT 1
- @typescript-eslint/parser 更新到 6.5.0 以上版本后报错 Error while loading rule '@typescript-eslint/consistent-type-assertions'
- vue/cli 5.0.8版本使用ts+vue的例子时,出现ERROR HOT 1
- 是否可以加入import排序配置 HOT 1
- 什么时候会适配新的eslint.config.js HOT 2
- 是否开个新坑呢?关于biomejs HOT 2
- [feature] 考虑一个alloy版本兼容不同语言,比如vue2/vue3/typescript4/typescript5 HOT 4
- 提供的 example 无法使用 HOT 4
- no-undef 规则默认关闭的原因是什么? HOT 1
- 请问 @babel/core @babel/eslint-parser 是否还有必要安装
- 当前提供的库和vue命令行安装的库并不相同,是否同步为官方推荐的库? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-config-alloy.