@change-org/eslint-plugin-change
v3.2.0
Published
Eslint rules for change javascript repos
Downloads
2,666
Keywords
Readme
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