Ignore files in the Jujutsu directory (#16684)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
This commit is contained in:
1 parent
7ccd54580c
commit
5bb04801a2
5 files changed
+9
-2
No files matched your search
@@ -0,0 +1,5 @@
|
||||
#### Ignore files in the Jujutsu directory (#16684 by @marcusirgens)
|
||||
|
||||
The Jujutsu VCS uses the `.jj` directory, similarly to how Git uses `.git`.
|
||||
|
||||
This change adds `.jj` to the list of directories which are silently ignored by prettier.
|
||||
+1
-1
@@ -24,7 +24,7 @@ coverage
|
||||
|
||||
It’s recommended to have a `.prettierignore` in your project! This way you can run `prettier --write .` to make sure that everything is formatted (without mangling files you don’t want, or choking on generated files). And – your editor will know which files _not_ to format!
|
||||
|
||||
By default prettier ignores files in version control systems directories (".git", ".sl", ".svn" and ".hg") and `node_modules` (unless the [`--with-node-modules` CLI option](cli.md#--with-node-modules) is specified). Prettier will also follow rules specified in the ".gitignore" file if it exists in the same directory from which it is run.
|
||||
By default prettier ignores files in version control systems directories (".git", ".jj", ".sl", ".svn" and ".hg") and `node_modules` (unless the [`--with-node-modules` CLI option](cli.md#--with-node-modules) is specified). Prettier will also follow rules specified in the ".gitignore" file if it exists in the same directory from which it is run.
|
||||
|
||||
So by default it will be
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ async function* expandPatterns(context) {
|
||||
*/
|
||||
async function* expandPatternsInternal(context) {
|
||||
// Ignores files in version control systems directories and `node_modules`
|
||||
const silentlyIgnoredDirs = [".git", ".sl", ".svn", ".hg"];
|
||||
const silentlyIgnoredDirs = [".git", ".sl", ".svn", ".hg", ".jj"];
|
||||
if (context.argv.withNodeModules !== true) {
|
||||
silentlyIgnoredDirs.push("node_modules");
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ describe("ignores files in version control systems", () => {
|
||||
runCli("cli/ignore-vcs-files", [
|
||||
".svn/file.js",
|
||||
".hg/file.js",
|
||||
".jj/file.js",
|
||||
"file.js",
|
||||
"-l",
|
||||
]).test({
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
'use strict';
|
||||
Reference in new issue
Block a user