![Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts](https://cdn.sanity.io/images/cgdhsj6q/production/961d431fdd53c410d9d320bccdf279bdf6066d4a-1024x1024.webp?w=400&fit=max&auto=format)
Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
eslint-plugin-vue-2-object-reactivity
Advanced tools
These rules aim to solve the problem with Vue 2 Object Reactivity
These rules aim to solve the problem with Vue 2 Object Reactivity.
mutations
is a property, for example:
export default new Vuex.Store<{ object: { [key: string]: string } }>({
//...
mutations: {
setPropOnObject(state, { prop, val }: { prop: string; val: string }) {
state.object[prop] = val; // <== this will be reported as error
Vue.set(state.object, prop, val); // <== this is correct/expected
},
},
});
mutations
is a variable (not necessarily used in Vuex.Store
, just searching for the name "mutations"), for example:
const mutations: {
setPropOnObject(state, { prop, val }: { prop: string; val: string }) {
state.object[prop] = val; // <== this will be reported as error
Vue.set(state.object, prop, val); // <== this is correct/expected
},
};
Install this plugin:
npm i eslint-plugin-vue-2-object-reactivity
Add to your .eslintrc.js
config:
module.exports = {
plugins: ["vue-2-object-reactivity"],
rules: {
"vue-2-object-reactivity/require-vue-set": "error",
},
};
Try it out:
npm run lint
In this project:
npm link
In Vue 2 TS project:
Using config:
module.exports = {
plugins: ["vue-2-object-reactivity"],
rules: {
"vue-2-object-reactivity/require-vue-set": "error",
},
};
npm ci
npm link "eslint-plugin-vue-2-object-reactivity"
npm run lint
or, to enable verbose output:
export DEBUG=true # to enable verbose output
eslint src/store.ts
See these:
This will only work with TypeScript because we need to know that we're dealing with
Actually, we probably can make it work with JS, because we don't really use TS features right now...Vuex.Store
.
Bootstrapped with https://dev.to/bwca/create-a-custom-eslint-rule-with-typescript-4j3d See also: https://dev.to/alexgomesdev/writing-custom-typescript-eslint-rules-how-i-learned-to-love-the-ast-15pn and https://github.com/amzn/eslint-plugin-no-date-parsing
FAQs
These rules aim to solve the problem with Vue 2 Object Reactivity
The npm package eslint-plugin-vue-2-object-reactivity receives a total of 0 weekly downloads. As such, eslint-plugin-vue-2-object-reactivity popularity was classified as not popular.
We found that eslint-plugin-vue-2-object-reactivity 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 a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.