Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@clicktime/eslint-config
Advanced tools
Clicktime ESLint config utilizing Airbnb, Flow/TypeScript, Prettier, Jest, React and React Native.
Plugins and configs used:
npm install @clicktime/eslint-config --save-dev
or yarn add @clicktime/eslint-config --dev
"lint:js": "eslint FOLDER_TO_APPLY_ESLINT --ext .js,.ts,.tsx,.jsx --cache",
"lint:js:fix": "eslint FOLDER_TO_APPLY_ESLINT --ext .js,.ts,.tsx,.jsx --fix",
"lint:js:errors": "eslint FOLDER_TO_APPLY_ESLINT --ext .js,.ts,.tsx,.jsx --cache --quiet",
Note: if eslint
isn't recognized try using npx eslint
, eg: "lint:js": "npx eslint src --ext .js,.ts,.tsx,.jsx --cache",
Note: replace FOLDER_TO_APPLY_ESLINT
with your source folder, eg: src
.eslintcache
to the .gitignore
file (auto-generated with the --cache
option)Create the file .eslintrc.js
or add '@clicktime'
to your current ESLint config file (eg: .eslintrc.js
, .eslintrc
, or eslintConfig
)
// .eslintrc.js
module.exports = {
extends: ['@clicktime'],
parserOptions: {
// optional if using Typescript
project: './tsconfig.json',
tsconfigRootDir: './',
},
};
// .eslintrc.js
module.exports = {
extends: ['@clicktime/eslint-config/node'],
parserOptions: {
// optional if using Typescript
project: './tsconfig.json',
tsconfigRootDir: './',
},
settings: {
jest: { version: '99' }, // add this if jest isn't installed
},
};
// .eslintrc.js
module.exports = {
extends: ['@clicktime/eslint-config/angularJS']
};
Add these extensions to VSCode so it can work well with Prettier and ESLint when saving files:
Create the following file .editorconfig
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
indent_style = tab
indent_size = 2
Create the following file bitbucket-pipelines.yml
to run the linters in Bitbucket pipelines
image: node:12
pipelines:
default:
- step:
name: Install and run linter
caches:
- node
script:
- node -v
- npm install
- npm run lint:js
artifacts:
- node_modules/**
Note: image: node:12
should be the version of nodejs
we are using in the repository, eg: image: node:14
, image: node:latest
, etc
Create the following file gitlab-ci.yml
to run the linters in Gitlab
image: node:latest
stages:
- linter
linter:
stage: linter
script:
- npm install
- npm run lint:js
npm
"@clicktime/eslint-config": "git+ssh://git@gitlab.clicktime.com:administrators/eslint-config-clicktime.git#USE_SOME_HASH",
FAQs
ESLint preset extending Airbnb, Prettier and Jest
The npm package @clicktime/eslint-config receives a total of 1 weekly downloads. As such, @clicktime/eslint-config popularity was classified as not popular.
We found that @clicktime/eslint-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.