Skip to content

Commit cbee216

Browse files
committed
refactor: backend to es6-style syntax
chore: introduce eslint (resolve #53)
1 parent c9e8abd commit cbee216

File tree

21 files changed

+1424
-966
lines changed

21 files changed

+1424
-966
lines changed

.eslintrc.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"commonjs": true,
5+
"es2021": true
6+
},
7+
"extends": "eslint:recommended",
8+
"parserOptions": {
9+
"ecmaVersion": 13
10+
},
11+
"rules": {
12+
"indent": [
13+
"error",
14+
4
15+
],
16+
"linebreak-style": [
17+
"error",
18+
"unix"
19+
],
20+
"quotes": [
21+
"error",
22+
"single"
23+
],
24+
"semi": [
25+
"error",
26+
"never"
27+
],
28+
"prefer-arrow-callback": [
29+
"error"
30+
],
31+
"prefer-template": [
32+
"error"
33+
],
34+
"no-useless-concat": [
35+
"error"
36+
],
37+
"no-var": [
38+
"error"
39+
],
40+
"prefer-const": [
41+
"error"
42+
],
43+
"sort-imports": [
44+
"error"
45+
],
46+
"no-extra-semi": [
47+
"error"
48+
],
49+
"array-bracket-spacing": [
50+
"error"
51+
],
52+
"arrow-spacing": [
53+
"error"
54+
],
55+
"comma-spacing": [
56+
"error"
57+
],
58+
"eol-last": [
59+
"error",
60+
"never"
61+
],
62+
"indent": [
63+
"error",
64+
4
65+
],
66+
"template-curly-spacing": [
67+
"error",
68+
"never"
69+
],
70+
"no-prototype-builtins": [
71+
"off"
72+
]
73+
}
74+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ You can integrate Anchr with [ShareX](https://github.com/ShareX/ShareX) on Windo
116116
* [`sharex-shortlinks.json`](scripts/sharex-shortlinks.json)
117117
1. Import both files as custom uploaders in ShareX
118118

119-
## 🧩 Project State
120-
The project's origins lie in 2014, back when the [MEAN stack](https://www.mongodb.com/mean-stack) was the sh*t. It was the author's first real web project and a great opportunity to learn. The project is maintained ever since, however, considered mostly feature-complete. Dependencies are updated occasionally. Because the project started quite a couple of years ago, it is still based on old-fashioned JavaScript ES5 syntax, alongside vintage tools like [Grunt](https://gruntjs.com/) and [Bower](https://bower.io/). Certainly, this is not state-of-the-art in web dev anymore. However, to keep consistency with existing code, the original code style should still be followed in new contributions. Please don't use `const` and `let`, template strings, arrow functions, `async / await` etc.
119+
## 🧩 Project History
120+
The project's origins lie in 2014, back when the [MEAN stack](https://www.mongodb.com/mean-stack) was the sh*t. It was the author's first real web project and a great opportunity to learn. The project is maintained ever since, however, considered mostly feature-complete. Dependencies are updated occasionally. Because the project started quite a couple of years ago, some parts are still based on old-fashioned JavaScript ES5 syntax, alongside vintage tools like [Grunt](https://gruntjs.com/) and [Bower](https://bower.io/). Certainly, this is not state-of-the-art in web dev anymore. However, to keep consistency with existing code, the original code style should still be followed in new contributions. **Update:** Just [recently](https://github.com/muety/anchr/issues/54), all backend-side code was refactored to modern JavaScript syntax to ease development.
121121

122122
## 📓 License
123123
GNU General Public License v3 (GPL-3) @ [Ferdinand Mütsch](https://muetsch.io)

0 commit comments

Comments
 (0)