Skip to content

Commit

Permalink
feat: add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jul 5, 2020
1 parent 538371c commit 546b985
Show file tree
Hide file tree
Showing 16 changed files with 8,204 additions and 8,142 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# http://editorconfig.org

[*]
indent_style = space
indent_style = tab
indent_size = 2
end_of_line = lf
charset = utf-8
Expand Down
8 changes: 5 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"extends": [
"plugin:adonis/typescriptPackage"
]
"extends": ["plugin:adonis/typescriptPackage", "prettier", "prettier/@typescript-eslint"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": ["error"]
}
}
10 changes: 7 additions & 3 deletions .github/COMMIT_CONVENTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
Using conventional commit messages, we can automate the process of generating the CHANGELOG file. All commits messages will automatically be validated against the following regex.

``` js
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types|build)((.+))?: .{1,50}/
```js
;/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types|build)((.+))?: .{1,50}/
```
## Commit Message Format
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
> The **scope** is optional
Expand All @@ -26,6 +27,7 @@ Prefix makes it easier to append a path to a group of routes
5. The optional **footer** can be added after the body, followed by a blank line.

## Types

Only one type can be used at a time and only following types are allowed.

- feat
Expand All @@ -44,12 +46,15 @@ Only one type can be used at a time and only following types are allowed.
If a type is `feat`, `fix` or `perf`, then the commit will appear in the CHANGELOG.md file. However if there is any BREAKING CHANGE, the commit will always appear in the changelog.

### Revert

If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>`., where the hash is the SHA of the commit being reverted.

## Scope

The scope could be anything specifying place of the commit change. For example: `router`, `view`, `querybuilder`, `database`, `model` and so on.

## Subject

The subject contains succinct description of the change:

- use the imperative, present tense: "change" not "changed" nor "changes".
Expand All @@ -67,4 +72,3 @@ The footer should contain any information about **Breaking Changes** and is also
reference GitHub issues that this commit **Closes**.

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ We do our best to reply to all the issues on time. If you will follow the given
- Ensure the issue isn't already reported.
- Ensure you are reporting the bug in the correct repo.

*Delete the above section and the instructions in the sections below before submitting*
_Delete the above section and the instructions in the sections below before submitting_

## Description

If this is a feature request, explain why it should be added. Specific use-cases are best.

For bug reports, please provide as much *relevant* info as possible.
For bug reports, please provide as much _relevant_ info as possible.

## Package version

<!-- YOUR ANSWER -->

## Error Message & Stack Trace
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
README.md
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"trailingComma": "es5",
"semi": false,
"singleQuote": true,
"useTabs": true,
"quoteProps": "consistent",
"bracketSpacing": true,
"arrowParens": "always",
"printWidth": 120
}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Sharing PR's for small changes works great. However, when contributing big featu

### What is an RFC?

RFC stands for **Request for Commits**, a standard process followed by many other frameworks including [Ember](https://github.com/emberjs/rfcs), [yarn](https://github.com/yarnpkg/rfcs) and [rust](https://github.com/rust-lang/rfcs).
RFC stands for **Request for Commits**, a standard process followed by many other frameworks including [Ember](https://github.com/emberjs/rfcs), [yarn](https://github.com/yarnpkg/rfcs) and [rust](https://github.com/rust-lang/rfcs).

In brief, RFC process allows you to talk about the changes with everyone in the community and get a view of the core team before dedicating your time to work on the feature.

Expand All @@ -43,6 +43,6 @@ All of the security issues, must be reported via [email](mailto:[email protected]

## Be a part of community

We welcome you to participate in the [forum](https://forum.adonisjs.com/) and the AdonisJs [discord server](https://discord.me/adonisjs). You are free to ask your questions and share your work or contributions made to AdonisJs eco-system.
We welcome you to participate in the [forum](https://forum.adonisjs.com/) and the AdonisJs [discord server](https://discord.me/adonisjs). You are free to ask your questions and share your work or contributions made to AdonisJs eco-system.

We follow a strict [Code of Conduct](https://adonisjs.com/community-guidelines) to make sure everyone is respectful to each other.
14 changes: 6 additions & 8 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"core": true,
"ts": true,
"license": "MIT",
"services": [
"circleci"
],
"minNodeVersion": "12.0.0"
}
"core": true,
"ts": true,
"license": "MIT",
"services": ["circleci"],
"minNodeVersion": "12.0.0"
}
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
*/

export { Hooks } from './src/Hooks'
2 changes: 1 addition & 1 deletion japaFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ require('ts-node/register')

const { configure } = require('japa')
configure({
files: ['test/**/*.spec.ts']
files: ['test/**/*.spec.ts'],
})
Loading

0 comments on commit 546b985

Please sign in to comment.