Skip to content

Commit

Permalink
Use global eslint config and @nextcloud/packages
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv committed Oct 7, 2019
1 parent 2d2639a commit 58f93e8
Show file tree
Hide file tree
Showing 10 changed files with 1,423 additions and 10,090 deletions.
71 changes: 2 additions & 69 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,72 +1,5 @@
module.exports = {
root: true,
env: {
browser: true,
es6: true,
node: true,
jest: true
},
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 6
},
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:vue/essential',
'plugin:vue/recommended',
'plugin:nextcloud/recommended',
'standard'
],
plugins: [
'node',
'vue',
],
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', 'PascalCase'],
// force name
'vue/match-component-file-name': ['error', {
'extensions': ['jsx', 'vue', 'js'],
'shouldMatchCase': true
}],
// space before self-closing elements
'vue/html-closing-bracket-spacing': 'error',
// no ending html tag on a new line
'vue/html-closing-bracket-newline': ['error', { multiline: 'never' }],
// code spacing with attributes
'vue/max-attributes-per-line': [
'error',
{
singleline: 3,
multiline: {
max: 3,
allowFirstLine: true
}
}
]
}
'nextcloud'
]
}
Loading

0 comments on commit 58f93e8

Please sign in to comment.