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": { |
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", |
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) |
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 |
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" |
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) |
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" | |
}, |
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") | |
``` | |
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 <[email protected]> | |
* @license GPL-2.0+ | |
* @link http://moritzjacobs.de | |
*/ |
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