diff --git a/CHANGELOG.md b/CHANGELOG.md index b3e7311ec..ee7ddf653 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - #895 patchedast Starred and keyword now consumes their syntactically expected and ** (@lieryan) - #896 patchedast cleanup and refactoring (@lieryan) +- #905 Ignore `node_modules` directories by default when scanning project files and source folders. (@marcoeangeli) # Release 1.15.0 diff --git a/docs/configuration.rst b/docs/configuration.rst index a62b4afbf..dae748b54 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -39,6 +39,7 @@ It will be used if ``[tool.rope]`` is not present in ``pyproject.toml`` or ``pyp ".tox", ".venv", "venv", + "node_modules", ] Additionally, you can run an executable function at startup of rope. diff --git a/docs/default_config.py b/docs/default_config.py index b2b3377ea..f94e34d1c 100644 --- a/docs/default_config.py +++ b/docs/default_config.py @@ -28,6 +28,7 @@ def set_prefs(prefs): # "venv", # ".mypy_cache", # ".pytest_cache", + # "node_modules", # ] # Specifies which files should be considered python files. It is diff --git a/rope/base/prefs.py b/rope/base/prefs.py index 787cce497..6c1663c88 100644 --- a/rope/base/prefs.py +++ b/rope/base/prefs.py @@ -67,6 +67,7 @@ class Prefs: "venv", ".mypy_cache", ".pytest_cache", + "node_modules", ], description=dedent(""" Specify which files and folders to ignore in the project.