{"id":25699,"library":"gulp-lint-filepath","title":"gulp-lint-filepath","description":"A Gulp plugin (v1.0.1) that lints file paths and names in a vinyl stream. It enforces naming conventions, allowed extensions, and directory index presence through customizable rules. Built-in rules include directory-index, directory-name, file-extension, and file-name – all disabled by default. The plugin supports custom rules and custom reporters. Last updated in 2015, it requires Node >=0.10 and has no recent maintenance. Unlike generic linters, it focuses solely on path conventions and integrates with Gulp pipelines.","status":"maintenance","version":"1.0.1","language":"javascript","source_language":"en","source_url":"git://github.com/alistairjcbrown/gulp-lint-filepath","tags":["javascript","gulpplugin","vinyl","file","fs","linter","linting","lint","filepath"],"install":[{"cmd":"npm install gulp-lint-filepath","lang":"bash","label":"npm"},{"cmd":"yarn add gulp-lint-filepath","lang":"bash","label":"yarn"},{"cmd":"pnpm add gulp-lint-filepath","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for plugin error handling and logging","package":"gulp-util","optional":false},{"reason":"Stream transformation for vinyl files","package":"through2","optional":false}],"imports":[{"note":"Default export is the linter function. CJS require works but ESM import is recommended for modern projects.","wrong":"const lintFilepath = require('gulp-lint-filepath')","symbol":"default","correct":"import lintFilepath from 'gulp-lint-filepath'"},{"note":"Named export 'reporter' available since v1.0.0. CJS require also works.","wrong":"const reporter = require('gulp-lint-filepath').reporter","symbol":"reporter","correct":"import { reporter } from 'gulp-lint-filepath'"},{"note":"FilePath class used for custom rules. May not be directly exported; check documentation.","wrong":"const FilePath = require('gulp-lint-filepath').FilePath","symbol":"FilePath","correct":"import { FilePath } from 'gulp-lint-filepath'"},{"note":"TypeScript types not bundled; consider @types/gulp-lint-filepath if available.","symbol":"types","correct":"import type { LintConfig } from 'gulp-lint-filepath'"}],"quickstart":{"code":"const gulp = require('gulp');\nconst lintFilepath = require('gulp-lint-filepath');\n\nconst config = {\n  'file-extension': ['.js', '.json'],\n  'file-name': [/^[a-z0-9.-]+$/],\n  'directory-name': [/^[a-z0-9-]+$/]\n};\n\ngulp.task('lint:paths', function() {\n  return gulp.src(['./**/*.*', '!./node_modules/**'])\n    .pipe(lintFilepath(config))\n    .pipe(lintFilepath.reporter());\n});","lang":"javascript","description":"Shows basic Gulp task setup for linting file paths with rules for extensions, file names, and directory names."},"warnings":[{"fix":"Pass a config object with rule keys and arrays/regexes.","message":"All rules are disabled by default. You must provide configuration to enable any linting.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider alternatives like eslint-plugin-filenames or custom Gulp tasks with glob patterns.","message":"Package is no longer maintained. Last update was in 2015.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure your regex for file-name only matches the name without extension.","message":"The 'file-name' rule does not include the file extension in the check.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Provide directory paths or patterns in the ignore property for directory-index.","message":"The 'directory-index' rule ignores directories with an 'ignore' array, not files.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use default import: import lintFilepath from 'gulp-lint-filepath'","cause":"Default import not used correctly in ESM","error":"TypeError: lintFilepath is not a function"},{"fix":"Make 'file-extension' an array of strings/regex, e.g., ['.js']","cause":"Config provided as object instead of array for rule","error":"Error: Rule 'file-extension' requires an array"},{"fix":"Ensure lintFilepath is required/imported first: const lintFilepath = require('gulp-lint-filepath')","cause":"Reporter accessed before lintFilepath was loaded","error":"TypeError: Cannot read property 'reporter' of undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}