forked from phpjavac/Xun-Z
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(phpjavac#4): :style: eslint同步Daosheng
- Loading branch information
1 parent
9fa09ba
commit 725d5bc
Showing
6 changed files
with
48 additions
and
57 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,49 +1,40 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
}, | ||
extends: [ | ||
'plugin:vue/vue3-essential', | ||
'@vue/airbnb', | ||
'@vue/typescript/recommended', | ||
], | ||
plugins: ['prettier'], | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
}, | ||
rules: { | ||
'brace-style': 'off', | ||
indent: 'off', | ||
'implicit-arrow-linebreak': 'off', | ||
'operator-linebreak': 'off', | ||
'import/prefer-default-export': 'warn', | ||
'no-param-reassign': 'off', | ||
'linebreak-style': 'off', | ||
'max-classes-per-file': 'off', | ||
'@typescript-eslint/no-namespace': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'function-paren-newline': 'off', | ||
"@typescript-eslint/no-non-null-assertion": 'off', | ||
'max-len': 'off', | ||
'no-console': | ||
process.env.NODE_ENV === 'production' | ||
? 'warn' | ||
: 'off', | ||
'no-debugger': | ||
process.env.NODE_ENV === 'production' | ||
? 'warn' | ||
: 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
files: [ | ||
'**/__tests__/*.{j,t}s?(x)', | ||
'**/tests/unit/**/*.spec.{j,t}s?(x)', | ||
], | ||
env: { | ||
jest: true, | ||
}, | ||
root: true, | ||
parser: "vue-eslint-parser", | ||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
ecmaVersion: 2017, | ||
sourceType: "module", | ||
}, | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: ["airbnb-base", "prettier", "plugin:vue/vue3-recommended"], | ||
rules: { | ||
"no-param-reassign": ["error", { props: false }], | ||
"import/extensions": "off", | ||
"prettier/prettier": "warn", | ||
"no-unused-vars": "warn", | ||
quotes: [1, "double"], | ||
"no-console": "off", | ||
"vue/html-self-closing": "off", | ||
"vue/singleline-html-element-content-newline": "off", | ||
// "import/no-extraneous-dependencies": "off", // package 引入包 | ||
}, | ||
// required to lint *.vue files | ||
plugins: ["vue", "prettier"], | ||
settings: { | ||
"import/resolver": { | ||
node: { | ||
extensions: [".js", ".jsx", ".ts", ".tsx", ".vue"], | ||
}, | ||
}, | ||
}, | ||
globals: { | ||
defineProps: "readonly", | ||
defineEmits: "readonly", | ||
defineExpose: "readonly", | ||
withDefaults: "readonly", | ||
}, | ||
], | ||
}; |
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
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
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,5 +1,5 @@ | ||
module.exports = { | ||
trailingComma: "all", | ||
tabWidth: 4, | ||
semi: true | ||
} | ||
tabWidth: 2, | ||
semi: 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 |
---|---|---|
@@ -1,10 +1,9 @@ | ||
<script setup lang="ts"> | ||
import HelloWorld from './components/HelloWorld.vue' | ||
import HelloWorld from "./components/HelloWorld.vue"; | ||
</script> | ||
|
||
<template> | ||
<HelloWorld msg="Hello Vue 3 + TypeScript + Vite" /> | ||
<HelloWorld msg="Hello Vue 3 + TypeScript + Vite" /> | ||
</template> | ||
|
||
<style> | ||
</style> | ||
<style></style> |
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,4 +1,4 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import { createApp } from "vue"; | ||
import App from "./App.vue"; | ||
|
||
createApp(App).mount('#app') | ||
createApp(App).mount("#app"); |