Skip to content

Commit

Permalink
Merge branch 'master' into test-general-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ismemang committed Jul 17, 2022
2 parents 7436829 + 4d9c77a commit 0914c66
Show file tree
Hide file tree
Showing 7 changed files with 414 additions and 273 deletions.
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# editorconfig.org

#
# Formatting configuration for those that may choose to not use prettier.
# At least serves as a minimal styleguide for contributors.
#

root = true

[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 2
max_line_length = 80

[*.py]
indent_style = space
indent_size = 4

[*.bat]
end_of_line = crlf

[Makefile]
indent_style = tab
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ tests
src
.github
/report
.prettier*
.editorconfig
tsconfig.json
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Yes. Format these files when they are present.
!.prettier*/
!.mochar*/
!.huskyr*/

# No. Do not format these files.
.github
/docs
node_modules/
/build
34 changes: 34 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/** Simple logger. */
/* istanbul ignore next: Unnecessary. */
if (!global.log) global.log = console;

/** prettier formatter configuration. */
const config = {
arrowParens: 'always',
bracketSpacing: true,
endOfLine: 'lf',
printWidth: 80,
proseWrap: 'never',
quoteProps: 'as-needed',
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
useTabs: true,
overrides: [
{
files: ['**/*.json', '**/*.yaml', '**/*.yml'],
options: {
useTabs: false,
},
},
],
};

if (typeof require !== 'undefined' && require.main === module) {
// When a script.
log.debug(JSON.stringify(config, null, 2));
} else {
// When a module.
module.exports = config;
}
1 change: 1 addition & 0 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Please manage your expectations accordingly.
Pull Requests are welcome, given the following:

- Attempt to generally follow the same coding style that already exists in the library. I don't have a styleguide or linter setup at the moment, and I don't really want to have to police such things if I don't have to; Please don't make me.
- See `.editorconfig` and `.prettierrc.js` for minimal style guidance.
- There is CI running in GitHub Actions; Please make sure that all builds succeed and pass all existing tests.
- On the point of tests: there aren't very many at the moment, so I won't say its a requirement to add new tests if you add new code, but I also won't stop you...
- Please don't make unneccesary breaking changes
Expand Down
Loading

0 comments on commit 0914c66

Please sign in to comment.