Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-03-06 13:48:31 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-03-06 13:48:31 +0300
commitedcb1715205aefe6571af7660d2477bcda7c7c03 (patch)
tree8c17ec3eda449c12a5bb20f9a9ef7f6525be7a91
parenteaddda52ef26136b18856cf97c678c569c55495c (diff)
Add liniting config
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--.eslintrc.js18
-rw-r--r--package.json6
2 files changed, 21 insertions, 3 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index 6f58e803a..a8687ea74 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -2,17 +2,33 @@ module.exports = {
root: true,
env: {
node: true,
+ amd: true,
+ jquery: true,
+ mocha: true,
},
extends: [
- 'eslint:recommended',
'plugin:vue/recommended',
'plugin:prettier/recommended',
+ 'prettier/vue',
+ 'eslint:recommended',
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
+ 'no-unused-vars': 'off',
+ 'vue/no-v-html': 'off',
+ 'no-case-declarations': 'off',
},
parserOptions: {
parser: 'babel-eslint',
},
+ globals: {
+ expect: true,
+ OC: true,
+ OCA: true,
+ t: true,
+ __webpack_public_path__: true,
+ __webpack_nonce__: true,
+ _: true,
+ }
}
diff --git a/package.json b/package.json
index cfddffa72..0182d9c70 100644
--- a/package.json
+++ b/package.json
@@ -8,8 +8,8 @@
"scripts": {
"build": "webpack --progress --hide-modules --config webpack.prod.js",
"dev": "webpack --progress --watch --config webpack.dev.js",
- "lint": "$(npm bin)/eslint --ext .js,.vue js",
- "lint:autofix": "eslint --ext .js,.vue js --fix",
+ "lint": "eslint --ext .js,.vue src",
+ "lint:autofix": "eslint --ext .js,.vue src --fix",
"test": "mocha-webpack --webpack-config webpack.test.js --require src/tests/setup.js \"src/tests/**/*.spec.js\"",
"test:watch": "mocha-webpack -w --webpack-config webpack.test.js --require src/tests/setup.js \"src/tests/**/*.spec.js\""
},
@@ -80,9 +80,11 @@
"webpack-node-externals": "^1.7.2"
},
"prettier": {
+ "bracketSpacing": false,
"singleQuote": true,
"semi": false,
"useTabs": true,
+ "printWidth": 120,
"tabWidth": 4,
"trailingComma": "es5"
}