View scriptlint-fixed2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ scriptlint --strict --fix | |
⧙։⧘ [✔️] ✨ All good | |
// end result: | |
{ | |
"name": "my-cool-project", | |
"version": "1.0.0", | |
… | |
"scripts": { |
View scriptlint-fixed.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⧙։⧘ [warning] Use of unix double ampersand (&&) in script 'test' is not allowed, consider using npm-run-all/run-s (no-unix-double-ampersand) | |
⧙։⧘ [✔️] Fixed 2 issues! | |
// results in … | |
{ | |
"name": "my-cool-project", | |
"version": "1.0.0", | |
… | |
"scripts": { | |
"build": "webpack", |
View scriptlint-strict.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⧙։⧘ [warning] script name "eslint" should start with one of the allowed namespaces (uses-allowed-namespace) | |
⧙։⧘ [warning] scripts must be in alphabetic order (alphabetic-order) | |
⧙։⧘ [warning] Use of unix double ampersand (&&) in script 'test' is not allowed, consider using npm-run-all/run-s (no-unix-double-ampersand) |
View scriptlint-all-good.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ scriptlint | |
⧙։⧘ [✔️] ✨ All good |
View package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my-cool-project", | |
"version": "1.0.0", | |
… | |
"scripts": { | |
"test": "npm run build && npm run eslint", | |
"eslint": "eslint src", | |
"start": "webpack-dev-server", | |
"dev": "npm run start", | |
"build": "webpack" |
View scriptlint.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⧙։⧘ [warning] must contain a "start" script (mandatory-start) | |
⧙։⧘ [warning] must contain a "dev" script (mandatory-dev) | |
⧙։⧘ [warning] `test` script can't be the default script (no-default-test) |
View package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my-cool-project", | |
"version": "1.0.0", | |
… | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"eslint": "eslint src", | |
"start-dev": "webpack-dev-server", | |
"build": "webpack" | |
}, |
View sortClothingSizes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* JS utility function to sort an array of clothing sizes (["M", "S", "XL", "XXS"]) | |
* by size and not alphabetically. | |
* | |
* Usage: | |
``` | |
clothingSizesSort(["S", "M", "XL"]) // should === ["XXS", "S", "M", "XL") | |
``` | |
View class.easy-admin-table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Simplified usage of tables in wordpress plugin admin views. | |
* | |
* @package EasyAdminTable | |
* @author Moritz Jacobs <mail@moritzjacobs.de> | |
* @license GPL-2.0+ | |
* @link http://moritzjacobs.de | |
*/ |
View jquery.select-toggler.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
($ => { | |
/** | |
* jQuery.selectToggler | |
* | |
* replaces a <select><option>… structure with a simple toggle structure | |
* | |
* $("select.foobar").selectToggler(function(el){ | |
* el.addClass("foobar-toggler"); | |
* el.find("> *").addClass("foobar-toggles"); | |
* }) |
NewerOlder