Skip to content

Commit

Permalink
fix require() is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
reiroop committed May 10, 2024
1 parent fc4e5bf commit 33f68d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions eslint-vue-ts-recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
*/

// eslint-disable-next-line @typescript-eslint/no-var-requires, no-undef
const typescriptEslintEslintRecommended = require('./node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended')
import typescriptEslintEslintRecommended, {
overrides as _overrides
} from '@/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended'

// eslint-disable-next-line no-undef
module.exports = {
export default {
...typescriptEslintEslintRecommended,
overrides: typescriptEslintEslintRecommended.overrides.map(override => {
overrides: _overrides.map(override => {
if (override.files.includes('*.ts')) {
return { ...override, files: [...override.files, '*.vue'] }
}
Expand Down

0 comments on commit 33f68d2

Please sign in to comment.