Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #103 from selemondev/fix-eslint-error
Browse files Browse the repository at this point in the history
fix(app): eslint errors
  • Loading branch information
selemondev authored Aug 18, 2023
2 parents 6024b42 + c8ff899 commit e9db9fa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"react/display-name": "off",
"react-hooks/rules-of-hooks": "off",
"no-sequences": "off",
"@typescript-eslint/no-require-imports": "off",
"no-alert": "off",
"no-console": [
"error",
Expand Down
16 changes: 5 additions & 11 deletions .github/scripts/update-readme-table.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
/* eslint-disable n/prefer-global/process */
const fs = require('node:fs')
const path = require('node:path')
Expand All @@ -21,24 +22,17 @@ fs.readFile(packageJsonPath, 'utf8', (err, packageJsonData) => {
console.error(readmeErr)
process.exit(1)
}
const existingTableRegex = /\| nuxt-ui\s+\| nuxt-ui-vue\s+\|\s+\|[^]*?\|/m
const updatedTableRow = `| nuxt-ui | nuxt-ui-vue |\n|------------------|------------------|\n| v2.7.0 | v${newNuxtUIVueVersion.padEnd(16)} |`.trim() // <-- Remove trailing whitespace

// Regular expression to match the table row with nuxt-ui-vue version
const regex = /\| nuxt-ui\s+\| nuxt-ui-vue\s+\|\s+\| [^|]*\s+\| [^|]*\s+\|/
const updatedData = data.replace(existingTableRegex, updatedTableRow)

// Create the replacement table row with updated nuxt-ui-vue version
const newTableRow = `| nuxt-ui | nuxt-ui-vue |\n|------------------|------------------|\n| v2.7.0 | v${newNuxtUIVueVersion} |`

// Replace the old table row with the new one
const updatedData = data.replace(regex, newTableRow)

// Write the updated content back to the README file
fs.writeFile(readmePath, updatedData, 'utf8', (writeErr) => {
if (writeErr) {
console.error(writeErr)
console.error('Error writing README:', writeErr)
process.exit(1)
}

// eslint-disable-next-line no-console
console.log('README table updated successfully.')
})
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*.{js,ts,tsx,vue}": [
"*.{ts,tsx,vue}": [
"pnpm lint:fix"
]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-ui-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuxt-ui-vue",
"version": "0.10.7",
"version": "0.0.7",
"private": false,
"exports": {
".": {
Expand Down

0 comments on commit e9db9fa

Please sign in to comment.