@caiocezarqueiroz/eslint-config
Version:
The package @caiocezarqueiroz/eslint-config offers default ESLint configurations, integration with Prettier, EditorConfig, and the VSCode workspace, thus simplifying the development process and ensuring code consistency and compliance with best programmin
25 lines (22 loc) • 628 B
JavaScript
/* eslint-disable no-console */
const { writeFileSync } = require('node:fs');
const _PATH_FOLDER = `${process.cwd()}/.editorconfig`;
const _DEFAULT_CONFIGS_EDITOR_CONFIG = `
root = true
[*]
indent_size = 2
indent_style = space
charset = utf-8
end_of_line = lf
insert_final_newline = false
trim_trailing_whitespace = true
`;
(() => {
try {
//creates the .editorconfig file at the root of the project
writeFileSync(_PATH_FOLDER, _DEFAULT_CONFIGS_EDITOR_CONFIG);
console.log('Arquivo .editorconfig criado com sucesso.');
} catch (err) {
console.error('Erro ao criar o arquivo .editorconfig:', err);
}
})();