Skip to content

Instantly share code, notes, and snippets.

@eltonmarques96
Created March 25, 2020 05:04
Show Gist options
  • Save eltonmarques96/0073d0e398a82730b68dcdd9381b775c to your computer and use it in GitHub Desktop.
Save eltonmarques96/0073d0e398a82730b68dcdd9381b775c to your computer and use it in GitHub Desktop.
Package.json model for AdonisJS with: lint-staged, husky, prettier, eslint and commitlint
{
"name": "adonis-api-app",
"version": "4.1.0",
"adonis-version": "4.1.0",
"description": "Adonisjs boilerplate for API server with pre-configured JWT",
"main": "index.js",
"scripts": {
"start": "yarn install && node ace migration:run && node server.js",
"dev": "nodemon --inspect server.js",
"test": "node ace test --bail --timeout 5000",
"release": "HUSKY_SKIP_HOOKS=1 standard-version"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"git add",
"eslint --fix"
]
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"keywords": [
"adonisjs",
"adonis-app"
],
"author": "",
"license": "UNLICENSED",
"private": true,
"dependencies": {
"@adonisjs/ace": "^5.0.8",
"@adonisjs/auth": "^3.0.7",
"@adonisjs/bodyparser": "^2.0.5",
"@adonisjs/cors": "^1.0.7",
"@adonisjs/fold": "^4.0.9",
"@adonisjs/framework": "^5.0.9",
"@adonisjs/ignitor": "^2.0.8",
"@adonisjs/lucid": "^6.1.3",
"@adonisjs/mail": "^3.0.10",
"@adonisjs/vow": "^1.0.17",
"@adonisjs/websocket": "^1.0.12",
"@rocketseat/adonis-bull": "^0.2.1",
"mysql2": "^2.0.1",
"ngrok": "^3.2.7",
"nodemon": "^2.0.1",
"standard-version": "^7.1.0"
},
"devDependencies": {
"@commitlint/cli": "^8.3.4",
"@commitlint/config-conventional": "^8.3.4",
"commitizen": "^4.0.3",
"cz-conventional-changelog": "3.0.2",
"eslint": "^6.7.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.7.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-import-helpers": "^1.0.2",
"eslint-plugin-prettier": "^3.1.1",
"husky": "^4.0.3",
"lint-staged": "^9.5.0",
"prettier": "^1.19.1",
"sqlite3": "^4.1.0"
},
"autoload": {
"App": "./app"
},
}
# ESLint
{
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": ["airbnb-base", "prettier"],
"plugins": ["prettier"],
"globals": {
"use": "readonly",
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"camelcase": "off",
"prettier/prettier": "error",
"class-methods-use-this": "off",
"consistent-return": "off",
"no-param-reassign": "off"
}
}
# Prettier
{
"singleQuote": true,
"trailingComma": "es5"
}
# CommitLint
module.exports = { extends: ["@commitlint/config-conventional"] };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment