eslint stuff

This commit is contained in:
Jake Potrebic 2021-02-09 10:22:36 -08:00
parent 65bdd49286
commit 582785a71f
No known key found for this signature in database
GPG Key ID: 7C58557EC9C421F8
5 changed files with 10 additions and 35 deletions

View File

@ -4,21 +4,15 @@ module.exports = {
browser: true,
node: true,
},
extends: ['@nuxtjs/eslint-config-typescript', 'prettier', 'prettier/vue', 'plugin:prettier/recommended', 'plugin:nuxt/recommended'],
plugins: ['prettier'],
// add your custom rules here
extends: ['@nuxtjs/eslint-config-typescript', 'prettier', 'prettier/vue'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-unused-vars': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'vue/no-unused-components': 'warn',
'vue/valid-v-slot': [
'error',
{
allowModifiers: true,
},
],
'vue/valid-template-root': 'off', // dum false positive
},
};

View File

@ -7,8 +7,7 @@
"build": "nuxt-ts build",
"start": "nuxt-ts start",
"generate": "nuxt-ts generate",
"lint:js": "eslint --ext \".js,.vue,.ts\" --ignore-path .gitignore .",
"lint": "yarn lint:js"
"lint": "eslint --ext \".js,.vue,.ts\" --ignore-path .gitignore ."
},
"lint-staged": {
"*.{ts,js,vue}": "eslint"
@ -43,11 +42,9 @@
"@nuxtjs/vuetify": "^1.11.3",
"@types/lodash-es": "^4.17.4",
"@types/swagger-ui-dist": "^3.30.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.18.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-nuxt": "^2.0.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-vue": "^7.4.1",
"husky": "^4.3.8",
"lint-staged": "^10.5.3",

View File

@ -25,10 +25,10 @@ import Markdown from '~/components/Markdown.vue';
})
export default class VueProjectPage extends Vue {
editingPage: boolean = false;
page: ProjectPage = {
contents: null,
page = {
contents: '',
deletable: false,
};
} as ProjectPage;
@Prop({ type: Object as PropType<HangarProject>, required: true })
project!: HangarProject;
@ -43,6 +43,10 @@ export default class VueProjectPage extends Vue {
return this.$util.hasPerms(NamedPermission.EDIT_PAGE);
}
$refs!: {
editor: MarkdownEditor;
};
savePage(content: string) {
this.$api
.requestInternal(`pages/save/${this.project.id}/${this.page.id}`, true, 'post', {

View File

@ -31,8 +31,7 @@
"@nuxtjs/vuetify",
"nuxt-i18n",
"cookie-universal-nuxt",
"lodash-es",
"../types"
"lodash-es"
],
},
"exclude": [

View File

@ -4181,13 +4181,6 @@ eslint-plugin-nuxt@^2.0.0:
semver "^7.3.2"
vue-eslint-parser "^7.1.1"
eslint-plugin-prettier@^3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7"
integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ==
dependencies:
prettier-linter-helpers "^1.0.0"
eslint-plugin-promise@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a"
@ -4587,11 +4580,6 @@ fast-deep-equal@^3.1.1:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
fast-diff@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
fast-glob@^3.1.1:
version "3.2.5"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661"
@ -8035,13 +8023,6 @@ prepend-http@^1.0.0:
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=
prettier-linter-helpers@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
dependencies:
fast-diff "^1.1.2"
prettier@^1.18.2:
version "1.19.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"