@jxstjh/eslint-config-standard
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "@jxstjh/eslint-config-standard", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "@jxstjh内部vue eslint规则", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,10 +12,42 @@ /* eslint-disable max-len */ | ||
// log end | ||
const SETJSON = { | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"eslint.format.enable": true, | ||
"eslint.validate": [ | ||
"javascript", | ||
"vue", | ||
"html" | ||
], | ||
"vetur.validation.template": false, | ||
"prettier.eslintIntegration": true, //让prettier使用eslint的代码格式进行校验 | ||
"editor.formatOnPaste": true, | ||
"editor.formatOnType": true, | ||
"editor.formatOnSave": false, | ||
"files.eol": "\n" | ||
} | ||
// make vscode setting.json start | ||
const pwd = (resolve('../../../.vscode/settings.json')); | ||
// make vscode setting.json start | ||
console.log(__dirname) | ||
console.log(process.cwd()) | ||
console.log(resolve('./')) | ||
function creatSetting() { | ||
const writeFileRecursive = function (path, buffer, callback) { | ||
let lastPath = path.substring(0, path.lastIndexOf("/")); | ||
fs.mkdir(lastPath, { recursive: true }, (err) => { | ||
if (err) return callback(err); | ||
fs.writeFile(path, buffer, function (err) { | ||
if (err) return callback(err); | ||
return callback(null); | ||
}); | ||
}); | ||
} | ||
const buffer = JSON.stringify(SETJSON); | ||
writeFileRecursive(pwd, buffer, (err) => { | ||
if (err) console.error(err); | ||
console.info("write success"); | ||
}); | ||
} | ||
function hasSettingsJsonFile() { | ||
const pwd = (resolve('../../../.vscode/settings.json')); | ||
console.log(pwd) | ||
if (fs.existsSync(pwd)) { | ||
@@ -27,5 +59,3 @@ console.log('The path exists.'); | ||
} | ||
function getSettingsJsonFile() { | ||
} | ||
hasSettingsJsonFile(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5493
143