Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i learn how i work with esformatter config like (indent, lineBreak, whiteSpace) #494

Open
derakhshanfar opened this issue Dec 31, 2017 · 0 comments

Comments

@derakhshanfar
Copy link

Hi guys,
First of all thanks a ton for making this amazing library, but I don't know how can I work with this config's, for example when I see some like bellow I can't understand what is it exactly!
What is (before, after, ObjectExpression, ModuleSpecifier, ExportDefault and other bellow configs) ?
What is -1, 0 2 and ..?
Can you help me?

 "lineBreak": {
    "before": {
      "ObjectExpressionOpeningBrace": -1,
      "ObjectExpressionClosingBrace": -1,
      "Property": -1,
      "ExportAllDeclaration": 2,
      "ExportDefaultDeclaration": 2,
      "ExportNamedDeclaration": 2,
      "ModuleSpecifierClosingBrace": 1,
      "ModuleSpecifierComma": 0
    },
    "after": {
      "ModuleSpecifierComma": -1,
      "ObjectExpressionOpeningBrace": -1,
      "ObjectExpressionClosingBrace": -1,
      "Property": -1,
      "ExportAllDeclaration": 2,
      "ExportDefaultDeclaration": 2,
      "ExportNamedDeclaration": 2,
      "ImportDeclaration": 2,
      "ModuleSpecifierOpeningBrace": 1,
      "ModuleSpecifierClosingBrace": -1,
      "ModuleSpecifierComma": 1
    }
  },
  "whiteSpace": {
    "before": {
      "ObjectExpressionClosingBrace": 1
    },
    "after": {
      "MethodName": 1,
      "ObjectExpressionOpeningBrace": 1,
      "PropertyValue": -1
    }
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant