Last active
July 15, 2019 12:20
-
-
Save rosvik/2b42f7930aada27a117c95b5da32235a to your computer and use it in GitHub Desktop.
Prettier configuration boilerplate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Documentation: https://prettier.io/docs/en/configuration.html | |
| # Configuration schema: http://json.schemastore.org/prettierrc | |
| # Include parentheses around a sole arrow function parameter. Default: "avoid" | |
| #arrowParens: "avoid" | |
| # Print spaces between brackets. Default: true | |
| #bracketSpacing: true | |
| # Print (to stderr) where a cursor at the given position would move to after formatting. | |
| # This option cannot be used with --range-start and --range-end. Default: -1 | |
| #cursorOffset: -1 | |
| # Which end of line characters to apply. Default: "auto" | |
| #endOfLine: "auto" | |
| # Specify the input filepath. This will be used to do parser inference. | |
| #filepath: "" | |
| # How to handle whitespaces in HTML. Default: "css" | |
| #htmlWhitespaceSensitivity: "css" | |
| # Insert @format pragma into file's first docblock comment. Default: false | |
| #insertPragma: false | |
| # Put > on the last line instead of at a new line. Default: false | |
| #jsxBracketSameLine: false | |
| # Use single quotes in JSX. Default: false | |
| #jsxSingleQuote: false | |
| # Which parser to use. | |
| #parser: "vue" | |
| # Custom directory that contains prettier plugins in node_modules subdirectory. | |
| # Overrides default behavior when plugins are searched relatively to the location | |
| # of Prettier. Multiple values are accepted. Default: [] | |
| #pluginSearchDirs: [] | |
| # Add a plugin. Multiple plugins can be passed as separate `--plugin`s. Default: [] | |
| #plugins: [] | |
| # The line length where Prettier will try wrap. Default: 80 | |
| #printWidth: 80 | |
| # How to wrap prose. Default: "preserve" | |
| #proseWrap: "preserve" | |
| # Change when properties in objects are quoted. Default: "as-needed" | |
| #quoteProps: "as-needed" | |
| # Format code ending at a given character offset (exclusive). | |
| # The range will extend forwards to the end of the selected statement. | |
| # This option cannot be used with --cursor-offset. Default: null | |
| #rangeEnd: null | |
| # Format code starting at a given character offset. The range will extend backwards to the | |
| # start of the first line containing the selected statement. This option cannot be used | |
| # with --cursor-offset. Default: 0 | |
| #rangeStart: 0 | |
| # Require either '@prettier' or '@format' to be present in the file's first docblock comment | |
| # in order for it to be formatted. Default: false | |
| #requirePragma: false | |
| # Print semicolons. Default: true | |
| #semi: true | |
| # Use single quotes instead of double quotes. Default: false | |
| #singleQuote: false | |
| # Number of spaces per indentation level. Default: 2 | |
| #tabWidth: 2 | |
| # Print trailing commas wherever possible when multi-line. Default: "none" | |
| #trailingComma: 'none' | |
| # Indent with tabs instead of spaces. Default: false | |
| #useTabs: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Documentation: https://prettier.io/docs/en/configuration.html | |
| // Configuration schema: http://json.schemastore.org/prettierrc | |
| module.exports = { | |
| // Include parentheses around a sole arrow function parameter. Default: "avoid" | |
| //arrowParens: "avoid", | |
| // Print spaces between brackets. Default: true | |
| //bracketSpacing: true, | |
| // Print (to stderr) where a cursor at the given position would move to after formatting. | |
| // This option cannot be used with --range-start and --range-end. Default: -1 | |
| //cursorOffset: -1, | |
| // Which end of line characters to apply. Default: "auto" | |
| //endOfLine: "auto", | |
| // Specify the input filepath. This will be used to do parser inference. | |
| //filepath: "", | |
| // How to handle whitespaces in HTML. Default: "css" | |
| //htmlWhitespaceSensitivity: "css", | |
| // Insert @format pragma into file's first docblock comment. Default: false | |
| //insertPragma: false, | |
| // Put > on the last line instead of at a new line. Default: false | |
| //jsxBracketSameLine: false, | |
| // Use single quotes in JSX. Default: false | |
| //jsxSingleQuote: false, | |
| // Which parser to use. | |
| //parser: "vue", | |
| // Custom directory that contains prettier plugins in node_modules subdirectory. | |
| // Overrides default behavior when plugins are searched relatively to the location | |
| // of Prettier. Multiple values are accepted. Default: [] | |
| //pluginSearchDirs: [], | |
| // Add a plugin. Multiple plugins can be passed as separate `--plugin`s. Default: [] | |
| //plugins: [], | |
| // The line length where Prettier will try wrap. Default: 80 | |
| //printWidth: 80, | |
| // How to wrap prose. Default: "preserve" | |
| //proseWrap: "preserve", | |
| // Change when properties in objects are quoted. Default: "as-needed" | |
| //quoteProps: "as-needed", | |
| // Format code ending at a given character offset (exclusive). | |
| // The range will extend forwards to the end of the selected statement. | |
| // This option cannot be used with --cursor-offset. Default: null | |
| //rangeEnd: null, | |
| // Format code starting at a given character offset. The range will extend backwards to the | |
| // start of the first line containing the selected statement. This option cannot be used | |
| // with --cursor-offset. Default: 0 | |
| //rangeStart: 0, | |
| // Require either '@prettier' or '@format' to be present in the file's first docblock comment | |
| // in order for it to be formatted. Default: false | |
| //requirePragma: false, | |
| // Print semicolons. Default: true | |
| //semi: true, | |
| // Use single quotes instead of double quotes. Default: false | |
| //singleQuote: false, | |
| // Number of spaces per indentation level. Default: 2 | |
| //tabWidth: 2, | |
| // Print trailing commas wherever possible when multi-line. Default: "none" | |
| //trailingComma: 'none', | |
| // Indent with tabs instead of spaces. Default: false | |
| //useTabs: false, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "arrowParens": "avoid", | |
| "bracketSpacing": true, | |
| "cursorOffset": -1, | |
| "endOfLine": "auto", | |
| "filepath": "", | |
| "htmlWhitespaceSensitivity": "css", | |
| "insertPragma": false, | |
| "jsxBracketSameLine": false, | |
| "jsxSingleQuote": false, | |
| "parser": "vue", | |
| "pluginSearchDirs": [], | |
| "plugins": [], | |
| "printWidth": 80, | |
| "proseWrap": "preserve", | |
| "quoteProps": "as-needed", | |
| "rangeEnd": null, | |
| "rangeStart": 0, | |
| "requirePragma": false, | |
| "semi": true, | |
| "singleQuote": false, | |
| "tabWidth": 2, | |
| "trailingComma": "none", | |
| "useTabs": false, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Documentation: https://prettier.io/docs/en/configuration.html | |
| # Configuration schema: http://json.schemastore.org/prettierrc | |
| # Include parentheses around a sole arrow function parameter. Default: "avoid" | |
| #arrowParens: "avoid" | |
| # Print spaces between brackets. Default: true | |
| #bracketSpacing: true | |
| # Print (to stderr) where a cursor at the given position would move to after formatting. | |
| # This option cannot be used with --range-start and --range-end. Default: -1 | |
| #cursorOffset: -1 | |
| # Which end of line characters to apply. Default: "auto" | |
| #endOfLine: "auto" | |
| # Specify the input filepath. This will be used to do parser inference. | |
| #filepath: "" | |
| # How to handle whitespaces in HTML. Default: "css" | |
| #htmlWhitespaceSensitivity: "css" | |
| # Insert @format pragma into file's first docblock comment. Default: false | |
| #insertPragma: false | |
| # Put > on the last line instead of at a new line. Default: false | |
| #jsxBracketSameLine: false | |
| # Use single quotes in JSX. Default: false | |
| #jsxSingleQuote: false | |
| # Which parser to use. | |
| #parser: "vue" | |
| # Custom directory that contains prettier plugins in node_modules subdirectory. | |
| # Overrides default behavior when plugins are searched relatively to the location | |
| # of Prettier. Multiple values are accepted. Default: [] | |
| #pluginSearchDirs: [] | |
| # Add a plugin. Multiple plugins can be passed as separate `--plugin`s. Default: [] | |
| #plugins: [] | |
| # The line length where Prettier will try wrap. Default: 80 | |
| #printWidth: 80 | |
| # How to wrap prose. Default: "preserve" | |
| #proseWrap: "preserve" | |
| # Change when properties in objects are quoted. Default: "as-needed" | |
| #quoteProps: "as-needed" | |
| # Format code ending at a given character offset (exclusive). | |
| # The range will extend forwards to the end of the selected statement. | |
| # This option cannot be used with --cursor-offset. Default: null | |
| #rangeEnd: null | |
| # Format code starting at a given character offset. The range will extend backwards to the | |
| # start of the first line containing the selected statement. This option cannot be used | |
| # with --cursor-offset. Default: 0 | |
| #rangeStart: 0 | |
| # Require either '@prettier' or '@format' to be present in the file's first docblock comment | |
| # in order for it to be formatted. Default: false | |
| #requirePragma: false | |
| # Print semicolons. Default: true | |
| #semi: true | |
| # Use single quotes instead of double quotes. Default: false | |
| #singleQuote: false | |
| # Number of spaces per indentation level. Default: 2 | |
| #tabWidth: 2 | |
| # Print trailing commas wherever possible when multi-line. Default: "none" | |
| #trailingComma: 'none' | |
| # Indent with tabs instead of spaces. Default: false | |
| #useTabs: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Documentation: https://prettier.io/docs/en/configuration.html | |
| # Configuration schema: http://json.schemastore.org/prettierrc | |
| # Include parentheses around a sole arrow function parameter. Default: "avoid" | |
| #arrowParens: "avoid" | |
| # Print spaces between brackets. Default: true | |
| #bracketSpacing: true | |
| # Print (to stderr) where a cursor at the given position would move to after formatting. | |
| # This option cannot be used with --range-start and --range-end. Default: -1 | |
| #cursorOffset: -1 | |
| # Which end of line characters to apply. Default: "auto" | |
| #endOfLine: "auto" | |
| # Specify the input filepath. This will be used to do parser inference. | |
| #filepath: "" | |
| # How to handle whitespaces in HTML. Default: "css" | |
| #htmlWhitespaceSensitivity: "css" | |
| # Insert @format pragma into file's first docblock comment. Default: false | |
| #insertPragma: false | |
| # Put > on the last line instead of at a new line. Default: false | |
| #jsxBracketSameLine: false | |
| # Use single quotes in JSX. Default: false | |
| #jsxSingleQuote: false | |
| # Which parser to use. | |
| #parser: "vue" | |
| # Custom directory that contains prettier plugins in node_modules subdirectory. | |
| # Overrides default behavior when plugins are searched relatively to the location | |
| # of Prettier. Multiple values are accepted. Default: [] | |
| #pluginSearchDirs: [] | |
| # Add a plugin. Multiple plugins can be passed as separate `--plugin`s. Default: [] | |
| #plugins: [] | |
| # The line length where Prettier will try wrap. Default: 80 | |
| #printWidth: 80 | |
| # How to wrap prose. Default: "preserve" | |
| #proseWrap: "preserve" | |
| # Change when properties in objects are quoted. Default: "as-needed" | |
| #quoteProps: "as-needed" | |
| # Format code ending at a given character offset (exclusive). | |
| # The range will extend forwards to the end of the selected statement. | |
| # This option cannot be used with --cursor-offset. Default: null | |
| #rangeEnd: null | |
| # Format code starting at a given character offset. The range will extend backwards to the | |
| # start of the first line containing the selected statement. This option cannot be used | |
| # with --cursor-offset. Default: 0 | |
| #rangeStart: 0 | |
| # Require either '@prettier' or '@format' to be present in the file's first docblock comment | |
| # in order for it to be formatted. Default: false | |
| #requirePragma: false | |
| # Print semicolons. Default: true | |
| #semi: true | |
| # Use single quotes instead of double quotes. Default: false | |
| #singleQuote: false | |
| # Number of spaces per indentation level. Default: 2 | |
| #tabWidth: 2 | |
| # Print trailing commas wherever possible when multi-line. Default: "none" | |
| #trailingComma: 'none' | |
| # Indent with tabs instead of spaces. Default: false | |
| #useTabs: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment