Last active
November 6, 2021 12:29
-
-
Save n1kk/8dcaafd020be3980ff3fab156d5656a0 to your computer and use it in GitHub Desktop.
My default repo configs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
indent_size = 4 | |
indent_style = space | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
max_line_length = 120 | |
[*.{yml,yaml,md,toml,json,html}] | |
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
// makes it easier to digest single argument lambdas | |
arrowParens: "avoid", | |
// whitespace inside brackets increases readability | |
bracketSpacing: true, | |
// allows auto format to point out potential bugs with iife or ts cast statements | |
semi: true, | |
// having trailing comma can decrease the amount of changed lines in git and make diff more readable | |
// since adding a comma to allow next argument or key/value pair is a meaningless modification of that line | |
trailingComma: "all", | |
// allows code to be displayed as is in all envs, some terminal viewers and console logs/printers can have | |
// tas width set to 8 | |
useTabs: false, | |
/// rest can be inferred from .editorconfig | |
// everything in lf, win<->unix conversion only causes issues | |
endOfLine: "lf", | |
// modern monitors are bin enough to fit two panes of 120 side by side | |
printWidth: 120, | |
// makes nested branching abuse more obvious | |
tabWidth: 4, | |
// makes it easier to move data between js <-> json | |
singleQuote: false, | |
overrides: [ | |
// markdown and config files don't benefit from larger indentation | |
{ | |
files: "*.{yml,yaml,md,toml,json,html}", | |
options: { | |
tabWidth: 2, | |
}, | |
}, | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment