Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/storyn26383/nuxt-puglint-module
PugLint module for Nuxt.js
https://github.com/storyn26383/nuxt-puglint-module
lint nuxt pug vue
Last synced: 19 days ago
JSON representation
PugLint module for Nuxt.js
- Host: GitHub
- URL: https://github.com/storyn26383/nuxt-puglint-module
- Owner: storyn26383
- Created: 2019-12-17T05:39:24.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-25T16:56:54.000Z (over 4 years ago)
- Last Synced: 2024-10-19T02:14:49.491Z (2 months ago)
- Topics: lint, nuxt, pug, vue
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nuxt-puglint-module
> PugLint module for Nuxt.js
## Setup
1. Add `nuxt-puglint-module` dependency to your project
```bash
yarn add --dev nuxt-puglint-module # or npm install --save-dev nuxt-puglint-module
```2. Add `nuxt-puglint-module` to the `buildModules` section of `nuxt.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`.
```js
export default {
buildModules: [
'nuxt-puglint-module'
]
}
```## Configuration
Add `.puglintrc.js` file to your project root
```js
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 ' }
}
```