Skip to content

Commit b7bd6ef

Browse files
authored
Merge pull request DSpace#2110 from atmire/add-json5-eslint-support
Added i18n ESLint support
2 parents 4e7cad9 + afbd16d commit b7bd6ef

29 files changed

Lines changed: 28942 additions & 28941 deletions

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ trim_trailing_whitespace = false
1515

1616
[*.ts]
1717
quote_type = single
18+
19+
[*.json5]
20+
ij_json_keep_blank_lines_in_code = 3

.eslintrc.json

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"eslint-plugin-jsdoc",
88
"eslint-plugin-deprecation",
99
"unused-imports",
10-
"eslint-plugin-lodash"
10+
"eslint-plugin-lodash",
11+
"eslint-plugin-jsonc"
1112
],
1213
"overrides": [
1314
{
@@ -224,6 +225,42 @@
224225
"@angular-eslint/template/no-negated-async": "off",
225226
"@angular-eslint/template/eqeqeq": "off"
226227
}
228+
},
229+
{
230+
"files": [
231+
"*.json5"
232+
],
233+
"extends": [
234+
"plugin:jsonc/recommended-with-jsonc"
235+
],
236+
"rules": {
237+
"no-irregular-whitespace": "error",
238+
"no-trailing-spaces": "error",
239+
"jsonc/comma-dangle": [
240+
"error",
241+
"always-multiline"
242+
],
243+
"jsonc/indent": [
244+
"error",
245+
2
246+
],
247+
"jsonc/key-spacing": [
248+
"error",
249+
{
250+
"beforeColon": false,
251+
"afterColon": true,
252+
"mode": "strict"
253+
}
254+
],
255+
"jsonc/no-dupe-keys": "off",
256+
"jsonc/quotes": [
257+
"error",
258+
"double",
259+
{
260+
"avoidEscape": false
261+
}
262+
]
263+
}
227264
}
228265
]
229266
}

angular.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@
266266
"options": {
267267
"lintFilePatterns": [
268268
"src/**/*.ts",
269-
"src/**/*.html"
269+
"src/**/*.html",
270+
"src/**/*.json5"
270271
]
271272
}
272273
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
"eslint-plugin-deprecation": "^1.3.2",
171171
"eslint-plugin-import": "^2.25.4",
172172
"eslint-plugin-jsdoc": "^39.6.4",
173+
"eslint-plugin-jsonc": "^2.6.0",
173174
"eslint-plugin-lodash": "^7.4.0",
174175
"eslint-plugin-unused-imports": "^2.0.0",
175176
"express-static-gzip": "^2.1.5",

0 commit comments

Comments
 (0)