Skip to content

Commit bcda6a8

Browse files
authored
Update dot files (#1019)
Remove some that are no longer necessary, update `.editorconfig`, and convert jsonlint config file to YAML format because YAML allows file coments.
1 parent 4b49cc8 commit bcda6a8

File tree

4 files changed

+41
-85
lines changed

4 files changed

+41
-85
lines changed

.editorconfig

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,10 @@
1515
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1616
# Common editor configurations for this project.
1717
#
18-
# EditorConfig defines a file format for specifying some common coding style
19-
# parameters. Many IDEs and editors read .editorconfig files, either natively
20-
# or via plugins. A few formatters also read .editorconfig; shfmt and Prettier
21-
# are two examples (as of early 2025).
22-
#
18+
# EditorConfig is a file format for specifying some common style parameters.
19+
# Many IDEs & editors read .editorconfig files, either natively or via plugins.
2320
# We mostly follow Google's style guides (https://google.github.io/styleguide/)
24-
# with very few deviations.
25-
#
26-
# Miscellaneous notes:
27-
#
28-
# - The EditorConfig property `max_line_length` is not set here because its
29-
# intended behavior is poorly specified. (See the discussion in the comments
30-
# at https://github.com/editorconfig/editorconfig/issues/387) It *would* have
31-
# been desirable to define a project convention for the line width here, but
32-
# we must instead use editor-specific configuration files to do that.
33-
#
34-
# - With few exceptions (e.g., shfmt), `.editorconfig` files are not read by
35-
# linters or formatters, which means the project needs separate config files
36-
# for those tools. This includes markdownlint, yamllint, and others.
21+
# with only a few deviations for line length and indentation in some files.
3722
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3823

3924
root = true
@@ -43,32 +28,27 @@ charset = utf-8
4328
indent_style = space
4429
insert_final_newline = true
4530
spelling_language = en-US
46-
# It would be preferable not to set tab_width, but some EditorConfig plugins
47-
# (e.g., Emacs's) set it equal to indent_size if it's not set otherwise.
48-
tab_width = 8
49-
# Trailing whitespace on lines is almost always noise. An exception is in
50-
# Markdown, where two spaces = line break; however, that's such a foot-gun in
51-
# practice that we avoid it. So, it's okay to set this next value globally.
5231
trim_trailing_whitespace = true
32+
max_line_length = 100
5333

54-
[{BUILD,*.BUILD,*.bzl,*.bazel}]
34+
[{BUILD,*.BUILD,*.bzl,*.bazel,.bazelrc}]
5535
# Google doesn't have a style guideline for Bazel files. Most people use 4.
5636
indent_size = 4
5737

5838
[{*.cc,*.h}]
59-
# This matches Google style guidelines.
39+
# Google style guidelines use 2.
6040
indent_size = 2
6141

62-
[{*.ts,*.js}]
63-
# This matches Google style guidelines.
42+
[{*.js,*.ts}]
43+
# Google style guidelines use 2.
6444
indent_size = 2
6545

6646
[*.json]
6747
# Not stated explicitly in Google's guidelines, but the examples use 2.
6848
indent_size = 2
6949

7050
[*.py]
71-
# This matches Google style guidelines.
51+
# Google style guidelines use 4.
7252
indent_size = 4
7353

7454
[*.rst]
@@ -78,16 +58,6 @@ indent_size = 3
7858
[*.sh]
7959
# Google style guidelines use 2.
8060
indent_size = 4
81-
# The following are used by shfmt. These bring it closer to Google's style.
82-
binary_next_line = true
83-
shell_variant = bash
84-
space_redirects = true
85-
switch_case_indent = true
86-
87-
# If this repository has a "third_party" directory, ignore it entirely.
88-
# Note: shfmt also respects this if you run it with --appply-ignore.
89-
[third_party/**]
90-
ignore = true
9161

9262
[{*.yaml,*.yml}]
9363
# Google doesn't have style guidelines for YAML. Most people use indent = 2.

.jsonlintrc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.jsonlintrc.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+
# Project configuration for jsonlint (https://github.com/prantlf/jsonlint).
17+
# Note: there are multiple programs named jsonlint. The one targeted by this
18+
# config file is an updated fork of a different "jsonlint".
19+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20+
21+
comments: false
22+
compact: true
23+
continue: true
24+
endOfLine: lf
25+
indent: 2
26+
log-files: false
27+
no-duplicate-keys: true
28+
patterns:
29+
- '**/*.json'
30+
- '!**/node_modules'
31+
singleQuote: false
32+
trailing-commas: false

.shellcheckrc

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)