Skip to content

Commit 61dec34

Browse files
committed
feat: install and init huksy, linters and create automate github script
1 parent a91845a commit 61dec34

18 files changed

+4274
-646
lines changed

.adonisrc.json

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,8 @@
1313
"Database": "database",
1414
"Contracts": "contracts"
1515
},
16-
"preloads": [
17-
"./start/routes",
18-
"./start/kernel"
19-
],
20-
"providers": [
21-
"./providers/AppProvider",
22-
"@adonisjs/core",
23-
"@adonisjs/lucid",
24-
"@adonisjs/view"
25-
],
16+
"preloads": ["./start/routes", "./start/kernel"],
17+
"providers": ["./providers/AppProvider", "@adonisjs/core", "@adonisjs/lucid", "@adonisjs/view"],
2618
"metaFiles": [
2719
{
2820
"pattern": "public/**",
@@ -33,21 +25,15 @@
3325
"reloadServer": false
3426
}
3527
],
36-
"aceProviders": [
37-
"@adonisjs/repl"
38-
],
28+
"aceProviders": ["@adonisjs/repl"],
3929
"tests": {
4030
"suites": [
4131
{
4232
"name": "functional",
43-
"files": [
44-
"tests/functional/**/*.spec(.ts|.js)"
45-
],
33+
"files": ["tests/functional/**/*.spec(.ts|.js)"],
4634
"timeout": 60000
4735
}
4836
]
4937
},
50-
"testProviders": [
51-
"@japa/preset-adonis/TestsProvider"
52-
]
38+
"testProviders": ["@japa/preset-adonis/TestsProvider"]
5339
}

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build/

.eslintrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": ["plugin:adonis/typescriptApp", "prettier"],
3+
"plugins": ["prettier"],
4+
"rules": {
5+
"prettier/prettier": ["error", { "endOfLine": "auto" }]
6+
},
7+
"ignorePatterns": ["build"]
8+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ coverage
77
.env.production
88
tmp
99
.idea
10+
public/*.ico

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx commitlint --config commitlint.json --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run lintfix

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
build
2+
README.md
3+
docker-compose.yml
4+
Dockerfile
5+
.github/**
6+
docs/**
7+
/vitest/unit/test-reports/
8+
.gitignore

.prettierrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"trailingComma": "es5",
3+
"semi": false,
4+
"singleQuote": true,
5+
"useTabs": false,
6+
"quoteProps": "consistent",
7+
"bracketSpacing": true,
8+
"arrowParens": "always",
9+
"printWidth": 100
10+
}

commitlint.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"type-enum": [
5+
2,
6+
"always",
7+
["feat", "fix", "ci", "docs", "style", "refactor", "test", "chore", "perf", "revert", "build"]
8+
]
9+
}
10+
}

eslintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"eslintConfig": {
3+
"extends": ["plugin:adonis/typescriptApp", "prettier"],
4+
"plugins": ["prettier"],
5+
"rules": {
6+
"prettier/prettier": ["error", { "endOfLine": "auto" }]
7+
}
8+
},
9+
"eslintIgnore": ["build"]
10+
}

0 commit comments

Comments
 (0)