From 6b03e4bb5f86d66f232e023cb3788ff8e9d6f57c Mon Sep 17 00:00:00 2001 From: shown Date: Sun, 7 Dec 2025 00:02:07 +0800 Subject: [PATCH] chore: add .editorconfig for consistent coding style (#3875) Co-authored-by: Duansg Co-authored-by: aias00 --- .editorconfig | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..94663002eb --- /dev/null +++ b/.editorconfig @@ -0,0 +1,55 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +# The line max length is 120, match checkstyle rules. +max_line_length = 120 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.json] +tab_width = 2 +indent_size = 2 + +[*.{yml,yaml}] +tab_width = 2 +indent_size = 2 + +[*.xml] +ij_xml_attribute_wrap = off +ij_xml_text_wrap = off +ij_xml_keep_blank_lines = 1 + +[pom.xml] +indent_size = 2 + +[*.java] +indent_size = 4 +tab_width = 4 + +[*.js] +indent_size = 2 + +[*.ts] +indent_size = 2