Skip to content

Configure prettier for Adonis 5 #1590

Answered by fnoquiq
Pacheco95 asked this question in Help
Discussion options

You must be logged in to vote

Try it (Brazilian portuguese):

.eslintrc.json

{
  "extends": [
    "plugin:adonis/typescriptApp",
    "prettier/@typescript-eslint",
    "plugin:prettier/recommended"
  ],
  "plugins": [
    "prettier"
  ],
  "rules": {
    "prettier/prettier": "error",
    "no-console": "error"
  }
}

prettier.config.js

module.exports = {
  trailingComma: "es5",
  semi: false,
  singleQuote: true,
  quoteProps: "consistent",
  bracketSpacing: true,
  arrowParens: "always",
  printWidth: 100,
  tabWidth: 2,
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Pacheco95
Comment options

Comment options

You must be logged in to vote
1 reply
@Pacheco95
Comment options

Answer selected by Pacheco95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants