在首选项中 设置:

"jshint.enable": false,

在根目录中建立eslintrc.yml

parser: babel-eslint
parserOptions:
ecmaFeatures:
jsx: true
modules: true
sourceType: module
plugins:
- babel
- react
env:
browser: true
es6: true
node: true
commonjs: true
globals:
__DEV__: true
__BUILD_TIME__: false
__COMMIT_HASH__: false
rules:
no-cond-assign: 0
no-constant-condition: 1
no-debugger: 1
no-dupe-args: 2
no-dupe-keys: 2
no-duplicate-case: 2
no-empty-character-class: 2
no-empty: 1
no-ex-assign: 2
no-extra-boolean-cast: 2
no-extra-semi: 2
no-func-assign: 2
no-inner-declarations: 2
no-invalid-regexp: 2
no-irregular-whitespace: 2
no-obj-calls: 2
no-sparse-arrays: 2
no-unexpected-multiline: 2
no-unreachable: 1
use-isnan: 2
valid-jsdoc:
- 0
- requireParamDescription: false
requireReturnDescription: false
requireReturn: false
prefer:
returns: returns
valid-typeof: 2
eqeqeq: 2
guard-for-in: 2
no-caller: 2
no-empty-pattern: 2
no-eq-null: 2
no-eval: 1
no-extend-native: 2
no-extra-bind: 2
no-multi-spaces: 2
no-multi-str: 2
no-new-wrappers: 2
no-redeclare: 2
no-self-assign: 2
no-throw-literal: 2
no-unused-labels: 2
no-useless-escape: 1
no-void: 0
no-with: 2
no-delete-var: 2
no-undef: 2
no-unused-vars:
- 1
- args: none
array-bracket-spacing:
- 2
- never
brace-style:
- 2
- 1tbs
- allowSingleLine: true
camelcase:
- 0
- properties: never
comma-dangle:
- 2
- never
comma-spacing: 2
comma-style: 2
computed-property-spacing: 2
eol-last: 2
func-call-spacing: 2
key-spacing: 2
keyword-spacing: 2
linebreak-style:
- error
- unix
max-len:
- 2
- code: 180
tabWidth: 2
ignoreUrls: true
new-cap: 0
no-array-constructor: 2
no-mixed-spaces-and-tabs: 2
no-multiple-empty-lines:
- 2
- max: 4
no-new-object: 2
one-var:
- 0
- var: never
let: never
const: never
padded-blocks:
- 2
- never
quote-props:
- 0
- consistent
quotes:
- 2
- single
- allowTemplateLiterals: true
require-jsdoc:
- 0
- require:
ClassDeclaration: true
semi-spacing: 2
semi: 'off'
space-before-blocks: 2
space-before-function-paren:
- 0
- always
spaced-comment:
- 1
- always
arrow-parens:
- 2
- as-needed
constructor-super: 2
generator-star-spacing:
- 2
- after
no-const-assign: 2
no-dupe-class-members: 2
no-new-symbol: 2
no-this-before-super: 2
no-var: 2
object-shorthand: 1
prefer-rest-params: 2
prefer-spread: 2
rest-spread-spacing: 2
yield-star-spacing:
- 2
- after
babel/object-curly-spacing: 0
react/display-name: 0
react/jsx-boolean-value: 1
react/jsx-closing-bracket-location: 2
react/jsx-curly-spacing: 0
react/jsx-max-props-per-line: 0
react/jsx-indent-props:
- 0
- 2
react/jsx-no-duplicate-props: 1
react/jsx-no-undef: 2
react/jsx-pascal-case: 1
react/sort-prop-types: 0
react/jsx-sort-props: 0
react/jsx-uses-react: 1
react/no-danger: 0
react/no-did-mount-set-state: 1
react/no-did-update-set-state: 2
react/no-multi-comp: 0
react/no-unknown-property: 1
react/react-in-jsx-scope: 0
react/self-closing-comp: 1
react/sort-comp: 1
react/jsx-uses-vars: 2

vscode 支持es6语法的更多相关文章

  1. 让intellij idea 14 支持ES6语法

    用eclipse做前端开发,用到了webpack,结果各种依赖导致软件卡的一比,简直不能动!虽然在同事的帮忙下,修改了一下配置,但仍然卡的没脾气.改用intellij idea 14解决了卡的问题,但 ...

  2. nuxt 脚手架创建nuxt项目中不支持es6语法的解决方案

    node本身并不支持es6语法,我们通常在vue项目中使用es6语法,是因为,我们使用babel做过处理, 为了让项目支持es6语法,我们必须同时使用babel 去启动我们的程序,所以再启动程序中加 ...

  3. 使用babel转码器,让浏览器支持es6语法

    ECMAScript 6.0(以下简称 ES6)是 JavaScript 语言的下一代标准,可是很多浏览器并不支持es6语法,所以我们需要一个转码工具, 把es6的语法转换成浏览器支持的javascr ...

  4. Webpack 4.x 默认支持 ES6 语法

    Webpack 4.x 默认支持 ES6 语法 Q: 为什么 webpack4 默认支持 ES6 语法的压缩? A: terser 里面实现了 ES6 语法的 AST解析. webpack 4 里使用 ...

  5. 如何让浏览器支持ES6语法,步骤详细到小学生都能看懂!

    为什么ES6会有兼容性问题? 由于广大用户使用的浏览器版本在发布的时候也许早于ES6的定稿和发布,而到了今天,我们在编程中如果使用了ES6的新特性,浏览器若没有更新版本,或者新版本中没有对ES6的特性 ...

  6. 华为手机自带浏览器不支持 ES6 语法

    原文地址:https://caochangkui.github.io/huawei-es6/ 华为手机自带浏览器对 es6 语法的支持度极差,哪怕最新的荣耀10 手机也有该毛病!所以,移动端项目开发中 ...

  7. 设置webstorm支持ES6语法

    1.  点击File目录下的Default Settings 2.  再依次点击Languages & Frameworks  ----->  JaveScript  ----> ...

  8. webpack在nodejs中应用(支持es6语法及热加载)

    安装 npm i webpack webpack-cli @babel/core babel-loader @babel/preset-env @babel/node clean-webpack-pl ...

  9. Webstorm 不识别es6 import React from ‘react’——webstorm不支持jsx语法怎么办

    2016-10-31更新 webstorm不支持es6语法怎么办? webstorm不支持jsx语法怎么办? 参考:webstorm不支持jsx语法怎么办 I spent ages trying to ...

随机推荐

  1. hdoj1435 Stable Match(稳定婚姻问题)

    简单稳定婚姻问题. 题目描述不够全面,当距离相同时容量大的优先选择. 稳定婚姻问题不存在无解情况. #include<iostream> #include<cstring> # ...

  2. Java 日期加减

    import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Date; public class Test ...

  3. 用node.js写一个简单爬虫,并将数据导出为 excel 文件

    引子 最近折腾node,最开始像无头苍蝇一样到处找资料,然而多数没什么卵用,都在瞎比比.在一阵瞎搞后,我来分享一下初步学习node的三个过程: 1 撸一遍NODE入门,对其有个基本的了解: 2 撸一遍 ...

  4. 3.修改更新源sources.list,提高软件下载安装速度(2017.04.05)

    2017年4月5日再次更新源 1.切换到root用户(如果已经是root用户就直接看第二步) dnt@HackerKali:~$ su 密码: 2.用文本编辑器打开sources.list,手动添加下 ...

  5. JS-DOM Element方法和属性

    JS-DOM Element方法和属性 S-DOM Element方法和属性一,获取html元素1.getElementByID(id)通过对元素的ID访问,这是DOM一个基础的访问页面元素的方法.e ...

  6. day 42 mysql 数据库(2)

    前情提要: 本节继续学习数据库   一:ddl 创建表 >字段名 >数据类型 >约束规则 >显示建表语句 修改表: 二:数据类型 >数值类型 >小数类型 >字 ...

  7. python安装mysqlclient模块时报mysql_config not found解决方法

    在配置Flask框架,安装mysqlclient时报一下错误 翻译了一下大概是 mysql_config  文件没找到, 解决方法是安装缺失的文件. sudo apt install libmysql ...

  8. Android 开发工具类 32_通过 HTTP 协议实现文件上传

    完成像带有文件的用户数据表单的上传,而且可以上传多个文件,这在用户注册并拍照时尤其有用. import java.io.BufferedReader; import java.io.ByteArray ...

  9. Ubuntukylin-14.04-desktop(带分区)安装步骤详解

    不多说,直接上干货! 成功! Ubuntukylin-14.04-desktop( 不带分区)安装步骤详解 Ubuntukylin-14.04-desktop( 不带分区)安装步骤详解 Ubuntu1 ...

  10. 【原】SPARK_MEM和SPARK_WORKER_MEMORY的区别

    SPARK_MEM:设置每个Job(程序)在每个节点可用的内存量:(默认为512m) SPARK_WORKER_MEMORY:设置集群中每个节点分配的最大内存量:(默认为内存总量减去1G)