@@ -7,6 +7,8 @@ import reactHooks from "eslint-plugin-react-hooks"
77import storybook from "eslint-plugin-storybook"
88import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss"
99import tsdoc from "eslint-plugin-tsdoc"
10+ import pluginVue from "eslint-plugin-vue"
11+ import vueParser from "vue-eslint-parser"
1012import globals from "globals"
1113import tseslint from "typescript-eslint"
1214import path from "node:path"
@@ -28,6 +30,8 @@ const config = tseslint.config([
2830 "**/examples/nextjs-pages-router/next-env.d.ts" ,
2931 "**/examples/nextjs-app-router-custom-components/.next/**" ,
3032 "**/examples/nextjs-app-router-custom-components/next-env.d.ts" ,
33+ "**/examples/nuxt-app/.nuxt/**" ,
34+ "**/examples/nuxt-app/.output/**" ,
3135 ] ,
3236 } ,
3337 eslint . configs . recommended ,
@@ -152,6 +156,100 @@ const config = tseslint.config([
152156 } ,
153157 } ,
154158 } ,
159+ {
160+ name : "elements-vue" ,
161+ files : [ "packages/elements-vue/**/*.vue" ] ,
162+ languageOptions : {
163+ parser : vueParser ,
164+ globals : {
165+ ...globals . browser ,
166+ } ,
167+ parserOptions : {
168+ parser : tsParser ,
169+ ecmaVersion : 2021 ,
170+ sourceType : "module" ,
171+ extraFileExtensions : [ ".vue" ] ,
172+ } ,
173+ } ,
174+ plugins : {
175+ vue : pluginVue ,
176+ "better-tailwindcss" : eslintPluginBetterTailwindcss ,
177+ } ,
178+ rules : {
179+ ...pluginVue . configs [ "flat/recommended" ] . rules ,
180+ // Disable rules that conflict with Prettier
181+ "vue/html-self-closing" : "off" ,
182+ "vue/max-attributes-per-line" : "off" ,
183+ "vue/singleline-html-element-content-newline" : "off" ,
184+ "vue/multiline-html-element-content-newline" : "off" ,
185+ "vue/html-indent" : "off" ,
186+ "vue/html-closing-bracket-newline" : "off" ,
187+ // Enable tailwindcss rules
188+ ...eslintPluginBetterTailwindcss . configs [ "recommended-error" ] . rules ,
189+ "better-tailwindcss/enforce-consistent-line-wrapping" : "off" ,
190+ "better-tailwindcss/no-unregistered-classes" : [
191+ "error" ,
192+ { ignore : [ "ory-elements" ] } ,
193+ ] ,
194+ } ,
195+ settings : {
196+ "better-tailwindcss" : {
197+ entryPoint : "packages/elements-vue/src/theme/default/styles.css" ,
198+ } ,
199+ } ,
200+ } ,
201+ {
202+ name : "elements-vue-ts" ,
203+ files : [ "packages/elements-vue/**/*.ts" ] ,
204+ ignores : [ "packages/elements-vue/**/*.vue" ] ,
205+ languageOptions : {
206+ parser : tsParser ,
207+ parserOptions : {
208+ ecmaVersion : 2021 ,
209+ sourceType : "module" ,
210+ } ,
211+ } ,
212+ } ,
213+ {
214+ name : "nuxt" ,
215+ files : [ "packages/nuxt/**/*.ts" ] ,
216+ languageOptions : {
217+ parser : tsParser ,
218+ parserOptions : {
219+ ecmaVersion : 2021 ,
220+ sourceType : "module" ,
221+ } ,
222+ } ,
223+ } ,
224+ {
225+ name : "nuxt-app" ,
226+ files : [ "examples/nuxt-app/**/*.vue" ] ,
227+ languageOptions : {
228+ parser : vueParser ,
229+ globals : {
230+ ...globals . browser ,
231+ } ,
232+ parserOptions : {
233+ parser : tsParser ,
234+ ecmaVersion : 2021 ,
235+ sourceType : "module" ,
236+ extraFileExtensions : [ ".vue" ] ,
237+ } ,
238+ } ,
239+ plugins : {
240+ vue : pluginVue ,
241+ } ,
242+ rules : {
243+ ...pluginVue . configs [ "flat/recommended" ] . rules ,
244+ // Disable rules that conflict with Prettier
245+ "vue/html-self-closing" : "off" ,
246+ "vue/max-attributes-per-line" : "off" ,
247+ "vue/singleline-html-element-content-newline" : "off" ,
248+ "vue/multiline-html-element-content-newline" : "off" ,
249+ "vue/html-indent" : "off" ,
250+ "vue/html-closing-bracket-newline" : "off" ,
251+ } ,
252+ } ,
155253 {
156254 name : "tests" ,
157255 files : [ "**/*.test.ts" , "**/*.test.tsx" , "**/*.spec.ts" , "**/*.spec.tsx" ] ,
0 commit comments