0.0.2 • Published 5 years ago
nuxt-puglint-module v0.0.2
nuxt-puglint-module
PugLint module for Nuxt.js
Setup
- Add
nuxt-puglint-moduledependency to your project
yarn add --dev nuxt-puglint-module # or npm install --save-dev nuxt-puglint-module- Add
nuxt-puglint-moduleto thebuildModulessection ofnuxt.config.js
:warning: If you are using Nuxt older than v2.9 you have to install module as a dependency (No --dev or --save-dev flags) and also use modules section in nuxt.config.js instead of buildModules.
export default {
buildModules: [
'nuxt-puglint-module'
]
}Configuration
Add .puglintrc.js file to your project root
module.exports = {
disallowClassAttributeWithStaticValue: true,
disallowClassLiteralsBeforeIdLiterals: true,
disallowDuplicateAttributes: true,
disallowHtmlText: true,
disallowIdAttributeWithStaticValue: true,
disallowMultipleLineBreaks: true,
disallowSpacesInsideAttributeBrackets: true,
requireClassLiteralsBeforeAttributes: true,
requireIdLiteralsBeforeAttributes: true,
requireLowerCaseAttributes: true,
requireLowerCaseTags: true,
requireSpaceAfterCodeOperator: true,
requireStrictEqualityOperators: true,
validateDivTags: true,
validateIndentation: 2,
validateAttributeQuoteMarks: '"',
validateAttributeSeparator: { separator: ', ', multiLineSeparator: ',\n ' }
}