ESLint
代码规范和错误检查工具
Prettier - Code formatter / Prettier ESLint
代码规范
自动格式化工具配合上线ESLint使用绝配
快捷键 shift+option+f
配置项目根目录下.prettierrc.js/.prettierrc
module.exports = {
// 一行最多 100 字符
printWidth: 100,
// 使用 2 个空格缩进
tabWidth: 2,
// 不使用缩进符,而使用空格
useTabs: false,
// 行尾需要有分号
semi: true,
// 使用单引号
singleQuote: true,
// 对象的 key 仅在必要时用引号
quoteProps: 'as-needed',
// jsx 不使用单引号,而使用双引号
jsxSingleQuote: false,
// 末尾不需要逗号
trailingComma: 'all',
// 大括号内的首尾需要空格
bracketSpacing: true,
// jsx 标签的反尖括号需要换行
jsxBracketSameLine: false,
// 箭头函数,只有一个参数的时候,也需要括号
arrowParens: 'always',
// 每个文件格式化的范围是文件的全部内容
rangeStart: 0,
rangeEnd: Infinity,
// 不需要写文件开头的 @prettier
requirePragma: false,
// 不需要自动在文件开头插入 @prettier
insertPragma: false,
// 使用默认的折行标准
proseWrap: 'preserve',
// 根据显示样式决定 html 要不要折行
htmlWhitespaceSensitivity: 'css',
// 换行符使用 lf
endOfLine: 'auto',
};
TODO Tree
快速定位到 TODO的位置 TODO标签高亮


Auto Rename Tag
自动重命名标签

Color Highlight
高亮你所输入的颜色

ES7 React/Redux/GraphQL/React-Native snippets
生成模板组件、补全react代码

indent-rainbow
高亮(每行代码之前的)缩进

code-spell-checker
拼写检查

Bracket Pair Colorizer 2
括号标记不同的颜色 可以方便查看每一对{}、()对应关系

GitLens — Git supercharged
git查看日志
每一行代码的对应关系都很清晰

vscode-styled-components
styled-components的配套vscode插件,语法提示 、高亮
Debugger for Chrome
vscode chrome 调试插件
vscode-chrome-debug文档
Image preview
Shows image preview in the gutter and on hover

网友评论