summaryrefslogtreecommitdiffstats
path: root/.eslintrc
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2019-05-16 07:57:47 +0200
committerLauris BH <lauris@nix.lv>2019-05-16 08:57:47 +0300
commitd9dcd093403b3194bcf3b4be36eaf90250e06ed1 (patch)
treef2b18a690ae35773e7e6f06e3c312f3a2a9902ea /.eslintrc
parent775a5a5b0f4c1a7aa7b301569fe89d7c6e751c46 (diff)
downloadgitea-d9dcd093403b3194bcf3b4be36eaf90250e06ed1.tar.gz
gitea-d9dcd093403b3194bcf3b4be36eaf90250e06ed1.zip
add make targets for js and css, add js linter (#6952)
* add make targets for js,css, add javascript linter - add `make js`, deprecating `make javascripts` - add `make css`, deprecating `make generate-stylesheets` and `make stylesheets-check` - changed the unclean css check to only run on CI - add JS linting via eslint with basic configuration and fixed discovered issues - changed autoprefixer to use official `postcss-cli` avoiding the need to loop in the makefile - moved browserslist to package.json so other future tools can use it too. - update documentation for new make targets and added JS section * fix indentation * move functions used in html to 'exported' list * Run lessc binary without having to install anything to node_modules * use relative paths to node bin scripts, removing npx * Revert "use relative paths to node bin scripts, removing npx" This reverts commit 119b725525a8430b32ee7a6e6009b4ece544e39b. * fix lessc and postcss plugins * check for node_modules and use actual bin names
Diffstat (limited to '.eslintrc')
-rw-r--r--.eslintrc25
1 files changed, 25 insertions, 0 deletions
diff --git a/.eslintrc b/.eslintrc
new file mode 100644
index 0000000000..41cad889b1
--- /dev/null
+++ b/.eslintrc
@@ -0,0 +1,25 @@
+root: true
+
+extends:
+ - eslint:recommended
+
+parserOptions:
+ ecmaVersion: 2015
+
+env:
+ browser: true
+ jquery: true
+ es6: true
+
+globals:
+ Clipboard: false
+ CodeMirror: false
+ emojify: false
+ SimpleMDE: false
+ Vue: false
+ Dropzone: false
+ u2fApi: false
+ hljs: false
+
+rules:
+ no-unused-vars: [error, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, ignoreRestSiblings: true}]