Javascript 允许重复常量值的eslint
出于某种原因,这并不是说我不能这么做。有人知道我可以在我的皮棉上加些什么使它无效吗 这确实会引起问题,因为如果我最终做了类似于Javascript 允许重复常量值的eslint,javascript,typescript,eslint,Javascript,Typescript,Eslint,出于某种原因,这并不是说我不能这么做。有人知道我可以在我的皮棉上加些什么使它无效吗 这确实会引起问题,因为如果我最终做了类似于duplicateName=duplicateName的事情,它显然不起作用 const duplicateName = "Hi"; if(1 == 1) { const duplicateName = "Hey" } 皮棉 const声明是块作用域的。@AluanHaddad是的,我知道,在eslint中有什么方法可以阻止它吗?所以你想禁止阴影?那是rea
duplicateName=duplicateName
的事情,它显然不起作用
const duplicateName = "Hi";
if(1 == 1) {
const duplicateName = "Hey"
}
皮棉
const
声明是块作用域的。@AluanHaddad是的,我知道,在eslint中有什么方法可以阻止它吗?所以你想禁止阴影?那是reasonable@AluanHaddad很抱歉,我不知道它的名称,但这似乎是我正在尝试做的。const
声明是块作用域的。@AluanHaddad是的,我知道,在eslint中有方法阻止它吗?所以你想禁止阴影?那是reasonable@AluanHaddad对不起,我不知道它叫什么,但这似乎是我想做的。
{
"env": {
"es6": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint"
],
"rules": {
"indent": [
"error",
"tab"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
}