Skip to content

Commit

Permalink
add eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
adenflorian committed Oct 6, 2020
1 parent a22b4b6 commit 1ea9278
Show file tree
Hide file tree
Showing 7 changed files with 1,198 additions and 1 deletion.
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = false
max_line_length = 180
tab_width = 4
63 changes: 63 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"env": {
"browser": true,
"es2021": true
},
"rules": {
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"linebreak-style": [
"error",
"unix"
],
"quotes": "off",
"semi": [
"error",
"always"
],
"curly": [
"error",
"all"
],
"brace-style": [
"error",
"1tbs"
],
"space-before-blocks": "error",
"space-before-function-paren": [
"error",
{
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}
],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"keyword-spacing": "error",
"no-irregular-whitespace": "error",
"no-trailing-spaces": "error",
"semi-spacing": "error",
"no-mixed-spaces-and-tabs": "error",
"no-multi-spaces": "error",
"prefer-const": [
"error",
{
"destructuring": "all"
}
],
// The vanilla code already has over 100 console.logs, but maybe we can enable this in master and delete them there
"no-console": "off",
"no-debugger": "error",
"eol-last": [
"error",
"never"
]
}
}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@
!/src/**
!.gitignore
!CODEOWNERS
!package.json
!package-lock.json
!.editorconfig
!.eslintrc.json
.DS_Store
node_modules
/src/sound/.cache
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
Loading

0 comments on commit 1ea9278

Please sign in to comment.