eslint配置 关闭===代替==的告警 总是提示添加句尾分号

.eslintrc.js 中 rules配置选项

  • 总是提示添加句尾分号;
  • 关闭===代替==的告警
  • 关闭switch没有default的告警
  • 关闭数组函数没有return的告警
  • 关闭a标签href无url的告警
  • 关闭jsx a标签无效的告警
  • 关闭jsx a标签无内容的告警
rules:
{
	'semi': ["error", 0], // 0 = off, 1 = warn, 2 = error
	'eqeqeq': 'off', // 关闭===代替==的告警
	'default-case': 'off', // 关闭switch没有default的告警
	'array-callback-return': 'off', // 关闭数组函数没有return的告警
	'no-script-url': 'off', // 关闭a标签href无url的告警
	'jsx-a11y/anchor-is-valid': 'off', // 
	'jsx-a11y/anchor-has-content': 'off' // 关闭jsx a标签无内容的告警
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章