Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
gulp-lintspaces
Advanced tools
A thin wrapper of lintspaces
If you're looking for a gruntjs task to validate your files, take a look at this one:
This package is available on npm
as: gulp-lintspaces
npm install gulp-lintspaces
var gulp = require("gulp");
var lintspaces = require("gulp-lintspaces");
gulp.task("YOURTASK", function() {
return gulp.src("**/*.js")
.pipe(lintspaces(/* options */))
.pipe(lintspaces.reporter());
});
Tests for newlines at the end of all files. Default value is false
.
newline: true
Test for the maximum amount of newlines between code blocks. Default value is
false
. To enable this validation a number larger than 0
is expected.
newlineMaximum: 2
Tests for useless whitespaces (trailing whitespaces) at each lineending of all
files. Default value is false
.
trailingspaces: true
Tests for correct indentation using tabs or spaces. Default value is false
.
To enable indentation check use the value 'tabs'
or 'spaces'
.
indentation: 'tabs'
If the indentation option is set to 'spaces'
, there is also the possibility
to set the amount of spaces per indentation using the spaces
option. Default value is 4
.
indentation: 'spaces',
spaces: 2
Use the ignores
option when special lines such as comments should be ignored.
Provide an array of regular expressions to the ignores
property.
ignores: [
/\/\*[\s\S]*?\*\//g,
/foo bar/g
]
There are some build in ignores for comments which you can apply by using these strings:
(build in strings and userdefined regular expressions are mixable in the
ignores
array)
ignores: [
'js-comments',
/foo bar/g
]
Feel free to contribute some new regular expressions as build in!
It's possible to overwrite the default and given options by setting up a path
to an external editorconfig file by unsing the editorconfig
option. For a basic
configuration of a .editorconfig file check out the
EditorConfig Documentation.
editorconfig: '.editorconfig'
The following .editorconfig values are supported:
insert_final_newline
will check if a newline is setindent_style
will check the indentationindent_size
will check the amount of spacestrim_trailing_whitespace
will check for useless whitespacesFeel free to contribute. Please run all the tests and validation tasks befor you offer a pull request.
Run make test
to run the tests and validation tasks.
This is a fork of the original gulp-lintspaces
by @ck86 which was deleted from Github and npm.
FAQs
gulp plugin for lintspaces
The npm package gulp-lintspaces receives a total of 371 weekly downloads. As such, gulp-lintspaces popularity was classified as not popular.
We found that gulp-lintspaces demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.