summaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
authorLinda_pp <rhysd@users.noreply.github.com>2022-08-31 21:11:13 +0900
committerGitHub <noreply@github.com>2022-08-31 08:11:13 -0400
commita66315d232b49e623268de801af19460108ba514 (patch)
tree2c738e53da927d232f31bb9fff42efdf3d9f2b2b /crates
parentbdf10ab7c0def9070765f459bdf528522b34bab4 (diff)
ignore/types: add *.cjs, *.mjs, *.cts, *.mts
These are used by both Node.js and TypeScript to indicate that a file is CommonJS or ES. Node.js: https://nodejs.org/api/esm.html TypeScript: https://www.typescriptlang.org/docs/handbook/esm-node.html#new-file-extensions PR #2297
Diffstat (limited to 'crates')
-rw-r--r--crates/ignore/src/default_types.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs
index 6f0c8339..b3a5c958 100644
--- a/crates/ignore/src/default_types.rs
+++ b/crates/ignore/src/default_types.rs
@@ -95,7 +95,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
("java", &["*.java", "*.jsp", "*.jspx", "*.properties"]),
("jinja", &["*.j2", "*.jinja", "*.jinja2"]),
("jl", &["*.jl"]),
- ("js", &["*.js", "*.jsx", "*.vue"]),
+ ("js", &["*.js", "*.jsx", "*.vue", "*.cjs", "*.mjs"]),
("json", &["*.json", "composer.lock"]),
("jsonl", &["*.jsonl"]),
("julia", &["*.jl"]),
@@ -248,7 +248,7 @@ pub const DEFAULT_TYPES: &[(&str, &[&str])] = &[
("tf", &["*.tf"]),
("thrift", &["*.thrift"]),
("toml", &["*.toml", "Cargo.lock"]),
- ("ts", &["*.ts", "*.tsx"]),
+ ("ts", &["*.ts", "*.tsx", "*.cts", "*.mts"]),
("twig", &["*.twig"]),
("txt", &["*.txt"]),
("typoscript", &["*.typoscript", "*.ts"]),