Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
module.exports = {
root: true,
env: {
browser: true,
es6: true,
node: true
},
globals: {
oc_config: true,
oca_contacts: true,
moment: true,
escapeHTML: true,
n: true,
t: true,
OC: true,
OCA: true,
OCP: true,
Vue: true,
$: true // FIXME should remove jQuery dependency
},
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 6
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:node/recommended',
'plugin:vue/essential',
'plugin:vue/recommended',
'standard'
],
settings: {
'import/resolver': {
webpack: {
config: 'src/webpack.common.js'
},
node: {
paths: ['src'],
extensions: ['.js', '.vue']
}
}
},
plugins: ['vue', 'node'],
rules: {
"no-control-regex": 0,

// 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', 'info', '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'],
// 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'],
// 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',
// 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
}
}
],
'vue/no-v-html': ['off']
}
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/js/*.js binary
/js/*.js.map binary
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ build-js:
build-js-production:
npm run build

lint:
npm run lint

lint-fix:
npm run lint:fix

watch-js:
npm run watch

Expand Down
8 changes: 6 additions & 2 deletions css/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
right: 13px;
width: 350px;
max-width: 90%;
min-height: 100px;
min-height: 200px;

.notification-wrapper {
display: flex;
Expand All @@ -44,7 +44,10 @@
}

.emptycontent {
margin: 50px 0;
padding: 50px 0;
margin: 0;
position: absolute;
top: 0;

@include icon-black-white('notifications-dark', 'notifications', 1);
}
Expand Down Expand Up @@ -77,6 +80,7 @@

.notification {
padding-bottom: 12px;
max-height: 500px;

&:not(:last-child) {
border-bottom: 1px solid var(--color-border);
Expand Down
18 changes: 13 additions & 5 deletions js/notifications.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/notifications.js.map

Large diffs are not rendered by default.

Loading