Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
eslint-config-onelint
Advanced tools
This sharable eslint config is derived from the style which the JavaScript developers at One.com use for internal as well as open source projects.
To start using the linter in a project start by installing eslint and this module:
$ npm install --save-dev eslint eslint-config-onelint
Then add a eslint config file to your project, named .eslintrc.js
:
module.exports = {
extends: [
'onelint'
]
};
Now you can lint your files by running the following command in the root of your project.
$ eslint .
... or if eslint is not on your path:
$ ./node_modules/.bin/eslint .
For convenience, you can add it as a script in package.json's scripts section,
to make it available as npm run lint
.
Obviously, the goal is to deviate as little as possible from the presets given in this configuration. But sometimes your projects may have global variables that are specific to that particular project, or maybe large parts of legacy code that you don't want to rewrite.
Because onelint is shipping as a sharable eslint configuration, you can extend
it by adding new rules, overwriting rules or defining new globals in the
.eslintrc.js
just as you would, if you used eslint exclusively.
See Configuring ESLint in the eslint docs.
Setting up eslint integration in your editor is all that is needed. You can find a guide most editor in the integrations section of the eslint user guide. Recommended settings for common editors can be found below.
The Atom editor plugin is called linter-eslint and is built on the AtomLinter framework. It is available directly in your editor, or in the package archives on atom.io.
Eslint is supported out of the box in Syntastic. Add this in your .vimrc to let Syntastic pick the right configuration for your project.
function SetSyntasticEsLint()
let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_javascript_eslint_exec = '/{{root of your project}}/node_modules/.bin/eslint'
endfunction
au BufRead,BufNewFile /home/dpi/Documents/professional-services/* call SetSyntasticEsLint()
(Probably works for Sublime Text 2 as well...)
FAQs
eslint configuration for one.com code style
The npm package eslint-config-onelint receives a total of 1,246 weekly downloads. As such, eslint-config-onelint popularity was classified as popular.
We found that eslint-config-onelint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.