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

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-07-04 18:02:17 +0300
committerJulius Härtl <jus@bitgrid.net>2019-07-16 08:39:15 +0300
commiteee488d611f0832ada940a4f871ebd6a4c477d56 (patch)
tree05500ba77a7b5209e70efbb0c8c898a85cabae9f /.eslintrc.js
parent20edf47a9ac399916c7bc93af37bb9f1e8312b94 (diff)
Move to webpack build
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js74
1 files changed, 74 insertions, 0 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 00000000..060255fa
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,74 @@
+module.exports = {
+ root: true,
+ env: {
+ browser: true,
+ es6: true,
+ node: true,
+ jest: true
+ },
+ globals: {
+ t: true,
+ n: true,
+ OC: true,
+ OCA: true,
+ Vue: true,
+ VueRouter: true
+ },
+ parserOptions: {
+ parser: 'babel-eslint',
+ ecmaVersion: 6
+ },
+ extends: [
+ 'eslint:recommended',
+ 'plugin:node/recommended',
+ 'plugin:vue/essential',
+ 'plugin:vue/recommended',
+ 'standard'
+ ],
+ plugins: ['vue', 'node'],
+ rules: {
+ // space before function ()
+ 'space-before-function-paren': ['error', 'never'],
+ // curly braces always space
+ 'object-curly-spacing': ['error', 'always'],
+ // stay consistent with array brackets
+ 'array-bracket-newline': ['error', 'consistent'],
+ // 1tbs brace style
+ 'brace-style': 'error',
+ // tabs only
+ indent: ['error', 'tab'],
+ 'no-tabs': 0,
+ 'vue/html-indent': ['error', 'tab'],
+ // only debug console
+ 'no-console': ['error', { allow: ['error', 'warn', 'debug'] }],
+ // classes blocks
+ 'padded-blocks': ['error', { classes: 'always' }],
+ // always have the operator in front
+ 'operator-linebreak': ['error', 'before'],
+ // ternary on multiline
+ 'multiline-ternary': ['error', 'always-multiline'],
+ // es6 import/export and require
+ 'node/no-unpublished-require': ['off'],
+ 'node/no-unsupported-features/es-syntax': ['off'],
+ // kebab case components for vuejs
+ 'vue/component-name-in-template-casing': ['error', 'kebab-case'],
+ // space before self-closing elements
+ 'vue/html-closing-bracket-spacing': 'error',
+ // newline before closing bracket
+ 'vue/html-closing-bracket-newline': ["error", {
+ "singleline": "never",
+ "multiline": "never"
+ }],
+ // code spacing with attributes
+ 'vue/max-attributes-per-line': [
+ 'error',
+ {
+ singleline: 3,
+ multiline: {
+ max: 3,
+ allowFirstLine: true
+ }
+ }
+ ]
+ }
+}