summaryrefslogtreecommitdiffstats
path: root/.eslintrc
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2019-11-14 22:39:51 +0100
committerzeripath <art27@cantab.net>2019-11-14 21:39:51 +0000
commit3621944c2d381d159cf2622328927cf282f0b3e0 (patch)
tree17c4b38f851fae79c0084ce47a425b39f99f56c7 /.eslintrc
parent4b5ebb93e48f04227ec18cf042e916df4eafe830 (diff)
downloadgitea-3621944c2d381d159cf2622328927cf282f0b3e0.tar.gz
gitea-3621944c2d381d159cf2622328927cf282f0b3e0.zip
modernize js and use babel (#8973)
* modernize js and use babel - add babel toolchain to transform modern JS to ES5 - extend eslint config for modern rules - fixes linting issues via `eslint --fix` and manual fixes * run 'make css' to satisfy CI * code style tweaks and set js indendation to 2 in .editorconfig * regenerate js
Diffstat (limited to '.eslintrc')
-rw-r--r--.eslintrc37
1 files changed, 30 insertions, 7 deletions
diff --git a/.eslintrc b/.eslintrc
index fa2c16614f..4302886d75 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,28 +1,51 @@
root: true
extends:
+ - eslint-config-airbnb-base
- eslint:recommended
parserOptions:
- ecmaVersion: 2015
+ ecmaVersion: 2020
env:
browser: true
- jquery: true
es6: true
+ jquery: true
node: true
globals:
Clipboard: false
CodeMirror: false
+ Dropzone: false
emojify: false
+ hljs: false
SimpleMDE: false
- Vue: false
- Dropzone: false
u2fApi: false
- hljs: false
+ Vue: false
rules:
- no-unused-vars: [error, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, ignoreRestSiblings: true}]
- prefer-const: [2, {destructuring: all}]
+ camelcase: [0]
+ comma-dangle: [2, only-multiline]
+ consistent-return: [0]
+ default-case: [0]
+ func-names: [0]
+ max-len: [0]
+ newline-per-chained-call: [0]
+ arrow-body-style: [0]
+ no-alert: [0]
+ no-continue: [0]
+ no-mixed-operators: [0]
+ no-multi-assign: [0]
+ no-new: [0]
+ no-param-reassign: [0]
+ no-plusplus: [0]
+ no-restricted-syntax: [0]
+ no-shadow: [0]
+ no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, ignoreRestSiblings: true}]
+ no-use-before-define: [0]
no-var: [2]
+ one-var-declaration-per-line: [0]
+ one-var: [0]
+ prefer-const: [2, {destructuring: all}]
+ prefer-destructuring: [0]
+ radix: [2, as-needed]