polls/.eslintrc.js

90 строки
2.1 KiB
JavaScript
Исходник Обычный вид История

2018-12-31 23:12:46 +03:00
module.exports = {
root: true,
env: {
browser: true,
es6: true,
node: true,
2020-02-19 18:06:21 +03:00
jest: true,
2018-12-31 23:12:46 +03:00
},
globals: {
t: true,
n: true,
OC: true,
OCA: true,
Vue: true,
VueRouter: true,
2020-02-19 18:06:21 +03:00
moment:true,
2018-12-31 23:12:46 +03:00
},
parserOptions: {
parser: 'babel-eslint',
2020-02-19 18:06:21 +03:00
ecmaVersion: 6,
2018-12-31 23:12:46 +03:00
},
extends: [
2020-02-27 19:23:29 +03:00
'plugin:@nextcloud/recommended',
2018-12-31 23:12:46 +03:00
'eslint:recommended',
'plugin:node/recommended',
'plugin:vue/essential',
'plugin:vue/recommended',
2020-02-19 18:06:21 +03:00
'standard',
2018-12-31 23:12:46 +03:00
],
2020-01-31 09:51:45 +03:00
plugins: [
'vue',
'node',
],
2018-12-31 23:12:46 +03:00
rules: {
2020-02-27 19:23:29 +03:00
"@nextcloud/no-deprecations": "warn",
"@nextcloud/no-removed-apis": "error",
2020-01-31 09:51:45 +03:00
'node/no-missing-import': ['error', {
'allowModules': [],
'tryExtensions': ['.js', '.vue']
2019-09-08 23:03:31 +03:00
}],
2020-02-19 18:06:21 +03:00
// 'comma-dangle': ['error', 'always-multiline'],
2018-12-31 23:12:46 +03:00
// 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'],
2019-08-18 20:33:36 +03:00
// kebab case components for vuejs
'vue/component-name-in-template-casing': ['error', 'PascalCase' , {
2020-01-31 09:51:45 +03:00
'registeredComponentsOnly': true,
'ignores': []
}],
2018-12-31 23:12:46 +03:00
// space before self-closing elements
'vue/html-closing-bracket-spacing': 'error',
// code spacing with attributes
2019-08-18 20:33:36 +03:00
// newline before closing bracket
2020-01-31 09:51:45 +03:00
'vue/html-closing-bracket-newline': ['error', {
'singleline': 'never',
'multiline': 'never'
2019-08-18 20:33:36 +03:00
}],
2018-12-31 23:12:46 +03:00
'vue/max-attributes-per-line': [
'error',
{
singleline: 3,
multiline: {
max: 3,
allowFirstLine: true
}
}
]
}
}