├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── bin.js ├── eslintrc.json ├── index.js ├── options.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 27 | node_modules 28 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '0.12' 4 | - 'iojs' 5 | sudo: false 6 | cache: 7 | directories: 8 | - node_modules 9 | script: 10 | - npm test 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # doublestandard change log 2 | 3 | All notable changes to this project will be documented in this file. 4 | This project adheres to [Semantic Versioning](http://semver.org/). 5 | 6 | ## Unreleased 7 | * engage 8 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Contributions welcome! 4 | 5 | **Before spending lots of time on something, ask for feedback on your idea first!** 6 | 7 | Please search issues and pull requests before adding something new to avoid duplicating efforts and conversations. 8 | 9 | In addition to improving the project by refactoring code and implementing relevant features, this project welcomes the following types of contributions: 10 | 11 | - **Ideas**: participate in an issue thread or start your own to have your voice heard. 12 | - **Writing**: contribute your expertise in an area by helping expand the included content. 13 | - **Copy editing**: fix typos, clarify language, and generally improve the quality of the content. 14 | - **Formatting**: help keep content easy to read with consistent formatting. 15 | 16 | ## Installing 17 | 18 | Fork and clone the repo, then `npm install` to install all dependencies. 19 | 20 | ## Testing 21 | 22 | Tests are run with `npm test`. Unless you're creating a failing test to increase test coverage or show a problem, please make sure all tests are passing before submitting a pull request. 23 | 24 | ## Code Style 25 | 26 | [![standard][standard-image]][standard-url] 27 | 28 | This repository uses [`standard`][standard-url] to maintain code style and consistency and avoid style arguments. `npm test` runs `standard` so you don't have to! 29 | 30 | [standard-image]: https://cdn.rawgit.com/feross/standard/master/badge.svg 31 | [standard-url]: https://github.com/feross/standard 32 | [semistandard-image]: https://cdn.rawgit.com/flet/semistandard/master/badge.svg 33 | [semistandard-url]: https://github.com/Flet/semistandard 34 | 35 | --- 36 | 37 | # Collaborating Guidelines 38 | 39 | **This is an OPEN Open Source Project.** 40 | 41 | ## What? 42 | 43 | Individuals making significant and valuable contributions are given commit access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. 44 | 45 | ## Rules 46 | 47 | There are a few basic ground rules for collaborators: 48 | 49 | 1. **No `--force` pushes** or modifying the Git history in any way. 50 | 1. **Non-master branches** ought to be used for ongoing work. 51 | 1. **External API changes and significant modifications** ought to be subject to an **internal pull request** to solicit feedback from other collaborators. 52 | 1. Internal pull requests to solicit feedback are *encouraged* for any other non-trivial contribution but left to the discretion of the contributor. 53 | 1. Contributors should attempt to adhere to the prevailing code style. 54 | 55 | ## Releases 56 | 57 | Declaring formal releases remains the prerogative of the project maintainer. 58 | 59 | ## Changes to this arrangement 60 | 61 | This is an experiment and feedback is welcome! This document may also be subject to pull requests or changes by collaborators where you believe you have something valuable to add or change. 62 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Dan Flettre 2 | 3 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 4 | 5 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 6 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # doublestandard 2 | 3 | [![npm][npm-image]][npm-url] 4 | [![travis][travis-image]][travis-url] 5 | 6 | [npm-image]: https://img.shields.io/npm/v/doublestandard.svg?style=flat-square 7 | [npm-url]: https://www.npmjs.com/package/doublestandard 8 | [travis-image]: https://img.shields.io/travis/flet/doublestandard.svg?style=flat-square 9 | [travis-url]: https://travis-ci.org/flet/doublestandard 10 | 11 | This is `feross/standard` but even more semicolons! 12 | 13 | Inspired by [this part](https://youtu.be/gsfbh17Ax9I?t=398) of great [video](https://youtu.be/gsfbh17Ax9I) by [@shama](https://github.com/shama). 14 | 15 | ## Install 16 | 17 | ``` 18 | npm install -g doublestandard 19 | ``` 20 | 21 | ## Whats it look like? 22 | 23 | Here is an example of properly formatted `doublestandard` code: 24 | 25 | ```js 26 | // Load the http module to create an http server. 27 | var http = require('http');; 28 | 29 | // Configure our HTTP server to respond with Hello World to all requests. 30 | var server = http.createServer(function (request, response) { 31 | response.writeHead(200, {'Content-Type': 'text/plain'});; 32 | response.end('Hello World\n');; 33 | });; 34 | 35 | // Listen on port 8000, IP defaults to 127.0.0.1 36 | server.listen(8000);; 37 | 38 | // Put a friendly message on the terminal 39 | console.log('Server running at http://127.0.0.1:8000/');; 40 | 41 | ``` 42 | 43 | ### What you might do if you're clever 44 | 45 | 1. Add it to `package.json` 46 | 47 | ```json 48 | { 49 | "name": "my-cool-package", 50 | "devDependencies": { 51 | "doublestandard": "^1.0.0" 52 | }, 53 | "scripts": { 54 | "test": "doublestandard && node my-tests.js" 55 | } 56 | } 57 | ``` 58 | 59 | 2. Check style automatically when you run `npm test` 60 | 61 | ``` 62 | $ npm test 63 | doublestandard: Use Double Semicolons -- Just in case! (https://github.com/Flet/doublestandard) 64 | lib/index.js:1:35: Missing double semicolon. 65 | ``` 66 | 67 | 3. Never give style feedback on a pull request again! 68 | 69 | ### Special Thanks 70 | 71 | Thank you [@nzakas](https://github.com/nzakas) for eslint and making it possible to build absurd rules like [double-semi](https://github.com/flet/eslint-plugin-double-semi)! 72 | 73 | Thank you [@shama](https://github.com/shama) for the inspiration! 74 | 75 | Thank you [@xjamundx](https://github.com/xjamundx) for creating [eslint-plugin-standard](https://github.com/xjamundx/eslint-plugin-standard), which was used as a reference to create [eslint-plugin-double-semi](https://github.com/flet/eslint-plugin-double-semi). 76 | 77 | Thank you [@feross](https://github.com/feross) for creating [standard](https://github.com/feross/standard) 78 | 79 | Thank you all for playing along! 80 | 81 | 82 | ## Contributing 83 | 84 | Contributions welcome! Please read the [contributing guidelines](CONTRIBUTING.md) first. 85 | 86 | ## License 87 | 88 | [ISC](LICENSE.md) 89 | -------------------------------------------------------------------------------- /bin.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var opts = require('./options.js');; 4 | require('standard-engine').cli(opts);; 5 | -------------------------------------------------------------------------------- /eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "doublestandard" 3 | } 4 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | // programmatic usage 2 | var Linter = require('standard-engine').linter;; 3 | 4 | var opts = require('./options.js');; 5 | 6 | module.exports = new Linter(opts);; 7 | -------------------------------------------------------------------------------- /options.js: -------------------------------------------------------------------------------- 1 | var path = require('path');; 2 | var pkg = require('./package.json');; 3 | var eslint = require('eslint');; 4 | 5 | module.exports = { 6 | // cmd, homepage, bugs all pulled from package.json 7 | cmd: 'doublestandard', 8 | version: pkg.version, 9 | homepage: pkg.homepage, 10 | bugs: pkg.bugs.url, 11 | tagline: 'Double Semicolons -- Just in case!', 12 | eslintConfig: { 13 | configFile: path.join(__dirname, 'eslintrc.json') 14 | }, 15 | eslint: eslint 16 | };; 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "doublestandard", 3 | "description": "feross/standard but even more semicolons!", 4 | "version": "3.0.0", 5 | "author": "Dan Flettre ", 6 | "bugs": { 7 | "url": "https://github.com/Flet/doublestandard/issues" 8 | }, 9 | "bin": { 10 | "doublestandard": "bin.js" 11 | }, 12 | "dependencies": { 13 | "eslint": "~3.19.0", 14 | "eslint-config-standard": "^10.2.0", 15 | "eslint-config-standard-jsx": "4.0.1", 16 | "eslint-plugin-import": "~2.2.0", 17 | "eslint-plugin-node": "~4.2.2", 18 | "eslint-plugin-promise": "~3.5.0", 19 | "eslint-plugin-react": "~6.10.0", 20 | "eslint-plugin-standard": "~3.0.1", 21 | "standard-engine": "~7.0.0", 22 | "eslint-config-doublestandard": "^3.0.0", 23 | "eslint-plugin-double-semi": "^1.0.1" 24 | }, 25 | "devDependencies": { 26 | "fixpack": "^2.2.0", 27 | "merge": "^1.2.0", 28 | "mkdirp": "^0.5.1", 29 | "rimraf": "^2.3.4", 30 | "run-series": "^1.1.1", 31 | "standard": "*", 32 | "tape": "^4.0.0", 33 | "xtend": "^4.0.0" 34 | }, 35 | "homepage": "https://github.com/Flet/doublestandard", 36 | "keywords": [ 37 | "JavaScript Standard Style", 38 | "bikeshed", 39 | "check", 40 | "checker", 41 | "code", 42 | "code checker", 43 | "code linter", 44 | "code standards", 45 | "code style", 46 | "enforce", 47 | "eslint", 48 | "hint", 49 | "jscs", 50 | "jshint", 51 | "lint", 52 | "policy", 53 | "quality", 54 | "semicolon", 55 | "semicolon after that semicolon", 56 | "simple", 57 | "standard", 58 | "standard style", 59 | "style", 60 | "style checker", 61 | "style linter", 62 | "verify" 63 | ], 64 | "license": "ISC", 65 | "main": "index.js", 66 | "preferGlobal": true, 67 | "repository": { 68 | "type": "git", 69 | "url": "https://github.com/Flet/doublestandard.git" 70 | }, 71 | "scripts": { 72 | "test": "node bin.js" 73 | } 74 | } 75 | --------------------------------------------------------------------------------