Skip to content

Commit 95b5294

Browse files
committed
🕺🏻 [style] Sort JSON keys
1 parent 555c88d commit 95b5294

6 files changed

Lines changed: 43 additions & 16 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "Ubuntu",
32
"build": {
43
"dockerfile": "Dockerfile"
54
},
5+
"name": "Ubuntu",
66
"postCreateCommand": "make"
77
}

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: eslint-json
5+
name: ESLint (JSON)
6+
entry: eslint
7+
language: node
8+
additional_dependencies:
9+
- eslint
10+
- "@eslint/json"
11+
files: \.json$
12+
types: [file]

eslint.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const { default: json } = require("@eslint/json")
2+
3+
module.exports = [
4+
{
5+
plugins: { json },
6+
files: ["**/*.json"],
7+
language: "json/json5",
8+
rules: {
9+
"json/no-duplicate-keys": "error",
10+
"json/no-empty-keys": "error",
11+
"json/sort-keys": "error",
12+
},
13+
},
14+
]
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"_docs": "https://github.com/zyedidia/micro/blob/master/runtime/help/options.md#settingsjson-file",
3-
"tabsize": 4,
4-
"tabstospaces": true,
5-
"*.rb": {
6-
"tabsize": 2
7-
},
82
"*.js": {
93
"tabsize": 2
104
},
115
"*.json": {
126
"tabsize": 2
137
},
8+
"*.rb": {
9+
"tabsize": 2
10+
},
1411
"*.ts": {
1512
"tabsize": 2
16-
}
13+
},
14+
"_docs": "https://github.com/zyedidia/micro/blob/master/runtime/help/options.md#settingsjson-file",
15+
"tabsize": 4,
16+
"tabstospaces": true
1717
}

pkg/vscode/stow/mcp.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

pkg/vscode/stow/settings.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,27 +215,27 @@
215215
"tsconfig.json": "tsconfig.*.json"
216216
},
217217
"files.associations": {
218-
".env": "dotenv",
219-
".env*": "dotenv",
220-
".gitalias": "properties",
221-
".vercelignore": "ignore",
222218
"*.Brewfile": "ruby",
219+
"*.Makefile": "makefile",
223220
"*.dropboxignore": "ignore",
224221
"*.gitalias": "properties",
225-
"*.Makefile": "makefile",
226222
"*.mdx": "mdx",
227223
"*.njk": "njk",
228224
"*.plist": "xml",
229225
"*.sublime-keymap": "jsonc",
230-
"*.sublime-settings": "jsonc"
226+
"*.sublime-settings": "jsonc",
227+
".env": "dotenv",
228+
".env*": "dotenv",
229+
".gitalias": "properties",
230+
".vercelignore": "ignore"
231231
},
232232
"files.autoGuessEncoding": true,
233233
"files.exclude": {
234-
"**/__pycache__": true,
234+
"**/*.pyc": true,
235235
"**/.classpath": true,
236236
"**/.factorypath": true,
237237
"**/.project": true,
238-
"**/*.pyc": true
238+
"**/__pycache__": true
239239
},
240240
"git.autoStash": true,
241241
"git.autofetch": true,

0 commit comments

Comments
 (0)