Skip to content

Commit

Permalink
feat: add css to default filetype
Browse files Browse the repository at this point in the history
  • Loading branch information
jellydn committed Nov 2, 2023
1 parent 75b2f92 commit 0259f4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ npm install -g cspell-tool

## Features

- Supports multiple file formats like `.md`, `.ts`, `.lua` `.json` and `.yaml`.
- Supports multiple file formats like `.md`, `.ts`, `.lua` `.json`, `.yaml` and `.css`.
- Easily customizable via `cspell.json`.
- Extends your project-specific dictionary.

Expand Down
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ writeFile("./cspell.json", JSON.stringify(cSpellContent, null, 2));

// Ask the user if they want to use the default file types
const useDefaultFileTypes = await consola.prompt(
"Use default file types (md, ts, tsx, json, yaml, lua)?",
"Use default file types (md, ts, tsx, json, yaml, lua, css)?",
{
type: "confirm",
options: [
Expand All @@ -60,7 +60,7 @@ const useDefaultFileTypes = await consola.prompt(

let fileTypes: string[];
if (useDefaultFileTypes) {
fileTypes = ["md", "ts", "tsx", "json", "y*ml", "lua"];
fileTypes = ["md", "ts", "tsx", "json", "y*ml", "lua", "css"];
} else {
// Ask the user for the file types they want to check
fileTypes = (await consola.prompt("Select file types to check.", {
Expand All @@ -78,6 +78,7 @@ if (useDefaultFileTypes) {
{ value: "java", label: "Java" },
{ value: "js", label: "JavaScript" },
{ value: "jsx", label: "JavaScript React" },
{ value: "css", label: "CSS" },
],
})) as unknown as string[];
}
Expand Down

0 comments on commit 0259f4e

Please sign in to comment.