eslint-plugin-misc

ESLint plugin

This project is maintained by iliubinskii

typescript/no-unsafe-object-assign

ESLint plugin / typescript/no-unsafe-object-assign

Disallows unsafe “Object.assign”.

module.exports = {
  plugins: ["misc"],
  rules: {
    "misc/typescript/no-unsafe-object-assign": "error"
  }
};

Examples of incorrect code

const x = { value: 1 } as const;

Object.assign(x, { value: 2 });

Examples of correct code

const x = { value: 1 };

Object.assign(x, { value: 2 });