{"id":16244604,"url":"https://github.com/indexzero/fashion-show","last_synced_at":"2025-10-25T15:15:43.890Z","repository":{"id":24022314,"uuid":"27406868","full_name":"indexzero/fashion-show","owner":"indexzero","description":"Build consistent and versioned styleguides by including and running consistent lint files across projects.","archived":false,"fork":false,"pushed_at":"2017-08-25T11:32:07.000Z","size":45,"stargazers_count":26,"open_issues_count":1,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-18T21:04:19.483Z","etag":null,"topics":[],"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/indexzero.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-12-02T00:19:20.000Z","updated_at":"2024-07-03T09:11:29.000Z","dependencies_parsed_at":"2022-08-31T14:11:16.903Z","dependency_job_id":null,"html_url":"https://github.com/indexzero/fashion-show","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Ffashion-show","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Ffashion-show/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Ffashion-show/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indexzero%2Ffashion-show/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indexzero","download_url":"https://codeload.github.com/indexzero/fashion-show/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221451197,"owners_count":16823979,"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":[],"created_at":"2024-10-10T14:19:53.937Z","updated_at":"2025-10-25T15:15:38.851Z","avatar_url":"https://github.com/indexzero.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fashion-show\n\nBuild consistent and versioned styleguides by including and running consistent lint files across projects.\n\n- [Motivation](#motivation)\n- [Writing your requireable styleguide](#writing-your-requireable-styleguide)\n- [API Documentation](#api-documentation)\n\n## Motivation\n\nYour styleguide should be **verisoned** and **consistent** across all of your projects. This means that you should only have _ONE_ `.jshintrc` and/or `.jscsrc` file anywhere. But how can this be accomplished easily? By making your own styleguide using `fashion-show`.\n\n## Writing your \"requireable\" styleguide\n\n**A fully working example at [indexzero/styleguide](https://github.com/indexzero/styleguide).** Basically it happens in a few steps:\n\n- **1.** Make a new repository, `your-styleguide`\n- **2.** Add your `.elintrc` and `.jscsrc` files:\n```\ncd your-styleguide\nmkdir dist\nmkdir dotfiles\ntouch dotfiles/.eslintrc\ntouch dotfiles/.jscsrc\n\n# Also works with jshint\n# touch dotfiles/.jshintrc\n```\n- **3.** Install `fashion-show` and your favorite linters: `jscs`, `eslint` and `jshint` are supported.\n```\nnpm install fashion-show jscs eslint --save\n```\n- **4.** \"Build\" your dotfiles on prepublish (i.e. remove comments)\n``` js\n\"scripts\": {\n  \"prepublish\": \"./node_modules/.bin/fashion-show-build\"\n}\n```\n- **5.** Write a simple wrapper script to \"lint\"\n``` js\nvar path = require('path');\n\nrequire('fashion-show')({\n  commands: ['jscs', 'eslint'],\n  rc: path.join(__dirname, '..', 'dist')\n}, function (err, code) {\n  if (err) { return process.exit(1); }\n  process.exit(code);\n});\n```\n- **6.** Expose that script as a \"bin\" in `your-styleguide`\n``` js\n\"bin\": {\n  \"your-styleguide\": \"./bin/your-styleguide\"\n}\n```\n- **7.** Depend on `your-styleguide`\n```\ncd your-styleguide\nnpm publish\ncd some/other/project\nnpm install your-styleguide --save-dev\n```\n- **8.** Use the bin you created on \"pretest\"\n```\n\"scripts\": {\n  \"pretest\": \"your-styleguide lib test\"\n}\n```\n\n## API Documentation\n\nAt its core `fashion-show` will run the CLI versions of the lint tools you choose to use it with. A [comparison of JavaScript lint CLI options](https://github.com/indexzero/js-lint-compat/blob/master/CLI-OPTIONS.md) is available if you're interested in exploring this in depth, but `fashion-show` has gone to length to pick the best tool for the job where applicable so when you run:\n\n``` js\nrequire('fashion-show')(options, function (err, code) {\n  if (err) { return process.exit(1); }\n  process.exit(code);\n});\n```\n\nThe list of all available `options` is:\n\n| option name   | example              | jshint        | jscs         | eslint       |\n|:--------------|:---------------------|:--------------|:-------------|:-------------|\n| `commands`    | `['jscs', 'eslint']` | `---`         | `---`        | `---`        |\n| `targets`     | `['lib/', 'test/']`  | `...args`     | `...args`    | `...args`    |\n| `rc`          | `'../rc'`            | `--config`    | `--config`   | `--config`   |\n| `fix`         | `true`               | `---`         | `--fix`      | `---`        |\n| `exts`        | `['.jsx']`           | `--extra-ext` | `---`        | `--ext .js`  |\n| `reporter`    | `'checkstyle'`       | `--reporter`  | `--reporter` | `--format`   |\n| `format`      | `'checkstyle'`       | `---`         | `---`        | `--format`   |\n| `global`      | `['my-global']`      | `--prereq`    | `---`        | `--global`   |\n| `binPath`     | `node_modules/.bin`  | `---`         | `---`        | `---`        |\n\nAll of these options are also configurable through the binary scripts that you define in **Step 5** above:\n\n| CLI option      | option name   | Sample usage     |\n|:----------------|:--------------|:-----------------|\n| `...args`       | `targets`     | `lib/ test/`     |\n| `-c,--command`  | `commands`    | `-c jscs`        |\n| `-r,--rc`       | `rc`          | `-d ~/.lintrcs`  |\n| `-f,--fix`      | `fix`         | `--fix`          |\n| `-e,--ext`      | `exts`        | `--ext .jsx`     |\n| `-r,--reporter` | `reporter`    | `-r checkstyle`  |\n| `-g,--global`   | `global`      | `-g my-global`   |\n\n#### # `commands`\n\nArray of commands to actually run against. Each item in the Array can be a string command or an object:\n\n``` js\n{\n  'command': 'jscs',\n  'args': ['extra', 'jscs', 'specific', 'args']\n}\n```\n\n#### # `targets`\n\nThe set of targets to run the given commands against.\n\n#### # `dist`\n\nDirectory where all of your lint files is located. It will be default look for `.{command}rc`: `.jscsrc`, `.jshintrc`, `.eslintrc`\n\n#### # `reporter`\n\nReporter passed to the linters that you are running.\n\n#### # `fix`\n\nIf enabled will turn on [auto fixing in `jscs`](http://jscs.info/overview.html#cli) (Currently whitespace rules, EOF rule, and validateIndentation)\n\n#### # `exts`\n\nSet of **additional** extensions that you want to include running lint(s) against.\n\n#### # `global`\n\nSet of additional globals that you wish to enable\n\n\n## Tests\n\nTests are written with `mocha` and code coverage is provided by `istanbul`:\n\n```\nnpm test\n```\n\n##### Author: [Charlie Robbins](charlie.robbins@gmail.com)\n##### License: MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findexzero%2Ffashion-show","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findexzero%2Ffashion-show","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findexzero%2Ffashion-show/lists"}