From aab4c7414ffdbd330f04683d16a7efff27898df2 Mon Sep 17 00:00:00 2001 From: kpj2006 <24ucs074@lnmiit.ac.in> Date: Sun, 28 Dec 2025 07:14:06 +0530 Subject: [PATCH 1/3] add editorconfig --- .editorconfig | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f0ca72b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,114 @@ +# EditorConfig helps maintain consistent coding styles across different editors and IDEs +# Documentation: https://editorconfig.org/ +# for more information scroll to the bottom of this file. + +# Top-most EditorConfig file +root = true + +# Universal settings for all files +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +# Markdown files +[*.md] +# Trailing whitespace is significant in Markdown (two spaces = line break) +trim_trailing_whitespace = false + +# YAML files +[*.{yml,yaml}] +indent_size = 2 +indent_style = space + +# JSON files +[*.json] +indent_size = 2 +indent_style = space + +# JavaScript/TypeScript +[*.{js,jsx,ts,tsx}] +indent_size = 2 +indent_style = space + +# Python files +[*.py] +indent_size = 4 +indent_style = space + +# Java files +[*.java] +indent_size = 4 +indent_style = space + +# C/C++ files +[*.{c,cpp,h,hpp}] +indent_size = 4 +indent_style = space + +# Shell scripts +[*.sh] +indent_size = 2 +indent_style = space + +# Makefiles (must use tabs) +[Makefile] +indent_style = tab + +[*.mk] +indent_style = tab + +# Configuration files +[*.{toml,ini,cfg}] +indent_size = 2 +indent_style = space + +# XML/HTML files +[*.{xml,html,svg}] +indent_size = 2 +indent_style = space + +# CSS/SCSS/LESS files +[*.{css,scss,sass,less}] +indent_size = 2 +indent_style = space + +# Package manager files +[{package.json,package-lock.json}] +indent_size = 2 +indent_style = space + +[{*.gradle,*.gradle.kts}] +indent_size = 4 +indent_style = space + + + +# For full list of Supported Editors: https://editorconfig.org/#pre-installed +# +# Common Properties: +# ------------------ +# - indent_style: "space" or "tab" +# - indent_size: number of columns for each indentation level +# - end_of_line: "lf", "cr", or "crlf" +# - charset: "utf-8", "utf-16be", "utf-16le", "latin1" +# - trim_trailing_whitespace: true or false +# - insert_final_newline: true or false +# - max_line_length: number (not supported by all editors) +# +# File Pattern Matching: +# ---------------------- +# - * : matches any string of characters (except path separator) +# - ** : matches any string of characters +# - ? : matches any single character +# - [name] : matches any single character in name +# - [!name] : matches any single character not in name +# - {s1,s2,s3} : matches any of the strings given (comma-separated) +# +# For more information and queries: +# - Official Documentation: https://editorconfig.org/ +# - Specification: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties +# - Plugin Downloads: https://editorconfig.org/#download \ No newline at end of file From aa6b6a625d114600189579cf9ff39c1f0135f07c Mon Sep 17 00:00:00 2001 From: kpj2006 <24ucs074@lnmiit.ac.in> Date: Sun, 22 Feb 2026 15:30:52 +0530 Subject: [PATCH 2/3] refactor: update .editorconfig for consistent indentation and remove redundant settings --- .editorconfig | 60 ++++----------------------------------------------- 1 file changed, 4 insertions(+), 56 deletions(-) diff --git a/.editorconfig b/.editorconfig index f0ca72b..fbb0345 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,5 @@ # EditorConfig helps maintain consistent coding styles across different editors and IDEs # Documentation: https://editorconfig.org/ -# for more information scroll to the bottom of this file. # Top-most EditorConfig file root = true @@ -12,47 +11,20 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = space -indent_size = 2 +indent_size = 4 # Markdown files [*.md] # Trailing whitespace is significant in Markdown (two spaces = line break) trim_trailing_whitespace = false -# YAML files -[*.{yml,yaml}] -indent_size = 2 -indent_style = space - -# JSON files -[*.json] +# JavaScript / TypeScript / Web / Config files (2-space indentation) +[*.{js,jsx,ts,tsx,json,yml,yaml}] indent_size = 2 -indent_style = space - -# JavaScript/TypeScript -[*.{js,jsx,ts,tsx}] -indent_size = 2 -indent_style = space - -# Python files -[*.py] -indent_size = 4 -indent_style = space - -# Java files -[*.java] -indent_size = 4 -indent_style = space - -# C/C++ files -[*.{c,cpp,h,hpp}] -indent_size = 4 -indent_style = space -# Shell scripts +# Shell scripts (2 spaces common practice) [*.sh] indent_size = 2 -indent_style = space # Makefiles (must use tabs) [Makefile] @@ -61,30 +33,6 @@ indent_style = tab [*.mk] indent_style = tab -# Configuration files -[*.{toml,ini,cfg}] -indent_size = 2 -indent_style = space - -# XML/HTML files -[*.{xml,html,svg}] -indent_size = 2 -indent_style = space - -# CSS/SCSS/LESS files -[*.{css,scss,sass,less}] -indent_size = 2 -indent_style = space - -# Package manager files -[{package.json,package-lock.json}] -indent_size = 2 -indent_style = space - -[{*.gradle,*.gradle.kts}] -indent_size = 4 -indent_style = space - # For full list of Supported Editors: https://editorconfig.org/#pre-installed From 89dfc03cb7aa4ac99ee16977992b14cab50e4814 Mon Sep 17 00:00:00 2001 From: kpj2006 <24ucs074@lnmiit.ac.in> Date: Sun, 22 Feb 2026 15:40:08 +0530 Subject: [PATCH 3/3] refactor: consolidate Makefile settings and specify tab width --- .editorconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index fbb0345..6a372ed 100644 --- a/.editorconfig +++ b/.editorconfig @@ -27,11 +27,9 @@ indent_size = 2 indent_size = 2 # Makefiles (must use tabs) -[Makefile] -indent_style = tab - -[*.mk] +[{Makefile,*.mk}] indent_style = tab +tab_width = 4