@change-org/eslint-plugin-change

3.2.0 • Public • Published

eslint-plugin-change

Custom lint rules for change javascript repos.

Setup

npm install

Available rules

change/prefer-object-spread-to-lodash

Valid

_.extend(foo, { bar: 'baz' });
_.assignIn(foo, { bar: 'baz' });
_.extend({}, ...foo);
_.assignIn({}, ...foo);

Invalid

_.extend({}, foo, { bar: 'baz' });
_.assignIn({}, foo, { bar: 'baz' });
Suggested fix
{
  ...foo,
  bar: 'baz',
};

Development

Run tests

npm test

Creating a new rule

Writing your rule

TODO

https://astexplorer.net/ is very helpful here.

Testing your rule

See https://eslint.org/docs/developer-guide/nodejs-api#ruletester

Readme

Keywords

none

Package Sidebar

Install

npm i @change-org/eslint-plugin-change

Weekly Downloads

442

Version

3.2.0

License

MIT

Unpacked Size

9.23 kB

Total Files

11

Last publish

Collaborators

  • jlouis-change
  • quaelin
  • mwilliams-change
  • mdimas