-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use global eslint config and @nextcloud/packages
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,423 additions
and
10,090 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
] | ||
} |
Oops, something went wrong.