Skip to content

Commit

Permalink
chore: migrate eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Yizack committed Jun 19, 2024
1 parent 927e00e commit 2d5c560
Show file tree
Hide file tree
Showing 18 changed files with 7,396 additions and 6,065 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

8 changes: 0 additions & 8 deletions .eslintrc

This file was deleted.

28 changes: 28 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// @ts-check
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'

// Run `npx @eslint/config-inspector` to inspect the resolved config interactively
export default createConfigForNuxt({
features: {
// Rules for module authors
tooling: true,
// Rules for formatting
stylistic: true,
},
dirs: {
src: [
'./playground',
],
},
})
.append(
{
rules: {
'vue/multi-word-component-names': 'off',
'vue/max-attributes-per-line': 'off',
'vue/singleline-html-element-content-newline': 'off',
'unicorn/escape-case': 'off',
'no-misleading-character-class': 'off',
},
},
)
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,29 @@
"dev:build": "nuxi build playground",
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
"lint": "eslint .",
"lint": "eslint --fix",
"test": "vitest run --reporter=verbose",
"test:watch": "vitest watch",
"emojis": "node ./scripts/generateEmojis.js"
},
"dependencies": {
"@nuxt/kit": "^3.11.1",
"@nuxt/kit": "^3.12.2",
"@twemoji/api": "^15.1.0"
},
"devDependencies": {
"@nuxt/devtools": "^1.1.5",
"@nuxt/eslint-config": "^0.2.0",
"@nuxt/module-builder": "^0.5.5",
"@nuxt/schema": "^3.11.1",
"@nuxt/test-utils": "^3.12.0",
"@types/node": "^20.12.2",
"@nuxt/devtools": "^1.3.3",
"@nuxt/eslint-config": "^0.3.13",
"@nuxt/module-builder": "^0.8.0",
"@nuxt/schema": "^3.12.2",
"@nuxt/test-utils": "^3.13.1",
"@types/node": "^20.14.6",
"changelogen": "^0.5.5",
"eslint": "^8.57.0",
"nuxt": "^3.11.1",
"vitest": "^1.4.0"
"eslint": "^9.5.0",
"nuxt": "^3.12.2",
"vitest": "^1.6.0",
"vue-tsc": "^2.0.21"
},
"packageManager": "pnpm@9.3.0",
"packageManager": "pnpm@9.4.0",
"changelog": {
"repo": {
"repo": "Yizack/nuxt-twemoji",
Expand Down
50 changes: 26 additions & 24 deletions playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
twBoy,
twGirl,
twStar,
twPoliceCarLight
twPoliceCarLight,
} from './../src/runtime/assets/emojis'
</script>

Expand All @@ -17,7 +17,9 @@ import {
<table v-for="(demo, key) in twemojiDemos" :key="key">
<thead>
<tr>
<th style="width: 200px">{{ demo.name }}</th>
<th style="width: 200px">
{{ demo.name }}
</th>
<th>Twemoji (SVG)</th>
<th>Twemoji (PNG)</th>
</tr>
Expand Down Expand Up @@ -76,54 +78,54 @@ export default {
return {
twemojiDemos: [
{
name: "Emoji",
name: 'Emoji',
emojis: ['💙', '😍', '👍', '😂', '💀', '🚀', '😵‍💫', '🌟', '👨‍✈️'],
},
{
name: "Code Point",
name: 'Code Point',
emojis: [
'2764',
'1f618',
'U+231B',
'U+231B',
'u+1f60e',
'1F44D-1F3FF',
'1F9D1-200D-1F4BB',
'1F9D1-1F3FB-200D-1F393',
'1F408-200D-2B1B'
]
'1F408-200D-2B1B',
],
},
{
name: "EmojiDefinition",
name: 'EmojiDefinition',
emojis: [
twOrangeHeart,
twFuelPump,
twFaceWithRollingEyes,
twBoy,
twGirl,
twStar,
twPoliceCarLight
]
twPoliceCarLight,
],
},
{
name: "Not Rendered",
name: 'Not Rendered',
emojis: [
'1234',
{ code: '1F46E', emoji: '👮' }
]
}
{ code: '1F46E', emoji: '👮' },
],
},
],
twemojifyDemos: [
"I ❤️ Nuxt 🚀",
"Excited to start my Nuxt 🌟 project today! 💫",
"Debugging 🔧 my Nuxt 🔍 app like a pro! 💻",
"🌟 Cherishing every moment and making 📸 memories that last a lifetime! ❤️",
"🌺 Finding joy in the simple things and appreciating the present 🌼 moment! 😊",
"Exploring new places and embracing different cultures enriches my 🌱 life. ✈️",
"Making a positive impact in the world 🌍 and leaving a legacy of 🌟 goodness. 🌟🤝",
"Exploring the Nuxt community 👥 has been a source of inspiration and knowledge! 🌟"
]
'I ❤️ Nuxt 🚀',
'Excited to start my Nuxt 🌟 project today! 💫',
'Debugging 🔧 my Nuxt 🔍 app like a pro! 💻',
'🌟 Cherishing every moment and making 📸 memories that last a lifetime! ❤️',
'🌺 Finding joy in the simple things and appreciating the present 🌼 moment! 😊',
'Exploring new places and embracing different cultures enriches my 🌱 life. ✈️',
'Making a positive impact in the world 🌍 and leaving a legacy of 🌟 goodness. 🌟🤝',
'Exploring the Nuxt community 👥 has been a source of inspiration and knowledge! 🌟',
],
}
}
},
}
</script>

Expand Down
2 changes: 1 addition & 1 deletion playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default defineNuxtConfig({
modules: ['../src/module'],
nuxtTwemoji: {},
devtools: { enabled: true }
devtools: { enabled: true },
})
Loading

0 comments on commit 2d5c560

Please sign in to comment.