css格式化 要在vscode装:
Beautify css/sass/scss/less
js格式化要装
ESLint
.vscode 里面设置
{
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.options": {
"extensions": [
".js",
".ts",
".tsx"
]
}
}
esLine.json
{
"env": {
"node": true,
"mocha": true,
"jest": true,
"es6": true,
"browser": true
},
"extends": ["alloy", "alloy/react", "alloy/typescript"],
"globals": {
"window": true,
"JSX": true,
"React": true,
"NodeJS": true,
"Promise": true
},
"rules": {
"semi": ["error", "never"],
"quotes": ["error", "double"],
"no-alert": 2,
"arrow-spacing": 2,
"key-spacing": 2,
"no-restricted-imports": "off",
"@typescript-eslint/no-require-imports": 0,
"no-debugger": 0,
"@typescript-eslint/no-debugger": 0
}
}