
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
eslint-prettier-boilerplate
Advanced tools
Starter repository for a JS project using Prettier formatting.
Starter repository for a JS project using ESLint and Prettier recommended rules and styles.
Clone the Git repository.
git clone https://github.com/travishorn/eslint-prettier-boilerplate.git
Install the dependencies.
npm install
Since you are probably using this as a base for a new project, you probably also want to remove the origin
remote.
git remote remove origin
You may also want to remove the git tags.
For *nix, run
git tag | xargs -L 1 | xargs git tag --delete
For Windows, run
FOR /f "tokens=*" %a in ('git tag') DO git tag -d %a
Start developing.
Any files with extension .js
can be linted against ESLint and Prettier
recommended rules.
npm run lint
You can automatically fix some problems.
npm run lint:fix
If you're using Visual Studio Code, you can install the ESLint extension, which will automatically highlight warnings and errors using this boilerplate.
With this extension, you can also choose to automatically fix/format your code when you save. Add the following to your Visual Studio Code settings.
"eslint.autoFixOnSave": true
This setting only takes effect if files.autoSave
is set to off
,
onFocusChange
, or onWindowChange
.
Initialize an npm package.
npm init -y
Install development dependencies
npm i -D eslint eslint-config-prettier eslint-plugin-prettier prettier
Create .eslintrc.js
in project root.
module.exports = {
"extends": [
"eslint:recommended",
"plugin:prettier/recommended"
],
"env": {
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 8
}
};
Copyright 2019 Travis Horn
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Starter repository for a JS project using Prettier formatting.
The npm package eslint-prettier-boilerplate receives a total of 0 weekly downloads. As such, eslint-prettier-boilerplate popularity was classified as not popular.
We found that eslint-prettier-boilerplate 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.