Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vue Rewrite] Clean up indentation + linting rules #1907

Merged
merged 4 commits into from
Oct 3, 2022
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
7 changes: 6 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.{js,php,html,vue}]
[*.{php,html}]
indent_style = space
indent_size = 4
charset = utf-8

[*.{js,ts,vue}]
indent_style = tab
indent_size = 4
charset = utf-8

[*.bats]
indent_style = space
indent_size = 2
Expand Down
41 changes: 17 additions & 24 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
module.exports = {
root: true,
parser: 'vue-eslint-parser',
parserOptions: {
parser: {
ts: '@typescript-eslint/parser',
},
ecmaVersion: 2020,
},
extends: [
'eslint:recommended',
'plugin:vue/base',
'plugin:vue/essential',
'@vue/standard',
'@vue/typescript/recommended',
'@nextcloud',
],
ignorePatterns: ['*.d.ts'],
rules: {
'node/no-unpublished-import': 'off', // necessary for vue-property-decorator (not published?)

// TODO: remove these indentation rules during reformat (expects tab char \t but right now code base uses spaces)
'vue/html-indent': 'off',
indent: ['error', 4],
},
root: true,
parser: 'vue-eslint-parser',
parserOptions: {
parser: {
ts: '@typescript-eslint/parser',
},
ecmaVersion: 2020,
},
extends: [
'eslint:recommended',
'plugin:vue/base',
'plugin:vue/essential',
'@vue/standard',
'@vue/typescript/recommended',
'@nextcloud',
],
ignorePatterns: ['*.d.ts'],
}
8 changes: 4 additions & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
plugins: [
'@babel/plugin-syntax-dynamic-import',
],
presets: ['@babel/preset-env'],
plugins: [
'@babel/plugin-syntax-dynamic-import',
],
presets: ['@babel/preset-env'],
}
28 changes: 14 additions & 14 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<Content app-name="news">
<Sidebar />
<AppContent>
<router-view />
</AppContent>
</Content>
<Content app-name="news">
<Sidebar />
<AppContent>
<router-view />
</AppContent>
</Content>
</template>

<script>
Expand All @@ -13,13 +13,13 @@ import AppContent from '@nextcloud/vue/dist/Components/AppContent'
import Sidebar from './components/Sidebar.vue'

export default {
components: {
Content,
Sidebar,
AppContent,
},
created() {
this.$store.dispatch('loadFolder')
},
components: {
Content,
Sidebar,
AppContent,
},
created() {
this.$store.dispatch('loadFolder')
},
}
</script>
Loading