![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
eslint-config-vast
Advanced tools
Readme
ESLint shareable config Vast's JavaScript coding standards
This config can be used for linting server-side and client-side JavaScript.
If you are using React, extend this config with eslint-config-vast-react to add support for React's specific JSX syntax, and to add additional checks for React, JSX, and accessibility.
npm install eslint-config-vast --save-dev
For Node.js environment (ES6):
Create .eslintrc
file in the root of your project with the following settings:
{
"extends": "eslint-config-vast",
"rules": {
// Your overrides...
}
}
For browser environment with ES6/ES7/ES8 to ES5 transpiler:
Create an additional .eslintrc
file in a client-side code folder (e.g. client/.eslintrc
) with the following settings:
{
"env": {
"browser": true
},
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 8
},
"globals": {
"GLOBAL1": false,
"GLOBAL2": false
}
}
For browser environment without ES6/ES7/ES8 to ES5 transpiler:
Create an additional .eslintrc
file in a client-side code folder (e.g. client/.eslintrc
) with the following settings:
{
"env": {
"browser": true,
"es6": false
},
"globals": {
"GLOBAL1": false,
"GLOBAL2": false
},
"rules": {
// Disable es6-related rules for es5 environment
"object-shorthand": 0,
"prefer-arrow-callback": 0,
"prefer-template": 0,
"prefer-spread": 0,
"prefer-rest-params": 0
}
}
If you haven’t already set up ESLint on your project, run:
npm install eslint --save-dev
Add scripts to package.json
(remember to change paths):
"scripts": {
"lint:js": "eslint app tests *.js --ext .js --ext .jsx --ignore-pattern 'js/vendor'",
"lint:js:fix": "npm run eslint -- --fix",
}
Run npm run lint:js
to lint the code.
Run npm run lint:js:fix
to automatically fix as many issues as possible. Another way to autoformat the code is with the editor plugin, such as ESLint-Formatter for Sublime Text.
To add a Git pre-commit hook for ESLint, run:
npm install pre-commit --save-dev
...and add this to package.json
:
"pre-commit": [
"eslint"
]
Tip: For real-time linting in your text editor, see ESLint integrations for editors. In order to use this config in editor, you'll have to install ESLint and all dependencies globally (with -g
flag).
Tip: You can create a personal configuration file in your home directory (~/.eslintrc
), it will only be used if no other configuration files are found. See Configuration Cascading and Hierarchy.
MIT © 2016 Vast.com, Inc.
FAQs
ESLint shareable config for Vast's JavaScript coding standards
The npm package eslint-config-vast receives a total of 9 weekly downloads. As such, eslint-config-vast popularity was classified as not popular.
We found that eslint-config-vast 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.