More ESLint updates
This commit is contained in:
parent
dd1af43d19
commit
082ed7d11a
177
.eslintrc.cjs
177
.eslintrc.cjs
@ -3,30 +3,187 @@ require('@rushstack/eslint-patch/modern-module-resolution');
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
'extends': [
|
extends: [
|
||||||
'plugin:vue/vue3-essential',
|
'plugin:vue/vue3-essential',
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'@vue/eslint-config-typescript',
|
'@vue/eslint-config-typescript'
|
||||||
],
|
],
|
||||||
|
plugins: [ '@stylistic' ],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 'latest',
|
ecmaVersion: 'latest'
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
'semi': 'off',
|
'keyword-spacing': 'error',
|
||||||
'@typescript-eslint/semi': 'error',
|
|
||||||
|
|
||||||
'indent': 'off',
|
'@stylistic/array-bracket-newline': [
|
||||||
'@typescript-eslint/indent': [
|
'error',
|
||||||
|
{
|
||||||
|
minItems: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/array-bracket-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/array-element-newline': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
minItems: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/arrow-parens': [
|
||||||
|
'error',
|
||||||
|
'as-needed'
|
||||||
|
],
|
||||||
|
'@stylistic/arrow-spacing': 'error',
|
||||||
|
'@stylistic/brace-style': [
|
||||||
|
'error',
|
||||||
|
'stroustrup'
|
||||||
|
],
|
||||||
|
'@stylistic/comma-dangle': [
|
||||||
|
'error',
|
||||||
|
'never'
|
||||||
|
],
|
||||||
|
'@stylistic/comma-style': [
|
||||||
|
'error',
|
||||||
|
'last'
|
||||||
|
],
|
||||||
|
'@stylistic/dot-location': [
|
||||||
|
'error',
|
||||||
|
'property'
|
||||||
|
],
|
||||||
|
'@stylistic/eol-last': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/function-call-argument-newline': [
|
||||||
|
'error',
|
||||||
|
'consistent'
|
||||||
|
],
|
||||||
|
'@stylistic/function-paren-newline': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
minItems: 5
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/indent': [
|
||||||
'error',
|
'error',
|
||||||
'tab'
|
'tab'
|
||||||
],
|
],
|
||||||
|
'@stylistic/linebreak-style': [
|
||||||
'quotes': 'off',
|
'error',
|
||||||
'@typescript-eslint/quotes': [
|
'unix'
|
||||||
|
],
|
||||||
|
'@stylistic/lines-around-comment': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
beforeBlockComment: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/lines-between-class-members': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/no-extra-semi': 'error',
|
||||||
|
'@stylistic/no-floating-decimal': 'error',
|
||||||
|
'@stylistic/no-mixed-operators': 'error',
|
||||||
|
'@stylistic/no-mixed-spaces-and-tabs': 'error',
|
||||||
|
'@stylistic/no-multi-spaces': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
exceptions: {
|
||||||
|
VariableDeclarator: true,
|
||||||
|
ImportDeclaration: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/no-multiple-empty-lines': 'error',
|
||||||
|
'@stylistic/no-trailing-spaces': 'error',
|
||||||
|
'@stylistic/no-whitespace-before-property': 'error',
|
||||||
|
'@stylistic/nonblock-statement-body-position': [
|
||||||
|
'error',
|
||||||
|
'below'
|
||||||
|
],
|
||||||
|
'@stylistic/object-curly-newline': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/object-curly-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/object-property-newline': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
allowAllPropertiesOnSameLine: false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/operator-linebreak': [
|
||||||
|
'error',
|
||||||
|
'before'
|
||||||
|
],
|
||||||
|
'@stylistic/padded-blocks': [
|
||||||
|
'error',
|
||||||
|
'never'
|
||||||
|
],
|
||||||
|
'@stylistic/padding-line-between-statements': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
blankLine: 'always',
|
||||||
|
prev: '*',
|
||||||
|
next: 'return'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'@stylistic/quote-props': [
|
||||||
|
'error',
|
||||||
|
'as-needed'
|
||||||
|
],
|
||||||
|
'@stylistic/quotes': [
|
||||||
'error',
|
'error',
|
||||||
'single'
|
'single'
|
||||||
],
|
],
|
||||||
|
'@stylistic/rest-spread-spacing': [
|
||||||
|
'error',
|
||||||
|
'never'
|
||||||
|
],
|
||||||
|
'@stylistic/semi': 'error',
|
||||||
|
'@stylistic/semi-spacing': 'error',
|
||||||
|
'@stylistic/semi-style': [
|
||||||
|
'error',
|
||||||
|
'last'
|
||||||
|
],
|
||||||
|
'@stylistic/space-before-blocks': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/space-before-function-paren': [
|
||||||
|
'error',
|
||||||
|
'never'
|
||||||
|
],
|
||||||
|
'@stylistic/space-in-parens': [
|
||||||
|
'error',
|
||||||
|
'never'
|
||||||
|
],
|
||||||
|
'@stylistic/space-infix-ops': 'error',
|
||||||
|
'@stylistic/spaced-comment': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/switch-colon-spacing': 'error',
|
||||||
|
'@stylistic/template-curly-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/template-tag-spacing': [
|
||||||
|
'error',
|
||||||
|
'always'
|
||||||
|
],
|
||||||
|
'@stylistic/wrap-regex': 'error',
|
||||||
|
|
||||||
'vue/comment-directive': 'off',
|
'vue/comment-directive': 'off',
|
||||||
|
'vue/html-indent': [
|
||||||
|
'error',
|
||||||
|
2
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rushstack/eslint-patch": "^1.3.3",
|
"@rushstack/eslint-patch": "^1.3.3",
|
||||||
|
"@stylistic/eslint-plugin": "^1.1.0",
|
||||||
"@tsconfig/node18": "^18.2.2",
|
"@tsconfig/node18": "^18.2.2",
|
||||||
"@types/jsdom": "^21.1.3",
|
"@types/jsdom": "^21.1.3",
|
||||||
"@types/node": "^18.18.5",
|
"@types/node": "^18.18.5",
|
||||||
|
48
pnpm-lock.yaml
generated
48
pnpm-lock.yaml
generated
@ -25,6 +25,9 @@ devDependencies:
|
|||||||
'@rushstack/eslint-patch':
|
'@rushstack/eslint-patch':
|
||||||
specifier: ^1.3.3
|
specifier: ^1.3.3
|
||||||
version: 1.5.1
|
version: 1.5.1
|
||||||
|
'@stylistic/eslint-plugin':
|
||||||
|
specifier: ^1.1.0
|
||||||
|
version: 1.1.0(eslint@8.53.0)(typescript@5.2.2)
|
||||||
'@tsconfig/node18':
|
'@tsconfig/node18':
|
||||||
specifier: ^18.2.2
|
specifier: ^18.2.2
|
||||||
version: 18.2.2
|
version: 18.2.2
|
||||||
@ -723,6 +726,51 @@ packages:
|
|||||||
resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
|
resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@stylistic/eslint-plugin-js@1.1.0:
|
||||||
|
resolution: {integrity: sha512-7yDOvKQvtTXIJMVcKNGfpYSJJhwTbOrDcMDgYqWbtS9LyHmuzxvnR748bQ21pQyi6aZR2E7edwKsdKmZlXc9Rg==}
|
||||||
|
dependencies:
|
||||||
|
acorn: 8.11.2
|
||||||
|
escape-string-regexp: 4.0.0
|
||||||
|
eslint-visitor-keys: 3.4.3
|
||||||
|
espree: 9.6.1
|
||||||
|
graphemer: 1.4.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@stylistic/eslint-plugin-jsx@1.1.0:
|
||||||
|
resolution: {integrity: sha512-XMTAYQ9t7ZoWjqciqOy99O0sRCHh/6x/Q4Dm8sCVKzKlsnPzVlXzAD0htNqHG+Fu7qyGblDqb0/7PNJXBdQc5Q==}
|
||||||
|
dependencies:
|
||||||
|
'@stylistic/eslint-plugin-js': 1.1.0
|
||||||
|
estraverse: 5.3.0
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@stylistic/eslint-plugin-ts@1.1.0(eslint@8.53.0)(typescript@5.2.2):
|
||||||
|
resolution: {integrity: sha512-vqlinwzTNSKoFaVcVKE2iVGKX62NKIJfkhEI+5uuufYcAhfjfOK3KQY0zhdUeshEUkBVR0uRrJzH1/Cj/2Unfg==}
|
||||||
|
peerDependencies:
|
||||||
|
eslint: '*'
|
||||||
|
dependencies:
|
||||||
|
'@stylistic/eslint-plugin-js': 1.1.0
|
||||||
|
'@typescript-eslint/utils': 6.10.0(eslint@8.53.0)(typescript@5.2.2)
|
||||||
|
eslint: 8.53.0
|
||||||
|
graphemer: 1.4.0
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
- typescript
|
||||||
|
dev: true
|
||||||
|
|
||||||
|
/@stylistic/eslint-plugin@1.1.0(eslint@8.53.0)(typescript@5.2.2):
|
||||||
|
resolution: {integrity: sha512-PcJgMTNiIZ1d+aQt7OM50hRkeOIB7FyfRofNEe1PykG7NvSjjwQ7fS2XN+eN/SmoPN4ocZkacZHOv5cDNrFEqQ==}
|
||||||
|
peerDependencies:
|
||||||
|
eslint: '*'
|
||||||
|
dependencies:
|
||||||
|
'@stylistic/eslint-plugin-js': 1.1.0
|
||||||
|
'@stylistic/eslint-plugin-jsx': 1.1.0
|
||||||
|
'@stylistic/eslint-plugin-ts': 1.1.0(eslint@8.53.0)(typescript@5.2.2)
|
||||||
|
eslint: 8.53.0
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
- typescript
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@tootallnate/once@2.0.0:
|
/@tootallnate/once@2.0.0:
|
||||||
resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==}
|
resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==}
|
||||||
engines: {node: '>= 10'}
|
engines: {node: '>= 10'}
|
||||||
|
22
src/App.vue
22
src/App.vue
@ -1,6 +1,26 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { RouterLink, RouterView } from 'vue-router'
|
import {
|
||||||
|
RouterLink, RouterView
|
||||||
|
} from 'vue-router';
|
||||||
// import HelloWorld from './components/HelloWorld.vue'
|
// import HelloWorld from './components/HelloWorld.vue'
|
||||||
|
|
||||||
|
function test(): string {
|
||||||
|
const asdf = {
|
||||||
|
hello: 4,
|
||||||
|
hallo: 5,
|
||||||
|
'test-4': 'hallo'
|
||||||
|
};
|
||||||
|
if (true) {
|
||||||
|
asdf.hello = 4;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
asdf.hallo = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(asdf);
|
||||||
|
|
||||||
|
return asdf['test-4'];
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
Loading…
Reference in New Issue
Block a user