ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

js eslint语法规范错误提示代码

2021-09-24 14:02:53  阅读:203  来源: 互联网

标签:function use Unexpected js 语法 eslint Expected instead saw


  1 “Missing semicolon.” : “缺少分号.”,
  2 
  3 “Use the function form of \”use strict\”.” : “使用标准化定义function.”,
  4 
  5 “Unexpected space after ‘-’.” : “在’-'后面不应出现空格.”,
  6 
  7 “Expected a JSON value.” : “请传入一个json的值.”,
  8 
  9 “Mixed spaces and tabs.”: “空格和TAB重复.”,
 10 
 11 “Unsafe character.” : “不安全的字符.”,
 12 
 13 “Line too long.”: “本行中的字符超过设定的最大长度.”,
 14 
 15 “Trailing whitespace.”: “本行末尾有过多无用空格.”,
 16 
 17 “Script URL.” : “脚本URL.”,
 18 
 19 “Unexpected {a} in ‘{b}’.” : “在 ‘{b}’ 中不该出现 {a}.”,
 20 
 21 “Unexpected ‘{a}’.” : “不该在此出现’{a}’.”,
 22 
 23 “Strings must use doublequote.” : “字符串需要用双引号”,
 24 
 25 “Unnecessary escapement.” : “不需要转义”,
 26 
 27 “Control character in string: {a}.” : “在字符串中出现了Control的字符”,
 28 
 29 “Avoid \\’.” : “避免 \\”,
 30 
 31 “Avoid \\v.” : “避免 \\v”,
 32 
 33 “Avoid \\x-.” : “避免 \\x-”,
 34 
 35 “Bad escapement.” : “错误的转义字符”,
 36 
 37 “Bad number ‘{a}’.” : “错误的数字 ‘{a}’”,
 38 
 39 “Missing space after ‘{a}’.” : “在’{a}’之后缺少空格”,
 40 
 41 “Don’t use extra leading zeros ‘{a}’.” : “不要再’{a}’的前面用多余的0″,
 42 
 43 “Avoid 0x-. ‘{a}’.” : “避免使用 0x-. ‘{a}’.”,
 44 
 45 “A trailing decimal point can be confused with a dot ‘{a}’.” : “在’{a}’中使用点尾随小数点”,
 46 
 47 “Unexpected comment.” : “不该在此处出现注释”,
 48 
 49 “Unescaped ‘{a}’.” : “没有转义 ‘{a}’”,
 50 
 51 “Unexpected control character in regular expression.” : “在正则表达式中出现了control字符”,
 52 
 53 “Unexpected escaped character ‘{a}’ in regular expression.” : “在正则表达式中出现了没有转义的字符 ‘{a}’”,
 54 
 55 “Expected ‘{a}’ and instead saw ‘{b}’.” : “应该用 ‘{a}’代替’{b}’”,
 56 
 57 “Spaces are hard to count. Use {{a}}.” : “空格难以统计,请使用 {{a}}”,
 58 
 59 “Insecure ‘{a}’.” : “不安全的 ‘{a}’”,
 60 
 61 “Empty class.” : “空的class”,
 62 
 63 “Expected a number and instead saw ‘{a}’.”:“应该用数字代替’{a}’”,
 64 
 65 “‘{a}’ should not be greater than ‘{b}’.”:“‘{a}’不应该比’{b}’大”,
 66 
 67 “‘hasOwnProperty’ is a really bad name.”: “‘hasOwnProperty’是关键字”,
 68 
 69 “‘{a}’ was used before it was defined.”:“‘{a}’未定义就已经使用了.”,
 70 
 71 “‘{a}’ is already defined.”:“‘{a}’被重复定义”,
 72 
 73 “A dot following a number can be confused with a decimal point.”:“数字后面的一个点会被误认为是十进制的小数点”,
 74 
 75 “Confusing minusses” : “容易混淆的负数表达-”,
 76 
 77 “Confusing plusses.” : “容易混淆的正数表达+”,
 78 
 79 “Unmatched ‘{a}’.” : “无法匹配的’{a}’”,
 80 
 81 “Expected ‘{a}’ to match ‘{b}’ from line {c} and instead saw ‘{d}’.”:“在行{c}中需要用’{a}’和’{b}’匹配,用来代替’{d}’”,
 82 
 83 “Unexpected early end of program.”:“程序不可预期的提前终止”,
 84 
 85 “A leading decimal point can be confused with a dot: ‘.{a}’.”:“‘{a}’前的点容易混淆成小数点”,
 86 
 87 “Use the array literal notation [].”:“使用数组的符号 []“,
 88 
 89 “Expected an operator and instead saw ‘{a}’.”:“需要用一个符号来代替’{a}’”,
 90 
 91 “Unexpected space after ‘{a}’.”:“在’{a}’之后不能出现空格”,
 92 
 93 “Unexpected space before ‘{a}’.”:“在’{a}’之前不能出现空格”,
 94 
 95 “Bad line breaking before ‘{a}’.”:“在’{a}’之前错误的换行”,
 96 
 97 “Expected ‘{a}’ to have an indentation at {b} instead at {c}.”:“‘{a}’需要在{c}而不是{b}处缩进”,
 98 
 99 “Line breaking error ‘{a}’.”:“换行错误 ‘{a}’”,
100 
101 “Unexpected use of ‘{a}’.”:“此处不能用’{a}’”,
102 
103 “Bad operand.”:“错误的操作数”,
104 
105 “Use the isNaN function to compare with NaN.”:“使用isNaN来与NaN比较”,
106 
107 “Confusing use of ‘{a}’.”:“容易混淆的’{a}’的使用”,
108 
109 “Read only.”:“只读的属性”,
110 
111 “‘{a}’ is a function.”:“‘{a}’是一个函数”,
112 
113 ‘Bad assignment.’:“错误的赋值”,
114 
115 “Do not assign to the exception parameter.”:“不要给额外的参数赋值”,
116 
117 “Expected an identifier in an assignment and instead saw a function invocation.”:“在赋值的语句中需要有一个标识符,而不是一个方法的调用”,
118 
119 “Expected an identifier and instead saw ‘{a}’ (a reserved word).”:“需要有一个标识符,而不是’{a}’(保留字符)”,
120 
121 “Missing name in function declaration.”:“在方法声明中缺少名称”,
122 
123 “Expected an identifier and instead saw ‘{a}’.”:“需要有一个标识符,而不是’{a}’”,
124 
125 “Inner functions should be listed at the top of the outer function.”:“内部函数的声明应该放在此函数的顶部。”,
126 
127 “Unreachable ‘{a}’ after ‘{b}’.”:“在’{b}’之后无法获取’{a}’”,
128 
129 “Unnecessary semicolon.”:“不必要的分号”,
130 
131 “Label ‘{a}’ on {b} statement.”:“将’{a}’放在{b}的声明中”,
132 
133 “Label ‘{a}’ looks like a javascript url.”:“‘{a}’看上去像一个js的链接”,
134 
135 “Expected an assignment or function call and instead saw an expression”:“需要一个赋值或者一个函数调用,而不是一个表达式.”,
136 
137 “Do not use ‘new’ for side effects.”:“不要用’new’语句.”,
138 
139 “Unnecessary \”use strict\”.”:“不必要的\”use strict\”.”,
140 
141 “Missing \”use strict\” statement.”:“缺少\”use strict\”的声明”,
142 
143 “Empty block.”:“空的模块”,
144 
145 “Unexpected /*member ‘{a}’.”:“不应出现 /*元素 ‘{a}’.”,
146 
147 “‘{a}’ is a statement label.”:“‘{a}’是一个声明”,
148 
149 “‘{a}’ used out of scope.”:“‘{a}’使用超出范围”,
150 
151 “‘{a}’ is not allowed.”:“不允许使用’{a}’”,
152 
153 “‘{a}’ is not defined.”:“‘{a}’没有被定义”,
154 
155 “Use ‘{a}’ to compare with ‘{b}’.”:“使用’{a}’与’{b}’相比”,
156 
157 “Variables should not be deleted.”:“变量需要被删除”,
158 
159 “Use the object literal notation {}.”:“使用对象的文字符号 {}”,
160 
161 “Do not use {a} as a constructor.”:“不要使用{a}作为一个构造对象”,
162 
163 “The Function constructor is eval.”:“The Function constructor is eval.”,
164 
165 “A constructor name should start with an uppercase letter.”:“一个构造对象的名称必须用大写字母开头.”,
166 
167 “Bad constructor.”:“错误的构造对象”,
168 
169 “Weird construction. Delete ‘new’.”:“构造对象有误,请删除’new’”,
170 
171 “Missing ‘()’ invoking a constructor.”:“缺少括号()”,
172 
173 “Avoid arguments.{a}.”:“避免参数.{a}.”,
174 
175 “document.write can be a form of eval.”:“document.write是eval的一种形式”,
176 
177 ‘eval is evil.’:“尽量不要使用eval”,
178 
179 “Math is not a function.”:“Math不是一个函数”,
180 
181 “Missing ‘new’ prefix when invoking a constructor.”:“此处缺少了’new’”,
182 
183 “Missing radix parameter.”:“缺少参数”,
184 
185 “Implied eval is evil. Pass a function instead of a string.”:“传递一个函数,而不是一个字符串”,
186 
187 “Bad invocation.”:“错误的调用”,
188 
189 “['{a}'] is better written in dot notation.”:“['{a}']最好用点.的方式”,
190 
191 “Extra comma.”:“多余的逗号”,
192 
193 “Don’t make functions within a loop.”:“不要用循环的方式创建函数”,
194 
195 “Unexpected parameter ‘{a}’ in get {b} function.”:“在{b}方法中不该用到参数’{a}’”,
196 
197 “Duplicate member ‘{a}’.”:“重复的’{a}’”,
198 
199 “Expected to see a statement and instead saw a block.”:“此处应该是语句声明.”,
200 
201 “Too many var statements.”:“过多var的声明”,
202 
203 “Redefinition of ‘{a}’.”:“‘{a}’被重复定义”,
204 
205 “It is not necessary to initialize ‘{a}’ to ‘undefined’.”:“无需将’{a}’初始化为’undefined’”,
206 
207 “Expected a conditional expression and instead saw an assignment.”:“此处需要一个表达式,而不是赋值语句”,
208 
209 “Expected a ‘break’ statement before ‘case’.”:“在’case’之前需要有’break’.”,
210 
211 “Expected a ‘break’ statement before ‘default’.”:“在’default’之前需要有’break’.”,
212 
213 “This ‘switch’ should be an ‘if’.”:“此处’switch’应该是’if’.”,
214 
215 “All ‘debugger’ statements should be removed.”:“请删除’debugger’的语句”,
216 
217 “‘{a}’ is not a statement label.”:“‘{a}’不是一个声明标签.”,
218 
219 “Expected an assignment or function call and instead saw an expression.”:“需要一个语句或者一个函数调用,而不是一个表达式”,
220 
221 “Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.”:“函数的声明不能放在类似if的块中,需要放在外部函数的顶部.”

 链接来源:https://www.jianshu.com/p/b02f6b15cd09

标签:function,use,Unexpected,js,语法,eslint,Expected,instead,saw
来源: https://www.cnblogs.com/dreamtt/p/15330042.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有