Skip to content

Commit

Permalink
Auto-format cjs, cts, mts, jsonc, json5, yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
alecmev committed Aug 26, 2022
1 parent 46e2d2a commit 3a99851
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
7 changes: 4 additions & 3 deletions JsPrettier.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,10 @@
//
// Additional custom file extensions to format.
//
// There's built-in support already for "js", "jsx", "mjs", "json", "html",
// "graphql/gql", "ts", "tsx", "css", "scss", "less", "md", "mdx", "yml"
// and "vue" and "component.html" (angular html) files.
// There's built-in support already for "js", "jsx", "cjs", "mjs", "json",
// "jsonc", "json5", "html", "graphql/gql", "ts", "tsx", "cts", "mts", "css",
// "scss", "less", "md", "mdx", "yml", "yaml" and "vue" and "component.html"
// (angular html) files.
//
// Additional file extensions MUST be specified here, and without the leading dot.
// ----------------------------------------------------------------------
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,10 @@ application menu to:
Text syntaxes.
- **custom_file_extensions** (default: [])
There's built-in support already for `js`, `jsx`, `mjs`, `json`, `html`,
`graphql/gql`, `ts`, `tsx`, `css`, `scss`, `less`, `md`, `mdx`, `yml`,
`vue` and `component.html` (angular html) files.
There's built-in support already for `js`, `jsx`, `cjs`, `mjs`, `json`,
`jsonc`, `json5`, `html`, `graphql/gql`, `ts`, `tsx`, `cts`, `mts`, `css`,
`scss`, `less`, `md`, `mdx`, `yml`, `yaml`, `vue` and `component.html`
(angular html) files.
Put additional file extensions here, and be sure not to include the
leading dot in the file extension.
Expand Down
8 changes: 7 additions & 1 deletion jsprettier/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@
'js',
'jsx',
'json',
'jsonc',
'json5',
'graphql',
'gql',
'html',
Expand All @@ -149,6 +151,10 @@
'md',
'vue',
'yml',
'yaml',
'cjs',
'mjs',
'mdx'
'mdx',
'cts',
'mts'
]

0 comments on commit 3a99851

Please sign in to comment.