File tree Expand file tree Collapse file tree 7 files changed +81
-9
lines changed Expand file tree Collapse file tree 7 files changed +81
-9
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ reportUnusedDisableDirectives: true
3
3
4
4
ignorePatterns:
5
5
- /web_src/js/vendor
6
+ - /templates/base/head.tmpl
7
+ - /templates/repo/activity.tmpl
8
+ - /templates/repo/view_file.tmpl
6
9
7
10
parserOptions:
8
11
sourceType: module
@@ -12,6 +15,7 @@ plugins:
12
15
- eslint-plugin-unicorn
13
16
- eslint-plugin-import
14
17
- eslint-plugin-vue
18
+ - eslint-plugin-html
15
19
16
20
extends:
17
21
- plugin:vue/recommended
@@ -27,12 +31,19 @@ globals:
27
31
SimpleMDE: false
28
32
u2fApi: false
29
33
34
+ settings:
35
+ html/html-extensions: [".tmpl"]
36
+
30
37
overrides:
31
- - files: ["web_src/**/*.js", "web_src/**/*.vue"]
38
+ - files: ["web_src/**/*.js", "web_src/**/*.vue", "templates/**/*.tmpl" ]
32
39
env:
33
40
browser: true
34
41
jquery: true
35
42
node: false
43
+ - files: ["templates/**/*.tmpl"]
44
+ rules:
45
+ no-tabs: [0]
46
+ indent: [2, tab, {SwitchCase: 1}]
36
47
- files: ["web_src/**/*worker.js"]
37
48
env:
38
49
worker: true
Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ lint: lint-frontend lint-backend
312
312
313
313
.PHONY : lint-frontend
314
314
lint-frontend : node_modules
315
- npx eslint --max-warnings=0 web_src/js build webpack.config.js
315
+ npx eslint --max-warnings=0 web_src/js build templates webpack.config.js
316
316
npx stylelint --max-warnings=0 web_src/less
317
317
318
318
.PHONY : lint-backend
Original file line number Diff line number Diff line change 55
55
},
56
56
"devDependencies" : {
57
57
"eslint" : " 7.13.0" ,
58
+ "eslint-plugin-html" : " 6.1.1" ,
58
59
"eslint-plugin-import" : " 2.22.1" ,
59
60
"eslint-plugin-unicorn" : " 23.0.0" ,
60
61
"eslint-plugin-vue" : " 7.1.0" ,
Original file line number Diff line number Diff line change 16
16
<script src="{{StaticUrlPrefix}}/vendor/plugins/codemirror/addon/mode/loadmode.js"></script>
17
17
<script src="{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/meta.js"></script>
18
18
<script>
19
- CodeMirror.modeURL = " {{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/%N/%N.js" ;
19
+ CodeMirror.modeURL = ' {{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/%N/%N.js' ;
20
20
</script>
21
21
{{end}}
22
22
Original file line number Diff line number Diff line change 278
278
279
279
{{if .IsSplitStyle}}
280
280
<script>
281
- document.addEventListener('DOMContentLoaded', function() {
281
+ document.addEventListener('DOMContentLoaded', () => {
282
282
$('tr.add-code').each(function() {
283
- var prev = $(this).prev();
284
- if(prev.is('.del-code') && prev.children().eq(5).text().trim() === '') {
285
- while(prev.prev().is('.del-code') && prev.prev().children().eq(5).text().trim() === '') {
283
+ let prev = $(this).prev();
284
+ if (prev.is('.del-code') && prev.children().eq(5).text().trim() === '') {
285
+ while (prev.prev().is('.del-code') && prev.prev().children().eq(5).text().trim() === '') {
286
286
prev = prev.prev();
287
287
}
288
- prev.children().eq(3).attr(" data-line-num" , $(this).children().eq(3).attr(" data-line-num" ));
288
+ prev.children().eq(3).attr(' data-line-num' , $(this).children().eq(3).attr(' data-line-num' ));
289
289
prev.children().eq(3).html($(this).children().eq(3).html());
290
290
prev.children().eq(4).html($(this).children().eq(4).html());
291
291
prev.children().eq(5).html($(this).children().eq(5).html());
Original file line number Diff line number Diff line change 135
135
if (httpsButton) httpsButton.classList[isSSH ? 'remove' : 'add']('primary');
136
136
setTimeout(() => {
137
137
if (sshButton) sshButton.classList.remove('no-transition');
138
- if (httpsButto ) httpsButton.classList.remove('no-transition');
138
+ if (httpsButton ) httpsButton.classList.remove('no-transition');
139
139
}, 100);
140
140
</script>
141
141
{{if or (not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))}}
You can’t perform that action at this time.
0 commit comments