This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #949 from nextcloud/enh/vite
- Loading branch information
Showing
11 changed files
with
9,084 additions
and
15,421 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,88 +1,5 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
jest: true | ||
}, | ||
globals: { | ||
t: true, | ||
n: true, | ||
OC: true, | ||
OCA: true, | ||
Vue: true, | ||
VueRouter: true, | ||
SCOPE_VERSION: true | ||
}, | ||
parserOptions: { | ||
parser: 'babel-eslint', | ||
ecmaVersion: 6 | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:node/recommended', | ||
'plugin:vue/essential', | ||
'plugin:vue/recommended', | ||
'standard' | ||
'@nextcloud', | ||
], | ||
plugins: [ | ||
'nextcloud', | ||
'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'], | ||
// Nextcloud deprecations | ||
'nextcloud/no-deprecations': 'warn', | ||
// don't allow removed APIs | ||
'nextcloud/no-removed-apis': 'error', | ||
// es6 import/export and require | ||
'node/no-missing-import': ['error', { | ||
'tryExtensions': ['.js', '.json', '.vue'] | ||
}], | ||
'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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -11,18 +11,24 @@ jobs: | |
node: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-versions: [12.x] | ||
|
||
name: node${{ matrix.node-versions }} | ||
name: node | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up node ${{ matrix.node-versions }} | ||
uses: actions/setup-node@v1 | ||
- name: Read package.json node and npm engines version | ||
uses: skjnldsv/[email protected] | ||
id: versions | ||
with: | ||
fallbackNode: '^12' | ||
fallbackNpm: '^6' | ||
|
||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-versions: ${{ matrix.node-versions }} | ||
node-version: ${{ steps.versions.outputs.nodeVersion }} | ||
|
||
- name: Set up npm ${{ steps.versions.outputs.npmVersion }} | ||
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
Oops, something went wrong.