diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..e8511ea --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..d37daa0 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install lint-staged diff --git a/.prettierignore b/.prettierignore index 49573b6..d0b804d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,46 +1,4 @@ # Add files here to ignore them from prettier formatting -# compiled output /dist -/docs -/tmp -/out-tsc - -# dependencies -/node_modules - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# misc -/.sass-cache -/connect.lock /coverage -/libpeerconnection.log -npm-debug.log -yarn-error.log -testem.log -test-report.xml -/typings - -# System Files -.DS_Store -Thumbs.db - -# others -/tools -angular.json -yarn.lock diff --git a/.prettierrc b/.prettierrc index 6c70cb2..ec7608d 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,20 @@ { - "printWidth": 140, - "singleQuote": true + "printWidth": 120, + "singleQuote": true, + "trailingComma": "none", + "arrowParens": "avoid", + "overrides": [ + { + "files": "*.component.html", + "options": { + "parser": "angular" + } + }, + { + "files": "*.html", + "options": { + "parser": "html" + } + } + ] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 98a86af..a6d9d98 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -116,7 +116,7 @@ After your pull request is merged, you can safely delete your branch and pull th To ensure consistency throughout the source code, keep these rules in mind as you are working: * All features or bug fixes **must be tested** by one or more specs (unit-tests). * All public API methods **must be documented**. (Details TBC). -* We follow [fulls1z3's Angular TSLint rules][angular-tslint-rules]. +- We follow [eslint:recommended][eslint]. ## Commit message guidelines We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that @@ -124,17 +124,18 @@ are easy to follow when looking through the **project history**. But also, we us the `ngx-config` change log**. ### Commit Message Format -Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes -a **type**, a **scope** (*when applicable*) and a **subject**: +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes +a **type** and a **subject**: + ``` -(): +: