1 Star 2 Fork 2

谢灿软件/vueuse官方源码

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
eslint.config.js 2.54 KB
一键复制 编辑 原始数据 按行查看 历史
antfu 提交于 2023-12-05 05:15 . feat: upgrade deps (#3614)
import { fileURLToPath } from 'node:url'
import { resolve } from 'node:path'
import antfu from '@antfu/eslint-config'
const dir = fileURLToPath(new URL('.', import.meta.url))
const restricted = [
'vue',
'@vue/reactivity',
'@vue/runtime-core',
'@vue/runtime-dom',
'@vue/composition-api',
'..',
'../..',
resolve(dir, 'packages/core/index.ts'),
resolve(dir, 'packages/shared/index.ts'),
{
name: 'vue-demi',
importNames: ['onMounted', 'onUnmounted', 'unref', 'toRef'],
},
]
export default antfu(
{
formatters: true,
ignores: [
'patches',
'playgrounds',
'**/types',
'**/cache',
'**/dist',
'**/.temp',
'**/*.svg',
],
},
{
rules: {
'vue/no-deprecated-functional-template': 'off',
'vue/one-component-per-file': 'off',
'vue/no-template-shadow': 'off',
'vue/require-prop-types': 'off',
'spaced-comment': ['error', 'always', { exceptions: ['#__PURE__'] }],
'no-restricted-imports': [
'error',
{
paths: restricted,
},
],
'ts/ban-types': 'off',
'node/no-callback-literal': 'off',
'import/namespace': 'off',
'import/default': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
'node/prefer-global/process': 'off',
'ts/unified-signatures': 'off',
'ts/no-dynamic-delete': 'off',
},
},
{
files: [
'packages/shared/**/*.ts',
],
rules: {
'no-restricted-imports': ['error', {
paths: [
...restricted,
'@vueuse/shared',
],
}],
},
},
{
files: [
'packages/core/**/index.ts',
],
rules: {
'no-restricted-imports': ['error', {
paths: [
...restricted,
'@vueuse/core',
],
}],
},
},
{
files: [
'**/*.md',
'**/*.md/*.[jt]s',
'**/*.md/*.vue',
'**/demo.vue',
'**/demo.client.vue',
'**/*.test.ts',
'scripts/*.ts',
],
rules: {
'no-alert': 'off',
'no-console': 'off',
'no-undef': 'off',
'no-unused-vars': 'off',
'no-restricted-imports': 'off',
'vue/no-unused-vars': 'off',
'vue/no-unused-refs': 'off',
'vue/require-v-for-key': 'off',
'ts/no-unused-vars': 'off',
'ts/no-redeclare': 'off',
'unused-imports/no-unused-vars': 'off',
},
},
{
files: [
'packages/.vitepress/**/*.vue',
'playgrounds/**/*.vue',
],
rules: {
'no-restricted-imports': 'off',
},
},
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiecancc/vueuse.git
git@gitee.com:xiecancc/vueuse.git
xiecancc
vueuse
vueuse官方源码
main

搜索帮助