{"id":18055823,"url":"https://github.com/tschortsch/gulp-bootlint","last_synced_at":"2025-04-11T02:05:54.666Z","repository":{"id":23565190,"uuid":"26932855","full_name":"tschortsch/gulp-bootlint","owner":"tschortsch","description":"A gulp wrapper for Bootlint, the HTML linter for Bootstrap projects.","archived":false,"fork":false,"pushed_at":"2021-08-13T01:26:16.000Z","size":241,"stargazers_count":42,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T21:33:37.912Z","etag":null,"topics":["bootlint","bootstrap","gulp","html-linter"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tschortsch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-11-20T21:31:54.000Z","updated_at":"2024-10-05T16:19:45.000Z","dependencies_parsed_at":"2022-07-10T09:30:54.857Z","dependency_job_id":null,"html_url":"https://github.com/tschortsch/gulp-bootlint","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschortsch%2Fgulp-bootlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschortsch%2Fgulp-bootlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschortsch%2Fgulp-bootlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschortsch%2Fgulp-bootlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tschortsch","download_url":"https://codeload.github.com/tschortsch/gulp-bootlint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243471,"owners_count":21071054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootlint","bootstrap","gulp","html-linter"],"created_at":"2024-10-31T01:12:02.612Z","updated_at":"2025-04-11T02:05:54.632Z","avatar_url":"https://github.com/tschortsch.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-bootlint\n\n[![npm version](https://badge.fury.io/js/gulp-bootlint.svg)](https://badge.fury.io/js/gulp-bootlint)\n[![Build Status](https://github.com/tschortsch/gulp-bootlint/workflows/Lint%20Test%20Deploy/badge.svg?branch=master)](https://github.com/tschortsch/gulp-bootlint/actions?query=workflow%3A%22Lint+Test+Deploy%22+branch%3Amaster)\n\nA gulp wrapper for [Bootlint](https://github.com/twbs/bootlint), the HTML linter for Bootstrap projects.\n\n## Requirements\n\n* Node.js \u003e= 10.x\n\n## First steps\n\nIf you are familiar with [gulp](https://gulpjs.com/) just install the plugin from [npm](https://npmjs.org/package/gulp-bootlint) with the following command:\n\n```\nnpm install gulp-bootlint --save-dev\n```\n\nOtherwise check out the [Getting Started](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md#getting-started) guide of gulp first.\n\n## Create a new gulp task\n\nAfter installing the plugin you can create a new gulp task in your `gulpfile.js` like this:\n\n```javascript\nvar gulp = require('gulp');\nvar bootlint = require('gulp-bootlint');\n\ngulp.task('bootlint', function() {\n  return gulp.src('./index.html')\n    .pipe(bootlint());\n});\n```\n\n## Options\n\nYou can pass the following options as a single object when calling the bootlint plugin.\n\n### options.stoponerror\n\n* Type: `Boolean`\n* Default: `false`\n\nStops the gulp task if there are errors in the linted file.\n\n### options.stoponwarning\n\n* Type: `Boolean`\n* Default: `false`\n\nStops the gulp task if there are warnings in the linted file.\n\n### options.disabledIds\n\n* Type: `String[]`\n* Default: `[]`\n\nArray of [bootlint problem ID codes](https://github.com/twbs/bootlint/wiki) (as `Strings`) to explicitly ignore.\n\n### options.issues\n\n* Type: `Array` of `LintWarning` and `LintError` objects\n* Default: `[]`\n\nAll found issues (Objects of type `LintWarning` and `LintError`) are stored in this array.\nYou can access and use them after executing this module.\n\nThe classes `LintWarning` and `LintError` are described here https://github.com/twbs/bootlint#api-documentation.\n\n### options.reportFn\n\n* Type: `Function`\n* Parameter:\n  * `Object` **file** - File with linting error.\n  * `Object` **lint** - Linting error.\n  * `Boolean` **isError** - True if current linting problem is an error.\n  * `Boolean` **isWarning** - True if current linting problem is a warning.\n  * `Object` **errorLocation** - Error location in file.\n\nA function that will log out the lint errors to the console. Only use this if you want to customize how the lint errors are reported.\nIf desired, this can be turned off entirely by setting `reportFn: false`.\n\n### options.summaryReportFn\n\n* Type: `Function`\n* Parameter:\n  * `Object` **file** - File which was linted.\n  * `Integer` **errorCount** - Total count of errors in the file.\n  * `Integer` **warningCount** - Total count of warnings in the file.\n\nA function that will log out the final lint error/warning summary to the console. Only use this if you want to customize how this is reported.\nIf desired, this can be turned off entirely by setting `summaryReportFn: false`.\n\n### Example of options usage:\n\n```javascript\nvar gulp = require('gulp');\nvar bootlint = require('gulp-bootlint');\n\ngulp.task('bootlint', function () {\n  var fileIssues = [];\n  return gulp.src('./index.html')\n    .pipe(bootlint({\n      stoponerror: true,\n      stoponwarning: true,\n      disabledIds: ['W009', 'E007'],\n      issues: fileIssues,\n      reportFn: function (file, lint, isError, isWarning, errorLocation) {\n        var message = (isError) ? 'ERROR! - ' : 'WARN! - ';\n        if (errorLocation) {\n          message += file.path + ' (line:' + (errorLocation.line + 1) + ', col:' + (errorLocation.column + 1) + ') [' + lint.id + '] ' + lint.message;\n        } else {\n          message += file.path + ': ' + lint.id + ' ' + lint.message;\n        }\n        console.log(message);\n      },\n      summaryReportFn: function(file, errorCount, warningCount) {\n        if (errorCount \u003e 0 || warningCount \u003e 0) {\n          console.log('please fix the ' + errorCount + ' errors and ' + warningCount + ' warnings in ' + file.path);\n        } else {\n          console.log('No problems found in ' + file.path);\n        }\n      },\n    }));\n});\n```\n\n## Log level\n\nTo set the log level please use the `LOG_LEVEL` environment variable before starting your gulp task:\n\n```\n$ LOG_LEVEL=error npm run gulp\n```\n\nAvailable log levels are listed here: https://github.com/medikoo/log#available-log-levels\n\n## Changelog\n\n* 2021-05-10 - v1.1.1\n  * **Dropped support for Node.js versions \u003c 10**\n  * Updated `merge` package to v2.1.1\n  * Updated `through2` package to v4.0.2\n  * Bumped dependency versions:\n    * Updated `eslint` package to v7.26.0\n    * Updated `eslint-config-gulp` package to v5.0.1\n    * Updated `mocha` package to v8.4.0\n    * Updated `vinyl` package to v2.2.1\n* 2020-05-07 - v1.1.0\n  * Updated `bootlint` to v1.1.0\n  * Bumped other dependency versions:\n    * Updated `eslint-config-gulp` package to v4.0.0\n    * Updated `mocha` package to v7.1.2\n* 2019-12-12 - v1.0.0\n    * Updated `bootlint` to v1.0.0\n    * Updated `log` package to v6.0.0\n    * Dropped `loglevel` option since it's not supported anymore by the new `log` package.\n      To set the log level please use the `LOG_LEVEL` environment variable before running your gulp task (see: https://github.com/tschortsch/gulp-bootlint#log-level).\n    * Bumped other dependency versions\n* 2019-06-26 - v0.11.0\n    * **Dropped support for Node.js versions \u003c 8**\n    * Updated Bootlint to v0.16.6\n    * Bumped dependency versions\n* 2018-12-15 - v0.10.2: Bumped dependency versions\n* 2018-10-02 - v0.10.1: Updated bootlint to v0.15.1 / Bumped dependency versions\n* 2018-04-24 - v0.9.0: Replaced deprecated gulp-util (thanks to [TheDancingCode](https://github.com/TheDancingCode))\n* 2017-02-01 - v0.8.1: Bumped dependency versions\n* 2016-05-24 - v0.8.0: Possibility to provide array where found issues are stored\n* 2016-04-12 - v0.7.2: Bumped dependency versions\n* 2015-11-25 - v0.7.1: Updated Bootlint to v0.14.2\n* 2015-11-16 - v0.7.0: Updated Bootlint to v0.14.1 / Added options to define reporters (thx @chrismbarr) / Bumped dependency versions\n* 2015-07-28 - v0.6.4: Bumped dependency versions\n* 2015-06-21 - v0.6.0: Added option to define log level\n* 2015-06-18 - v0.5.1: Bumped dependency versions\n* 2015-04-28 - v0.5.0: Added parameters to stop task on error or warning\n* 2015-04-25 - v0.4.0: Updated Bootlint to v0.12.0 / Bumped other dependency versions\n* 2015-02-24 - v0.3.0: Updated Bootlint to v0.11.0 / Bumped other dependency versions\n* 2015-01-26 - v0.2.3: Updated Bootlint to v0.10.0\n* 2015-01-07 - v0.2.2: Updated dependencies\n* 2015-01-01 - v0.2.1: Code cleanup\n* 2015-01-01 - v0.2.0: Updated Bootlint to v0.9.1\n* 2015-01-01 - v0.1.1: Fail on linting errors\n* 2014-11-23 - v0.1.0: First public release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftschortsch%2Fgulp-bootlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftschortsch%2Fgulp-bootlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftschortsch%2Fgulp-bootlint/lists"}