{"id":25796,"library":"js-project-commons","title":"js-project-commons","description":"Version 1.3.2 (last release 2021-02-08) is a collection of shared Grunt tasks, lint configurations, and markdown templates for personal Node.js and web projects. It centralizes common build processes (e.g., linting, testing, security validations, GitHub release) and uses ES6 syntax since v1.3.0. Unlike standalone tools, this package bundles dependencies internally (since v1.0.34) and provides ready-to-use Grunt tasks for tasks like stylelint, htmlhint, API doc generation, and file name linting. Release cadence has stopped after 2021, and it is now in maintenance mode. The library is opinionated and primarily intended for the author's projects.","status":"maintenance","version":"1.3.2","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/sagiegurari/js-project-commons","tags":["javascript","grunt","build","lint","project","config"],"install":[{"cmd":"npm install js-project-commons","lang":"bash","label":"npm"},{"cmd":"yarn add js-project-commons","lang":"bash","label":"yarn"},{"cmd":"pnpm add js-project-commons","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency for running Grunt tasks provided by the package.","package":"grunt","optional":false}],"imports":[{"note":"The package is CJS-only and does not export a default; use require().","wrong":"import jsProjectCommons from 'js-project-commons'","symbol":"default import","correct":"require('js-project-commons')"},{"note":"Tasks are auto-discovered via loadNpmTasks; no need to specify subpath.","wrong":"grunt.loadNpmTasks('js-project-commons/tasks')","symbol":"Grunt task loading","correct":"grunt.loadNpmTasks('js-project-commons')"},{"note":"Configs are not exported as separate files; they are applied via Grunt tasks.","wrong":"const config = require('js-project-commons/config')","symbol":"Config in Gruntfile","correct":"grunt.initConfig({ eslint: {}, /* overrides */ })"}],"quickstart":{"code":"// Install: npm install --save-dev js-project-commons\n// Gruntfile.js\nmodule.exports = function(grunt) {\n  grunt.loadNpmTasks('js-project-commons');\n  grunt.initConfig({\n    // Override specific task configs here\n    eslint: {\n      options: {\n        configFile: '.eslintrc.js'\n      }\n    }\n  });\n  grunt.registerTask('build', ['eslint', 'mochaTest']);\n};","lang":"javascript","description":"Shows how to load the package in a Gruntfile and override eslint config."},"warnings":[{"fix":"Upgrade Node.js to version 6 or higher.","message":"ES6 syntax introduced in v1.3.0 may break projects using Node <6.","severity":"breaking","affected_versions":">=1.3.0"},{"fix":"Only install js-project-commons; its dependencies are loaded internally.","message":"Internal dependencies are bundled (since v1.0.34); do not install them separately.","severity":"gotcha","affected_versions":">=1.0.34"},{"fix":"Use eslint instead of jslint.","message":"jslint is disabled by default since v1.0.96","severity":"deprecated","affected_versions":">=1.0.96"},{"fix":"Remove unnecessary bower.json file.","message":"Bower.json is no longer required for web projects since v1.3.1","severity":"gotcha","affected_versions":">=1.3.1"},{"fix":"Set browser in karma.conf.js, not in Gruntfile.","message":"Karma browser configuration moved to karma conf instead of grunt task since v1.1.6","severity":"breaking","affected_versions":">=1.1.6"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install --save-dev js-project-commons'","cause":"Package not installed or missing from node_modules.","error":"Error: Cannot find module 'js-project-commons'"},{"fix":"Add grunt.loadNpmTasks('js-project-commons') in Gruntfile.","cause":"Grunt task not loaded because js-project-commons is not loaded via loadNpmTasks.","error":"Warning: Task \"eslint\" not found. Use --force to continue."},{"fix":"Use require('js-project-commons') only to load tasks, not as a function.","cause":"Trying to call require('js-project-commons') as a function (it's not callable).","error":"TypeError: js_project_commons is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}