├── .npmrc ├── .gitignore ├── eslintrc.json ├── .npmignore ├── index.js ├── .github └── workflows │ ├── add-to-project.yaml │ ├── test.yml │ └── old-test.yml ├── bin └── cmd.js ├── options.js ├── test ├── api.js ├── clone.js └── semistandard-repos.json ├── LICENSE ├── package.json ├── README.md ├── badge.svg └── CHANGELOG.md /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | tmp/ 3 | .history -------------------------------------------------------------------------------- /eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["semistandard", "standard-jsx"] 3 | } 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Generated by dmn (https://github.com/inikulin/dmn) 2 | 3 | .git* 4 | .npmignore 5 | .travis.yml 6 | test.js 7 | tmp/ -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /*! standard. MIT License. Feross Aboukhadijeh */ 2 | import { StandardEngine } from 'standard-engine' 3 | import options from './options.js' 4 | 5 | export default new StandardEngine(options) 6 | -------------------------------------------------------------------------------- /.github/workflows/add-to-project.yaml: -------------------------------------------------------------------------------- 1 | on: 2 | pull_request: 3 | types: [opened] 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | add-to-project: 9 | uses: standard/.github/.github/workflows/add-to-project.yaml@master 10 | secrets: inherit 11 | -------------------------------------------------------------------------------- /bin/cmd.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /* eslint-disable no-var, no-eval */ 3 | 4 | var match = process.version.match(/v(\d+)\.(\d+)/) 5 | var major = parseInt(match[1], 10) 6 | var minor = parseInt(match[2], 10) 7 | 8 | if (major >= 12 || (major === 12 && minor >= 20)) { 9 | eval('import("standard-engine")').then(function (standardEngine) { 10 | eval('import("../options.js")').then(function (options) { 11 | standardEngine.cli(options.default) 12 | }) 13 | }) 14 | } else { 15 | console.error('semistandard: Node 12.20.0 or greater is required. `semistandard` did not run.') 16 | } 17 | -------------------------------------------------------------------------------- /options.js: -------------------------------------------------------------------------------- 1 | import { readFileSync } from 'node:fs' 2 | import { fileURLToPath } from 'node:url' 3 | import eslint from 'eslint' 4 | 5 | // eslintConfig.overrideConfigFile have problem reading URLs and file:/// 6 | const overrideConfigFile = fileURLToPath(new URL('./eslintrc.json', import.meta.url)) 7 | const pkgURL = new URL('./package.json', import.meta.url) 8 | const pkgJSON = readFileSync(pkgURL, { encoding: 'utf-8' }) 9 | const pkg = JSON.parse(pkgJSON) 10 | 11 | export default { 12 | bugs: pkg.bugs.url, 13 | cmd: 'semistandard', 14 | eslint, 15 | eslintConfig: { 16 | overrideConfigFile 17 | }, 18 | homepage: pkg.homepage, 19 | tagline: 'Semicolons For All!', 20 | version: pkg.version 21 | } 22 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | push: 5 | branches: [master] 6 | pull_request: 7 | branches: [master] 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | 13 | strategy: 14 | matrix: 15 | node-version: [12.20.0, 14.13.1, 16.0.0] 16 | fail-fast: false 17 | 18 | steps: 19 | - name: Checkout project 20 | uses: actions/checkout@v2 21 | 22 | - name: Use Node.js ${{ matrix.node-version }} 23 | uses: actions/setup-node@v2 24 | with: 25 | node-version: ${{ matrix.node-version }} 26 | 27 | - name: Cache Node dependencies 28 | uses: actions/cache@v2.1.5 29 | with: 30 | path: ~/.npm 31 | key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} 32 | restore-keys: | 33 | ${{ runner.os }}-node- 34 | 35 | - name: Install dependencies 36 | run: npm install 37 | 38 | - name: Run tests 39 | run: npm test 40 | -------------------------------------------------------------------------------- /test/api.js: -------------------------------------------------------------------------------- 1 | import { resolve } from 'node:path' 2 | import test from 'tape' 3 | import semistandard from '../index.js' 4 | 5 | const filePath = resolve('./bin/cmd.js') 6 | 7 | test('api: lintFiles', async (t) => { 8 | t.plan(5) 9 | const [result] = await semistandard.lintFiles([filePath]) 10 | t.equal(typeof result, 'object', 'result is an object') 11 | 12 | t.equal(result.errorCount, 7, 'error count 7') 13 | 14 | t.equal(resolve(result.filePath), filePath, 'error filepath correct') 15 | t.equal(result.messages[0].message, 'Missing semicolon.', 'first missing semicolon message') 16 | t.equal(result.messages[1].message, 'Missing semicolon.', 'second missing semicolon message') 17 | }) 18 | 19 | test('api: lintText', async (t) => { 20 | t.plan(4) 21 | const [result] = await semistandard.lintText('console.log("hi there")\n') 22 | 23 | t.equal(typeof result, 'object', 'result is an object') 24 | t.equal(result.errorCount, 2, 'error count 2') 25 | t.equal(result.messages[0].message, 'Strings must use singlequote.', 'singlequote message') 26 | t.equal(result.messages[1].message, 'Missing semicolon.', 'missing semicolon message') 27 | }) 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright (c) Feross Aboukhadijeh 3 | Copyright (c) 2015 Dan Flettre 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /.github/workflows/old-test.yml: -------------------------------------------------------------------------------- 1 | # Special test for the oldest version of Node.js that we "support" 2 | # even though the linter won't actually run. Test that the command 3 | # line program exits cleanly. 4 | 5 | name: Old test 6 | 7 | on: 8 | push: 9 | branches: [master] 10 | pull_request: 11 | branches: [master] 12 | 13 | jobs: 14 | test: 15 | runs-on: ubuntu-latest 16 | 17 | strategy: 18 | matrix: 19 | node-version: [0.10.48] 20 | 21 | steps: 22 | - name: Checkout project 23 | uses: actions/checkout@v2.3.4 24 | 25 | - name: Use Node.js ${{ matrix.node-version }} 26 | uses: actions/setup-node@v2.4.0 27 | with: 28 | node-version: ${{ matrix.node-version }} 29 | 30 | - name: Cache Node dependencies 31 | uses: actions/cache@v2.1.6 32 | with: 33 | path: ~/.npm 34 | key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} 35 | restore-keys: | 36 | ${{ runner.os }}-node- 37 | 38 | - name: Install dependencies 39 | run: npm install 40 | 41 | - name: Test that the command line program exits cleanly. 42 | run: ./bin/cmd.js 43 | shell: bash 44 | -------------------------------------------------------------------------------- /test/clone.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Clones several projects that are known to follow "JavaScript Standard Style" and runs 5 | * the `standard` style checker to verify that it passes without warnings. This helps 6 | * ensure we don't accidentally introduce new style rules that cause previously "good" 7 | * code to start failing with new warnings! (And if we do, then that needs to be a MAJOR 8 | * VERSION BUMP.) 9 | */ 10 | 11 | import cp from 'node:child_process' 12 | import path from 'node:path' 13 | import { fileURLToPath } from 'node:url' 14 | import mkdirp from 'mkdirp' 15 | import rimraf from 'rimraf' 16 | import series from 'run-series' 17 | import test from 'tape' 18 | 19 | const TMP = fileURLToPath(new URL('../tmp', import.meta.url)) 20 | const SEMISTANDARD = fileURLToPath(new URL('../bin/cmd.js', import.meta.url)) 21 | 22 | // const URLS = require('./semistandard-repos.json') 23 | const URLS = [ 24 | 'https://github.com/bcomnes/fetch-errors' 25 | ] 26 | 27 | const MODULES = {} 28 | URLS.forEach(function (url) { 29 | const spliturl = url.split('/') 30 | const name = spliturl[spliturl.length - 1] 31 | MODULES[name] = url + '.git' 32 | }) 33 | 34 | test('clone repos from github', function (t) { 35 | rimraf.sync(TMP) 36 | mkdirp.sync(TMP) 37 | 38 | series(Object.keys(MODULES).map(function (name) { 39 | const url = MODULES[name] 40 | return function (cb) { 41 | const args = ['clone', '--depth', 1, url, path.join(TMP, name)] 42 | // TODO: Start `git` in a way that works on Windows – PR welcome! 43 | spawn('git', args, {}, cb) 44 | } 45 | }), function (err) { 46 | if (err) throw err 47 | t.pass('cloned repos') 48 | t.end() 49 | }) 50 | }) 51 | 52 | test('lint repos', function (t) { 53 | series(Object.keys(MODULES).map(function (name) { 54 | return function (cb) { 55 | const cwd = path.join(TMP, name) 56 | spawn('node', [SEMISTANDARD], { cwd }, function (err) { 57 | t.error(err, name) 58 | cb(null) 59 | }) 60 | } 61 | }), function (err) { 62 | if (err) throw err 63 | t.end() 64 | }) 65 | }) 66 | 67 | function spawn (command, args, opts, cb) { 68 | const child = cp.spawn(command, args, { stdio: 'inherit', ...opts }) 69 | child.on('error', cb) 70 | child.on('close', function (code) { 71 | if (code !== 0) cb(new Error('non-zero exit code: ' + code)) 72 | else cb(null) 73 | }) 74 | return child 75 | } 76 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "semistandard", 3 | "description": "All the goodness of `feross/standard` with semicolons sprinkled on top.", 4 | "version": "17.0.0", 5 | "author": { 6 | "name": "Feross Aboukhadijeh", 7 | "email": "feross@feross.org", 8 | "url": "https://feross.org" 9 | }, 10 | "bin": { 11 | "semistandard": "./bin/cmd.js" 12 | }, 13 | "bugs": { 14 | "url": "https://github.com/standard/semistandard/issues" 15 | }, 16 | "dependencies": { 17 | "eslint": "^8.20.0", 18 | "eslint-config-semistandard": "^17.0.0", 19 | "eslint-config-standard": "17.0.0", 20 | "eslint-config-standard-jsx": "^11.0.0", 21 | "eslint-plugin-import": "^2.26.0", 22 | "eslint-plugin-n": "^15.2.4", 23 | "eslint-plugin-promise": "^6.0.0", 24 | "eslint-plugin-react": "^7.30.1", 25 | "standard-engine": "^15.0.0" 26 | }, 27 | "devDependencies": { 28 | "installed-check": "^6.0.3", 29 | "merge": "^2.1.1", 30 | "mkdirp": "^1.0.4", 31 | "rimraf": "^3.0.2", 32 | "run-series": "^1.1.9", 33 | "standard": "*", 34 | "tape": "^5.3.1" 35 | }, 36 | "engines": { 37 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 38 | }, 39 | "homepage": "https://github.com/standard/semistandard", 40 | "keywords": [ 41 | "JavaScript Standard Style", 42 | "bikeshed", 43 | "check", 44 | "checker", 45 | "code", 46 | "code checker", 47 | "code linter", 48 | "code standards", 49 | "code style", 50 | "enforce", 51 | "eslint", 52 | "hint", 53 | "jscs", 54 | "jshint", 55 | "lint", 56 | "policy", 57 | "quality", 58 | "semicolon", 59 | "simple", 60 | "standard", 61 | "standard style", 62 | "style", 63 | "style checker", 64 | "style linter", 65 | "verify" 66 | ], 67 | "license": "MIT", 68 | "main": "index.js", 69 | "type": "module", 70 | "repository": { 71 | "type": "git", 72 | "url": "https://github.com/standard/semistandard.git" 73 | }, 74 | "scripts": { 75 | "test": "standard && installed-check --engine-check --engine-no-dev && tape test/*.js" 76 | }, 77 | "standard": { 78 | "ignore": "tmp/**" 79 | }, 80 | "funding": [ 81 | { 82 | "type": "github", 83 | "url": "https://github.com/sponsors/feross" 84 | }, 85 | { 86 | "type": "patreon", 87 | "url": "https://www.patreon.com/feross" 88 | }, 89 | { 90 | "type": "consulting", 91 | "url": "https://feross.org/support" 92 | } 93 | ] 94 | } 95 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JavaScript Semi-Standard Style 2 | [![tests][tests-image]][tests-url] 3 | [![npm][npm-image]][npm-url] 4 | [![downloads][downloads-image]][downloads-url] 5 | 6 | ### One Semicolon for the Dark Lord on his dark throne 7 | 8 | All the goodness of [standard/standard] with semicolons sprinkled on top. 9 | 10 | ## Install 11 | 12 | ```bash 13 | npm install semistandard 14 | ``` 15 | 16 | ## Rules 17 | 18 | Importantly: 19 | 20 | - **semicolons** 21 | - Check [standard/standard] for the rest of the rules. 22 | 23 | ## Badge 24 | 25 | Use this in one of your projects? Include one of these badges in your readme to 26 | let people know that your code is using the standard style. 27 | 28 | [![js-semistandard-style](https://raw.githubusercontent.com/standard/semistandard/master/badge.svg)](https://github.com/standard/semistandard) 29 | 30 | ```markdown 31 | [![js-semistandard-style](https://raw.githubusercontent.com/standard/semistandard/master/badge.svg)](https://github.com/standard/semistandard) 32 | ``` 33 | 34 | [![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg)](https://github.com/standard/semistandard) 35 | 36 | ```markdown 37 | [![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg)](https://github.com/standard/semistandard) 38 | ``` 39 | 40 | ## Usage 41 | 42 | The easiest way to use JavaScript Semi-Standard Style to check your code is to install it 43 | globally as a Node command line program. To do so, simply run the following command in 44 | your terminal (flag `-g` installs `semistandard` globally on your system, omit it if you want 45 | to install in the current working directory): 46 | 47 | ```bash 48 | npm install semistandard -g 49 | ``` 50 | 51 | After you've done that you should be able to use the `semistandard` program. The simplest use 52 | case would be checking the style of all JavaScript files in the current working directory: 53 | 54 | ``` 55 | $ semistandard 56 | Error: Use JavaScript Semi-Standard Style 57 | lib/torrent.js:950:11: Expected '===' and instead saw '=='. 58 | ``` 59 | 60 | ### Editor plugins 61 | 62 | - **Sublime users**: Try [SublimeLinter-contrib-semistandard](https://github.com/Flet/SublimeLinter-contrib-semistandard) for linting in your editor! 63 | - **Atom users** - Install [linter-js-standard](https://atom.io/packages/linter-js-standard) 64 | - **VSCode users** - Install [vscode-standardjs](https://marketplace.visualstudio.com/items?itemName=chenxsan.vscode-standardjs) 65 | 66 | ### What you might do if you're clever 67 | 68 | 1. Add it to `package.json` 69 | 70 | ```json 71 | { 72 | "name": "my-cool-package", 73 | "devDependencies": { 74 | "semistandard": "*" 75 | }, 76 | "scripts": { 77 | "test": "semistandard && node my-normal-tests-littered-with-semicolons.js" 78 | } 79 | } 80 | ``` 81 | 82 | 2. Check style automatically when you run `npm test` 83 | 84 | ``` 85 | $ npm test 86 | Error: Code style check failed: 87 | lib/torrent.js:950:11: Expected '===' and instead saw '=='. 88 | ``` 89 | 90 | 3. Never give style feedback on a pull request again! (unless it's about semicolons) 91 | 92 | ### Custom Parser 93 | To use a custom parser, install it from npm (example: `npm install 94 | babel-eslint`) and add this to your package.json: 95 | 96 | ```json 97 | { 98 | "semistandard": { 99 | "parser": "babel-eslint" 100 | } 101 | } 102 | ``` 103 | 104 | ### [Vim](http://www.vim.org/) 105 | 106 | Install **[Syntastic][vim-1]** and add these lines to `.vimrc`: 107 | 108 | ```vim 109 | let g:syntastic_javascript_checkers=['standard'] 110 | let g:syntastic_javascript_standard_exec = 'semistandard' 111 | ``` 112 | 113 | For automatic formatting on save, add these two lines to `.vimrc`: 114 | 115 | ```vim 116 | autocmd bufwritepost *.js silent !semistandard % --fix 117 | set autoread 118 | ``` 119 | 120 | [vim-1]: https://github.com/scrooloose/syntastic 121 | 122 | ### Ignoring files 123 | 124 | Just like in `standard`, The paths `node_modules/**`, `*.min.js`, `bundle.js`, `coverage/**`, hidden files/folders 125 | (beginning with `.`), and all patterns in a project's root `.gitignore` file are 126 | automatically excluded when looking for `.js` files to check. 127 | 128 | Sometimes you need to ignore additional folders or specific minfied files. To do that, add 129 | a `semistandard.ignore` property to `package.json`: 130 | 131 | ```json 132 | "semistandard": { 133 | "ignore": [ 134 | "**/out/", 135 | "/lib/select2/", 136 | "/lib/ckeditor/", 137 | "tmp.js" 138 | ] 139 | } 140 | ``` 141 | 142 | ### Make it look `snazzy` 143 | If you want prettier output, just install the [`snazzy`](https://github.com/feross/snazzy) package and pipe `semistandard` to it: 144 | 145 | ```bash 146 | $ semistandard --verbose | snazzy 147 | ``` 148 | 149 | See [standard/standard] for more information. 150 | 151 | [tests-image]: https://github.com/standard/semistandard/actions/workflows/test.yml/badge.svg 152 | [tests-url]: https://github.com/standard/semistandard/actions/workflows/test.yml 153 | [npm-image]: https://img.shields.io/npm/v/semistandard.svg 154 | [npm-url]: https://npmjs.org/package/semistandard 155 | [downloads-image]: https://img.shields.io/npm/dm/semistandard.svg 156 | [downloads-url]: https://npmjs.org/package/semistandard 157 | [standard/standard]: https://github.com/standard/standard 158 | -------------------------------------------------------------------------------- /test/semistandard-repos.json: -------------------------------------------------------------------------------- 1 | [ 2 | "https://github.com/AlexeyGorokhov/directory-files", 3 | "https://github.com/AlexeyGorokhov/jwt-identity", 4 | "https://github.com/AlexeyGorokhov/stylesheet-injector", 5 | "https://github.com/AlexeyGorokhov/templator", 6 | "https://github.com/AlexeyGorokhov/ui-lang-detector", 7 | "https://github.com/Esri/Leaflet.shapeMarkers", 8 | "https://github.com/Esri/esri-leaflet-heatmap-feature-layer", 9 | "https://github.com/Flet/acetate", 10 | "https://github.com/Flet/scenevr", 11 | "https://github.com/Hypercubed/wc.js", 12 | "https://github.com/JGAntunes/ampersand-infinite-scroll", 13 | "https://github.com/JGAntunes/ampersand-pagination-mixin", 14 | "https://github.com/Jam3/gl-shader-output", 15 | "https://github.com/JamieMason/shrinkpack", 16 | "https://github.com/MyPureCloud/ember-webrtc-devices", 17 | "https://github.com/MyPureCloud/ember-webrtc-troubleshoot", 18 | "https://github.com/RobLoach/jquery-once", 19 | "https://github.com/RobLoach/metalsmith-feedparser", 20 | "https://github.com/RobLoach/nconf-toml", 21 | "https://github.com/Roilan/mailchimpify", 22 | "https://github.com/Sagacify/logger", 23 | "https://github.com/SoullessWaffle/dotifier", 24 | "https://github.com/Woorank/social-url", 25 | "https://github.com/Woorank/structured-logging", 26 | "https://github.com/anarh/demo-scss-npm-module", 27 | "https://github.com/anarh/node-sass-import", 28 | "https://github.com/anarh/node-sass-import-example", 29 | "https://github.com/bb-ffbb/bbffbb-scraper", 30 | "https://github.com/bithound/cli.bithound.io", 31 | "https://github.com/blakeembrey/pluralize", 32 | "https://github.com/blinkmobile/varied-definition.js", 33 | "https://github.com/bnolan/kollection", 34 | "https://github.com/chrisinajar/american-sounding-names", 35 | "https://github.com/chrisinajar/anchor-pushstate", 36 | "https://github.com/chrisinajar/any-storage", 37 | "https://github.com/chrisinajar/collect-methods", 38 | "https://github.com/chrisinajar/config-request", 39 | "https://github.com/chrisinajar/has-chrome-storage", 40 | "https://github.com/chrisinajar/invoke-handler", 41 | "https://github.com/chrisinajar/json-stylesheets", 42 | "https://github.com/chrisinajar/main-loop-app", 43 | "https://github.com/chrisinajar/not-mercury", 44 | "https://github.com/chrisinajar/orderbook-calculation", 45 | "https://github.com/chrisinajar/weakmap-animation", 46 | "https://github.com/developmentseed/project-seed", 47 | "https://github.com/edenspiekermann/a11y-toggle", 48 | "https://github.com/esri/arcgis-to-geojson", 49 | "https://github.com/ethers/bitcoin-proof", 50 | "https://github.com/gabmontes/tiny-promisify", 51 | "https://github.com/geowarin/electron-hot-loader", 52 | "https://github.com/hotosm/oam-browser-filters", 53 | "https://github.com/hotosm/oam-catalog", 54 | "https://github.com/hudson-taylor/http-transport", 55 | "https://github.com/hudson-taylor/tcp-transport", 56 | "https://github.com/hudson-taylor/utils", 57 | "https://github.com/icyflame/convert-angle", 58 | "https://github.com/icyflame/cstimer-txt-to-json", 59 | "https://github.com/icyflame/generator-nm-semistandard", 60 | "https://github.com/icyflame/get-hosts-cli", 61 | "https://github.com/icyflame/get-numbers", 62 | "https://github.com/icyflame/math-sort", 63 | "https://github.com/icyflame/remove-min-max", 64 | "https://github.com/javiercejudo/is-sorted", 65 | "https://github.com/jonschlinkert/window-size", 66 | "https://github.com/jstransformers/inputformat-to-jstransformer", 67 | "https://github.com/kesla/node-snappy", 68 | "https://github.com/kesla/tapava", 69 | "https://github.com/larsthorup/amaze", 70 | "https://github.com/larsthorup/neo4j-sandbox", 71 | "https://github.com/larsthorup/node-request-har-capture", 72 | "https://github.com/larsthorup/node-sheet-reader", 73 | "https://github.com/larsthorup/sinon-har-server", 74 | "https://github.com/lovell/highwayhash", 75 | "https://github.com/lovell/petra", 76 | "https://github.com/lw7360/asciiartfarts", 77 | "https://github.com/marvinroger/node-binary-file", 78 | "https://github.com/mattdesl/scrape-scripts", 79 | "https://github.com/mattdesl/touch-position", 80 | "https://github.com/micnews/apple-news", 81 | "https://github.com/micnews/array-merge-equal", 82 | "https://github.com/micnews/article-json-to-apple-news", 83 | "https://github.com/micnews/dom-to-vdom", 84 | "https://github.com/micnews/embedly-url", 85 | "https://github.com/micnews/execute-scripts", 86 | "https://github.com/micnews/html-to-amp", 87 | "https://github.com/micnews/levelgraph-query", 88 | "https://github.com/micnews/save-selection", 89 | "https://github.com/micnews/walk-apple-news-format", 90 | "https://github.com/muzzley/zmq-pool", 91 | "https://github.com/nebez/gulp-semistandard", 92 | "https://github.com/numo-labs/aws-lambda-canary", 93 | "https://github.com/patrickarlt/acetate", 94 | "https://github.com/patrickarlt/acetate-asset-revisions", 95 | "https://github.com/patrickarlt/leaflet-virtual-grid", 96 | "https://github.com/patrickarlt/tiny-binary-search", 97 | "https://github.com/pwmckenna/node-travis-encrypt", 98 | "https://github.com/rstacruz/dom101", 99 | "https://github.com/scenevr/summary", 100 | "https://github.com/scijs/integrate-adaptive-simpson", 101 | "https://github.com/scijs/minimize-golden-section-1d", 102 | "https://github.com/scijs/ndarray-blas-level1", 103 | "https://github.com/scijs/ndarray-blas-level2", 104 | "https://github.com/scijs/ndarray-givens-qr", 105 | "https://github.com/shama/gaze", 106 | "https://github.com/shyiko/node-minimal-viable-pool", 107 | "https://github.com/sotojuan/anicollage", 108 | "https://github.com/sotojuan/anicollage-cli", 109 | "https://github.com/sotojuan/bitcly", 110 | "https://github.com/sotojuan/nani", 111 | "https://github.com/sotojuan/nani-cli", 112 | "https://github.com/sotojuan/sec-to-min", 113 | "https://github.com/sotojuan/tapes", 114 | "https://github.com/sotojuan/trashss", 115 | "https://github.com/sotojuan/wwwtxt", 116 | "https://github.com/sotojuan/zwwwtxt", 117 | "https://github.com/spudly/error-subclass", 118 | "https://github.com/spudly/error-wrapper", 119 | "https://github.com/thebergamo/k7", 120 | "https://github.com/thebergamo/k7-mongoose", 121 | "https://github.com/thebergamo/k7-sequelize", 122 | "https://github.com/voxpelli/node-installed-check", 123 | "https://github.com/wKovacs64/hibp", 124 | "https://github.com/wKovacs64/pwned", 125 | "https://github.com/warbrett/node-cronofy", 126 | "https://github.com/wbinnssmith/arraybuffer-equal", 127 | "https://github.com/wbinnssmith/promise-try", 128 | "https://github.com/wbinnssmith/smear" 129 | ] 130 | -------------------------------------------------------------------------------- /badge.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # semistandard Change Log 2 | All notable changes to this project will be documented in this file. 3 | This project adheres to [Semantic Versioning](http://semver.org/). 4 | 5 | 6 | # 16.0.1 2021-06-14 7 | 8 | Updated to `standard 16.0.3`. 9 | 10 | Check `standard` changelog that covers all the updates in detail: 11 | https://standardjs.com/changelog 12 | 13 | Also: 14 | 15 | - Updated to `eslint-config-semistandard` version `16.0.0` 16 | - Removed unused `eslint-plugin-standard` 17 | 18 | # 16.0.0 2020-10-30 19 | 20 | Updated to `standard 16.0.0`. 21 | 22 | Check `standard` changelog that covers all the updates in detail: 23 | https://standardjs.com/changelog 24 | 25 | # 15.0.0 2020-10-29 26 | 27 | Updated to eslint 7 and `standard 15.0.0`. 28 | 29 | Check `standard` changelog that covers all the updates in detail: 30 | https://standardjs.com/changelog 31 | 32 | # 14.2.3 2020-07-25 33 | - Republish with complete changelog 34 | 35 | # 14.2.2 2020-07-25 36 | - Republish without CRLF to resolve issues on MacOS. 37 | 38 | # 14.2.0 - 2019-09-14 39 | 40 | - Update eslint to 6.4.0 41 | 42 | # 14.1.0 2019-09-04 43 | 44 | Check `standard` changelog that covers all the updates in detail: 45 | https://standardjs.com/changelog 46 | 47 | # 14.0.1 2019-08-19 48 | 49 | Check `standard` changelog that covers all the updates in detail: 50 | https://standardjs.com/changelog 51 | 52 | # 14.0.0 2019-08-19 53 | 54 | Updated to eslint 6 and `standard 13.0.0`. 55 | 56 | Check `standard` changelog that covers all the updates in detail: 57 | https://standardjs.com/changelog 58 | 59 | # 13.0.0 2018-11-06 60 | 61 | Updated to eslint 5 and `standard 12.0.0` and the latest `standard-engine`. 62 | 63 | Check `standard` changelog that covers all the updates in detail: 64 | https://standardjs.com/changelog 65 | 66 | 67 | ## 12.0.0 2017-12-19 68 | 69 | Updated to eslint 4 and `standard 11.0.0` and the latest `standard-engine`. 70 | 71 | With the eslint update, there are a few rules that are more strict now. Thankfully running `semistandard --fix` will fix just about all of them! 72 | 73 | Check `standard` changelog that covers all the updates in detail: 74 | https://standardjs.com/changelog 75 | 76 | 77 | ## 11.0.0 2017-04-20 78 | 79 | Updated to match the latest `standard v10.0.2` rules and the newest `standard-engine` features. 80 | 81 | Check `standard` changelog that covers all the updates: 82 | https://github.com/feross/standard/blob/master/CHANGELOG.md 83 | 84 | 85 | In summary: 86 | 87 | - **using deprecated Node.js APIs is now considered an error**. It's finally time to update those dusty old APIs! 88 | 89 | ### New features 90 | 91 | - Update ESLint from 3.15.x to 3.19.x. 92 | - Node.js API: Add `standard.lintTextSync` method 93 | 94 | ### New rules 95 | 96 | *(Estimated % of affected standard users, based on test suite in parens)* 97 | 98 | - Disallow using deprecated Node.js APIs ([node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)) [#693](https://github.com/feross/standard/issues/693) (13%) 99 | - Ensures that code always runs without warnings on the latest versions of Node.js 100 | - Ensures that safe Buffer methods (`Buffer.from()`, `Buffer.alloc()`) are used instead of `Buffer()` 101 | - Enforce callbacks always called with Node.js-style error first ([standard/no-callback-literal](https://github.com/xjamundx/eslint-plugin-standard#rules-explanations)) [#623](https://github.com/feross/standard/issues/623) (3%) 102 | - Functions named `callback` or `cb` must be invoked with `null`, `undefined`, or an `Error` as the first argument 103 | - Disallows using a string instead of an `Error` object 104 | - Disallows confusing callbacks that do not follow the standard Node.js pattern 105 | - Disallow any imports that come after non-import statements ([import/first](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md)) [#806](https://github.com/feross/standard/issues/806) (1%) 106 | - Disallow unnecessary return await ([no-return-await](http://eslint.org/docs/rules/no-return-await)) [#695](https://github.com/feross/standard/issues/695) (0%) 107 | - Disallow comma-dangle in functions ([comma-dangle](http://eslint.org/docs/rules/comma-dangle)) [#787](https://github.com/feross/standard/issues/787) (0%) 108 | - Disallow repeated exports of names or defaults ([import/export](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md)) [#806](https://github.com/feross/standard/issues/806) (0%) 109 | - Disallow import of modules using absolute paths ([import/no-absolute-path](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md)) [#806](https://github.com/feross/standard/issues/806) (0%) 110 | - Disallow Webpack loader syntax in imports ([import/no-webpack-loader-syntax](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md)) [#806](https://github.com/feross/standard/issues/806) (0%) 111 | - Disallow comparing against -0 ([no-compare-neg-zero](http://eslint.org/docs/rules/no-compare-neg-zero)) [#812](https://github.com/feross/standard/issues/812) (0%) 112 | 113 | ### Changed rules 114 | - Relax rule: allow using `...rest` to omit properties from an object ([no-unused-vars](http://eslint.org/docs/rules/no-unused-vars)) [#800](https://github.com/feross/standard/issues/800) 115 | - This is a common and useful pattern in React/JSX apps! 116 | - Relax rule: allow Flow `import type` statements ([import/no-duplicates](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md)) [#599](https://github.com/feross/standard/issues/599) 117 | - These are no longer considered to be "duplicate imports" 118 | - Relax rule: Treat `process.exit()` the same as `throw` in code path analysis ([node/process-exit-as-throw](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/process-exit-as-throw.md)) [#699](https://github.com/feross/standard/issues/699) 119 | - Makes certain other rules work better and give fewer false positives 120 | - Relax rule: allow Unnecessary Labels ([no-extra-label](http://eslint.org/docs/rules/no-extra-label)) 121 | - Redundant, since "no-labels" is already enabled, which is more restrictive 122 | 123 | (from standard 10.0.2): 124 | - Relax rule: Disallow import of modules using absolute paths ([import/no-absolute-path](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md)) [#861](https://github.com/feross/standard/issues/861) 125 | - This rule was responsible for up to 25% of the running time of `standard`, so we are disabling it until its performance improves. 126 | 127 | 128 | 129 | 130 | 131 | ## 10.0.0 2017-03-06 132 | 133 | Updated to match the latest `standard` rules and the newest `standard-engine` features. 134 | 135 | @feross did a great writeup on the `standard` changelog that covers all the updates: 136 | https://github.com/feross/standard/blob/master/CHANGELOG.md 137 | 138 | In summary: 139 | ### New features 140 | 141 | - Update ESLint from 3.10.x to 3.15.x 142 | - 3 additional rules are now fixable with `standard --fix` 143 | 144 | ### New rules 145 | 146 | *(Estimated % of affected standard users, based on test suite in parens)* 147 | 148 | - Disallow mixing different operators without parens ([no-mixed-operators](http://eslint.org/docs/rules/no-mixed-operators)) [#566](https://github.com/feross/standard/issues/566) (5%) 149 | - Enforce 1 newline at end of file (previously 1 or 2 were ok) ([no-multiple-empty-lines](http://eslint.org/docs/rules/no-multiple-empty-lines)) [#733](https://github.com/feross/standard/issues/733) (3%) 150 | - Disallow Unused Expressions ([no-unused-expressions](http://eslint.org/docs/rules/no-unused-expressions)) [#690](https://github.com/feross/standard/issues/690) (3%) 151 | - Note: this affects users of the Chai test framework. [Read about the changes you need to make](https://github.com/feross/standard/issues/690#issuecomment-278533482). 152 | - Disallow redundant return statements ([no-useless-return](http://eslint.org/docs/rules/no-useless-return)) [#694](https://github.com/feross/standard/issues/694) (1%) 153 | - Disallow Incorrect Early Use ([no-use-before-define](http://eslint.org/docs/rules/no-use-before-define)) [#636](https://github.com/feross/standard/issues/636) (0%) 154 | - Enforce that Promise rejections are passed an Error object as a reason ([prefer-promise-reject-errors](http://eslint.org/docs/rules/prefer-promise-reject-errors)) [#777](https://github.com/feross/standard/issues/777) (0%) 155 | - Enforce comparing `typeof` expressions against string literals ([valid-typeof](http://eslint.org/docs/rules/valid-typeof)) [#629](https://github.com/feross/standard/issues/629) (0%) 156 | - Enforce spacing around * in generator functions ([generator-star-spacing](http://eslint.org/docs/rules/generator-star-spacing)) [#724](https://github.com/feross/standard/issues/724) (0%) 157 | - Disallow Unnecessary Labels ([no-extra-label](http://eslint.org/docs/rules/no-extra-label)) [#736](https://github.com/feross/standard/issues/736) (0%) 158 | - Disallow spacing between template tags and their literals ([template-tag-spacing](http://eslint.org/docs/rules/template-tag-spacing)) [#755](https://github.com/feross/standard/issues/775) (0%) 159 | - Disallow padding within switch statements and classes ([padded-blocks](http://eslint.org/docs/rules/padded-blocks)) [#610](https://github.com/feross/standard/issues/610) (0%) 160 | - Enforce that Symbols are passed a description ([symbol-description](http://eslint.org/docs/rules/symbol-description)) [#630](https://github.com/feross/standard/issues/630) (0%) 161 | 162 | ### Changed rules 163 | 164 | - Relax rule: allow TypeScript Triple-Slash Directives (spaced-comment) [#660](https://github.com/feross/standard/issues/660) 165 | - Relax rule: allow Flow Comments (spaced-comment) [#661](https://github.com/feross/standard/issues/661) 166 | 167 | 168 | ## 9.0.0 2016-09-03 169 | 170 | Updated to match the latest `standard` rules and the newest `standard-engine` features. 171 | 172 | @feross did a great writeup on the `standard` changelog that covers all the updates: 173 | https://github.com/feross/standard/blob/master/CHANGELOG.md 174 | 175 | In summary: 176 | 177 | ### New features 178 | 179 | - Upgrade to ESLint v3 (http://eslint.org/docs/user-guide/migrating-to-3.0.0) 180 | - **BREAKING:** Drop support for node < 4 (this was a decision made by the ESLint team) 181 | - Expose ESLint's `--fix` command line flag [standard-engine/#107](https://github.com/standard/standard-engine/issues/107) 182 | - Lightweight, no additional dependencies, fixes dozens of rules automatically 183 | - **Note:** for `semistandard`, we left the existing `--format` flag in place, which uses `semistandard-format`, but I highly recommend using `--fix` instead! 184 | 185 | 186 | ### New rules 187 | 188 | *(Estimated % of affected standard users, based on test suite in parens)* 189 | 190 | - Enforce placing object properties on separate lines ([object-property-newline](http://eslint.org/docs/rules/object-property-newline)) [#524](https://github.com/feross/standard/issues/524) (2%) 191 | - Require block comments to be balanced ([spaced-comment "balanced"](http://eslint.org/docs/rules/spaced-comment)) [#572](https://github.com/feross/standard/issues/572) (2%) 192 | - Disallow constant expressions in conditions ([no-constant-condition](http://eslint.org/docs/rules/no-constant-condition)) [#563](https://github.com/feross/standard/issues/563) (1%) 193 | - Disallow renaming import, export, and destructured assignments to the same name ([no-useless-rename](http://eslint.org/docs/rules/no-useless-rename)) [#537](https://github.com/feross/standard/issues/537) (0%) 194 | - Disallow spacing between rest and spread operators and their expressions ([rest-spread-spacing](http://eslint.org/docs/rules/rest-spread-spacing)) [#567](https://github.com/feross/standard/issues/567) (0%) 195 | - Disallow the Unicode Byte Order Mark (BOM) ([unicode-bom](http://eslint.org/docs/rules/unicode-bom)) [#538](https://github.com/feross/standard/issues/538) (0%) 196 | - Disallow assignment to native objects/global variables ([no-global-assign](http://eslint.org/docs/rules/no-global-assign)) [#596](https://github.com/feross/standard/issues/596) (0%) 197 | - Disallow negating the left operand of relational operators ([no-unsafe-negation](http://eslint.org/docs/rules/no-unsafe-negation)) [#595](https://github.com/feross/standard/issues/595) (0%) 198 | - Disallow template literal placeholder syntax in regular strings ([no-template-curly-in-string](http://eslint.org/docs/rules/no-template-curly-in-string)) [#594](https://github.com/feross/standard/issues/594) (0%) 199 | - Disallow tabs in file ([no-tabs](http://eslint.org/docs/rules/no-tabs)) [#593](https://github.com/feross/standard/issues/593) (0%) 200 | 201 | ### Changed rules 202 | 203 | - Relax rule: Allow template literal strings (backtick strings) to avoid escaping [#421](https://github.com/feross/standard/issues/421) 204 | - Relax rule: Do not enforce spacing around * in generator functions (https://github.com/feross/standard/issues/564#issuecomment-234699126) 205 | - This is a temporary workaround for `babel` users who use async generator functions. 206 | 207 | 208 | ## 8.0.0 2016-05-12 209 | 210 | Updated to match the latest `standard` rules and use the latest version of `semistandard-format`. 211 | 212 | ### New Rules 213 | - Require camelCase ([camelcase](http://eslint.org/docs/rules/camelcase)) 214 | - Disallow unnecessary escape usage ([no-useless-escape](http://eslint.org/docs/rules/no-useless-escape)) 215 | - Disallow duplicate imports ([no-duplicate-imports](http://eslint.org/docs/rules/no-duplicate-imports)) 216 | - Disallow unmodified conditions of loops ([no-unmodified-loop-condition](http://eslint.org/docs/2.0.0/rules/no-unmodified-loop-condition)) 217 | - Disallow whitespace before properties ([no-whitespace-before-property](http://eslint.org/docs/2.0.0/rules/no-whitespace-before-property)) 218 | - Disallow control flow statements in `finally` blocks ([no-unsafe-finally](http://eslint.org/docs/rules/no-unsafe-finally)) 219 | - Disallow unnecessary computed property keys on objects ([no-useless-computed-key](http://eslint.org/docs/rules/no-useless-computed-key)) 220 | - Validate spacing before closing bracket in JSX ([react/jsx-space-before-closing](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md)) 221 | 222 | ## 6.1.1 2016-06-17 223 | * Bump standard-engine to 1.8.1, which fixes an NPE. (thanks again @wombleton) 224 | 225 | ## 6.1.0 2015-06-16 226 | * Fix react rules to work again. 227 | * New Rules coming from eslint-config-standard: 228 | * [accessor-pairs](http://eslint.org/docs/rules/accessor-pairs.html) - warns if setters are defined without getters. 229 | * ["one-var": [2, { "initialized": "never" }]](http://eslint.org/docs/rules/one-var.html) - Split initialized 'var' declarations into multiple statements. 230 | 231 | ## 6.0.0 2015-06-03 232 | ### BREAKING CHANGE: New Rules 233 | * [no-extra-semi](http://eslint.org/docs/rules/no-extra-semi) - This rule is aimed at eliminating extra unnecessary semicolons. While not technically an error, extra semicolons can be a source of confusion when reading code. 234 | 235 | * [semi-spacing](http://eslint.org/docs/rules/semi-spacing) - Disallow a space before semicolons and force a space after them. 236 | 237 | ## 5.0.0 2015-05-29 238 | * Updated to `standard` rules 2.0.0 239 | BREAKING CHANGE: new rule [operator-linebreak](http://eslint.org/docs/rules/operator-linebreak.html) set to "after" 240 | 241 | ## 4.3.0 2015-05-29 242 | * Updated to `standard-engine` 1.6.0 243 | * alternate parsers are now supported. See README.md for details! 244 | 245 | ## 4.2.2 2015-05-25 246 | * Since `standard-engine` now supports passing a formatter, we've switched back to using it for the CLI. 247 | 248 | ## 4.2.1 2015-05-25 249 | * Bumped all dependencies to their latest minor versions in package.json 250 | * This includes a fix in `standard-engine` which dramatically speeds up lint times! 251 | 252 | ## 4.2.0 2015-05-20 253 | * Switch to using `eslint-config-semistandard`, which extends `eslint-config-standard`. This means that non-breaking changes in `standard` should automatically get reflected now! 254 | 255 | * Thanks to new collaborator @ricardofbarros, `semistandard` now has a --format (-F) flag! It uses his `semistandard-format` module which is a fork of `standard-format`. Good Stuff! 256 | 257 | ## 4.1.4 2015-05-02 258 | * Merged from `standard`: relax rule `no-alert` 259 | 260 | ## 4.1.3 - 2015-04-23 261 | * Merged from `standard` rules: relax `no-lone-blocks` rule for [ES6 reasons](https://github.com/feross/standard/issues/121) 262 | 263 | ## 4.1.2 - 2015-04-16 264 | * Fixed programmatic usage so it actually works. 265 | 266 | ## 4.1.1 - 2015-04-15 267 | * Update `standard-engine` version to fix crash on absolute filesystem path 268 | 269 | ## 4.1.0 - 2015-04-14 270 | 271 | ### Merged latest from standard 3.6.0: 272 | * Rule turned off: `no-script-url` 273 | * All warning rules changed to error 274 | * Changed `space-before-function-parentheses` to `space-before-function-paren` 275 | * new react rules added 276 | - `"react/jsx-boolean-value": 2` 277 | - `"react/jsx-quotes": [2, "single", "avoid-escape"]` 278 | - `"react/jsx-no-undef": 2` 279 | - `"react/jsx-sort-props": 0` 280 | - `"react/no-unknown-property": 2` 281 | 282 | ### Updates from `standard-engine` 283 | * Ignore linting for all files in `.gitignore`. 284 | * Removed `/git/**` exclusion as its redundant. 285 | * Output errors to stdout instead of stderr. 286 | --------------------------------------------------------------------------------