Skip to content

Commit

Permalink
refactor: backend to es6-style syntax
Browse files Browse the repository at this point in the history
chore: introduce eslint (resolve #53)
  • Loading branch information
muety committed Jan 15, 2022
1 parent c9e8abd commit cbee216
Show file tree
Hide file tree
Showing 21 changed files with 1,424 additions and 966 deletions.
74 changes: 74 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"env": {
"browser": true,
"commonjs": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 13
},
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
],
"prefer-arrow-callback": [
"error"
],
"prefer-template": [
"error"
],
"no-useless-concat": [
"error"
],
"no-var": [
"error"
],
"prefer-const": [
"error"
],
"sort-imports": [
"error"
],
"no-extra-semi": [
"error"
],
"array-bracket-spacing": [
"error"
],
"arrow-spacing": [
"error"
],
"comma-spacing": [
"error"
],
"eol-last": [
"error",
"never"
],
"indent": [
"error",
4
],
"template-curly-spacing": [
"error",
"never"
],
"no-prototype-builtins": [
"off"
]
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ You can integrate Anchr with [ShareX](https://github.com/ShareX/ShareX) on Windo
* [`sharex-shortlinks.json`](scripts/sharex-shortlinks.json)
1. Import both files as custom uploaders in ShareX

## 🧩 Project State
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.
## 🧩 Project History
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.

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

0 comments on commit cbee216

Please sign in to comment.