Skip to content

Commit

Permalink
chore(projects): use eslint flat config & update config
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Dec 14, 2023
1 parent 3346bcd commit a176dc4
Show file tree
Hide file tree
Showing 16 changed files with 890 additions and 1,956 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
@@ -0,0 +1,11 @@
# Editor configuration, see http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
@@ -1,2 +1,3 @@
registry=https://registry.npmmirror.com/
shamefully-hoist=true
ignore-workspace-root-check=true
65 changes: 6 additions & 59 deletions .vscode/settings.json
@@ -1,70 +1,17 @@
{
"cSpell.words": [
"apifox",
"clickoutside",
"clsx",
"colord",
"consola",
"Destructurable",
"EDITMSG",
"espree",
"execa",
"gitee",
"gridicons",
"heroicons",
"HEXA",
"hexcode",
"iconify",
"INDEXEDDB",
"jiti",
"kolorist",
"Laba",
"localforage",
"LOCALSTORAGE",
"majesticons",
"MEDZ",
"nocheck",
"nprogress",
"ofetch",
"pickr",
"preflights",
"sider",
"simonwep",
"simplebar",
"tada",
"tauri",
"Uncapitalize",
"unocss",
"unplugin",
"VITE",
"vitepress",
"vueuse",
"WEBSQL",
"wechat"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"editor.fontLigatures": true,
"eslint.experimental.useFlatConfig": true,
"editor.formatOnSave": false,
"editor.quickSuggestions": {
"strings": true
},
"editor.tabSize": 2,
"files.associations": {
"*.env.*": "dotenv",
"*.svg": "html"
},
"files.eol": "\n",
"eslint.validate": ["html", "css", "scss", "json", "jsonc"],
"i18n-ally.displayLanguage": "zh-cn",
"i18n-ally.enabledParsers": ["ts"],
"i18n-ally.enabledFrameworks": ["vue"],
"i18n-ally.editor.preferEditor": true,
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": ["src/locales/lang"],
"unocss.root": ["./"],
"[html][css][less][scss][sass][markdown][yaml][yml][json][jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
"prettier.enable": false,
"unocss.root": ["./"]
}
15 changes: 15 additions & 0 deletions eslint.config.js
@@ -0,0 +1,15 @@
import { defineConfig } from '@soybeanjs/eslint-config';

export default defineConfig(
{ vue: true },
{
rules: {
'vue/multi-word-component-names': [
'warn',
{
ignores: ['index', 'App', '[id]']
}
]
}
}
);
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -46,6 +46,7 @@
"@iconify/json": "2.2.143",
"@sa/scripts": "workspace:*",
"@sa/uno-preset": "workspace:*",
"@soybeanjs/eslint-config": "^1.1.2",
"@types/lodash-es": "4.17.11",
"@types/node": "20.9.1",
"@types/nprogress": "0.2.3",
Expand All @@ -57,7 +58,6 @@
"@vitejs/plugin-vue": "4.5.0",
"@vitejs/plugin-vue-jsx": "3.1.0",
"cross-env": "7.0.3",
"eslint-config-sa": "workspace:*",
"npm-run-all": "4.1.5",
"sass": "1.69.5",
"simple-git-hooks": "2.9.0",
Expand All @@ -72,6 +72,6 @@
},
"simple-git-hooks": {
"commit-msg": "pnpm sa git-commit-verify",
"pre-commit": "pnpm typecheck && pnpm sa lint-staged"
"pre-commit": "pnpm typecheck"
}
}
6 changes: 0 additions & 6 deletions packages/eslint-config/configs/base.js

This file was deleted.

44 changes: 0 additions & 44 deletions packages/eslint-config/configs/js.js

This file was deleted.

11 changes: 0 additions & 11 deletions packages/eslint-config/configs/prettier.js

This file was deleted.

61 changes: 0 additions & 61 deletions packages/eslint-config/configs/ts.js

This file was deleted.

30 changes: 0 additions & 30 deletions packages/eslint-config/configs/vue.js

This file was deleted.

6 changes: 0 additions & 6 deletions packages/eslint-config/index.js

This file was deleted.

23 changes: 0 additions & 23 deletions packages/eslint-config/package.json

This file was deleted.

0 comments on commit a176dc4

Please sign in to comment.