Disallow commonjs module api
require/modules.exports/exports
innuxt.config.js
- ⚙️ This rule is included in
"plugin:nuxt/base"
.
This rule is for preventing using require/modules.exports/exports
in nuxt.config.js
Examples of incorrect code for this rule:
const { name } = require('./package.json')
module.exports = {
mode: 'universal',
name
}
Examples of correct code for this rule:
import { name } from './package.json'
export default {
mode: 'universal',
name
}