Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 4c62a37

Browse files
committed
fix: use filename instead of full path
1 parent 6a86cb2 commit 4c62a37

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/rules/no-cjs-in-config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
*/
55
'use strict'
66

7+
const path = require('path')
8+
79
// ------------------------------------------------------------------------------
810
// Rule Definition
911
// ------------------------------------------------------------------------------
@@ -32,7 +34,7 @@ module.exports = {
3234

3335
return {
3436
Program (node) {
35-
const filename = context.getFilename()
37+
const filename = path.basename(context.getFilename())
3638
if (filename === configFile) {
3739
isNuxtConfig = true
3840
}

0 commit comments

Comments
 (0)