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

github.com/nextcloud/privacy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2019-01-02 15:04:55 +0300
committerGeorg Ehrke <developer@georgehrke.com>2019-02-18 02:47:45 +0300
commitcda9724b257e73b9b350566fddc7ffd2c03ce622 (patch)
tree3cf52f3210de1737516face17d31174ac4582bf7 /.eslintrc.js
initial checkin
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js76
1 files changed, 76 insertions, 0 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 0000000..6924fbe
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,76 @@
+module.exports = {
+ root: true,
+ env: {
+ browser: true,
+ es6: true,
+ node: true,
+ jest: true
+ },
+ globals: {
+ t: true,
+ n: true,
+ OC: true,
+ OCA: true,
+ Vue: true,
+ },
+ parserOptions: {
+ parser: 'babel-eslint'
+ },
+ 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 add a trailing comma, for diff readability
+ 'comma-dangle': ["error", "only-multiline"],
+ // always have the operator in front
+ 'operator-linebreak': ['error', 'before'],
+ // ternary on multiline
+ 'multiline-ternary': ['error', 'always-multiline'],
+ // force proper JSDocs
+ 'valid-jsdoc': [2, {
+ 'prefer': {
+ 'return': 'returns'
+ },
+ 'requireReturn': false,
+ 'requireReturnDescription': false
+ }],
+ // es6 import/export and require
+ 'node/no-unpublished-require': ['off'],
+ 'node/no-unsupported-features/es-syntax': ['off'],
+ 'node/no-unsupported-features/es-builtins': ['off'],
+ // space before self-closing elements
+ 'vue/html-closing-bracket-spacing': 'error',
+ // code spacing with attributes
+ 'vue/max-attributes-per-line': [
+ 'error',
+ {
+ singleline: 3,
+ multiline: {
+ max: 3,
+ allowFirstLine: true
+ }
+ }
+ ]
+ }
+};