From cabd3ea8359f4596c9ec4eb8c512c661eace5c43 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Wed, 27 Jul 2022 13:47:26 +0800 Subject: [PATCH] fix: remove `import/extensions` rule Fixes #23 Seems there's no way to only enforce the rule to exact one extension. --- examples/create-vue-js/src/components/FooComp.jsx | 3 ++- packages/eslint-config-standard/.eslintrc.cjs | 9 --------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/examples/create-vue-js/src/components/FooComp.jsx b/examples/create-vue-js/src/components/FooComp.jsx index 4e0c118..650d93b 100644 --- a/examples/create-vue-js/src/components/FooComp.jsx +++ b/examples/create-vue-js/src/components/FooComp.jsx @@ -1,7 +1,8 @@ import { defineComponent } from 'vue' +import { version } from '../../package.json' export default defineComponent({ setup () { - return () =>
Foo
+ return () =>
Foo {version}
} }) diff --git a/packages/eslint-config-standard/.eslintrc.cjs b/packages/eslint-config-standard/.eslintrc.cjs index 72efea8..770c932 100644 --- a/packages/eslint-config-standard/.eslintrc.cjs +++ b/packages/eslint-config-standard/.eslintrc.cjs @@ -15,14 +15,5 @@ module.exports = { '.js', '.jsx' ] - }, - rules: { - // Cannot omit `.vue` extensions. - // This should be enforced all across the Vue.js ecosystem. - 'import/extensions': [ - 'error', { - vue: 'always' - } - ] } }