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

Commit

Permalink
fix: use filename instead of full path
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo committed Feb 21, 2019
1 parent bc113bb commit d22e011
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/rules/no-cjs-in-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/
'use strict'

const path = require('path')

// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
Expand Down Expand Up @@ -32,7 +34,7 @@ module.exports = {

return {
Program (node) {
const filename = context.getFilename()
const filename = path.basename(context.getFilename())
if (filename === configFile) {
isNuxtConfig = true
}
Expand Down

0 comments on commit d22e011

Please sign in to comment.