Skip to content

Commit df981f9

Browse files
feat: Include plugin in configs (DianaSuvorova#56)
* feat: specify plugin in recommended config * test: assert recommended config includes plugin
1 parent 2d0d49b commit df981f9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

index.js

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ module.exports = {
2828
rules,
2929
configs: {
3030
recommended: {
31+
plugins: ['react-redux'],
3132
rules: {
3233
'react-redux/connect-prefer-minimum-two-arguments': 0,
3334
'react-redux/connect-prefer-named-arguments': 2,
@@ -43,6 +44,7 @@ module.exports = {
4344
},
4445
},
4546
all: {
47+
plugins: ['react-redux'],
4648
rules: activeRulesConfig,
4749
},
4850
},

tests/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ describe('all rule files should be exported by the plugin', () => {
2222
describe('configurations', () => {
2323
it('should export a \'recommended\' configuration', () => {
2424
assert(plugin.configs.recommended);
25+
assert(plugin.configs.recommended.plugins.includes('react-redux'));
2526
Object.keys(plugin.configs.recommended.rules).forEach((configName) => {
2627
assert.equal(configName.indexOf('react-redux/'), 0);
2728
const ruleName = configName.substring('react-redux/'.length);
@@ -30,6 +31,7 @@ describe('configurations', () => {
3031
});
3132
it('should export a \'all\' configuration', () => {
3233
assert(plugin.configs.all);
34+
assert(plugin.configs.all.plugins.includes('react-redux'));
3335
Object.keys(plugin.configs.all.rules).forEach((configName) => {
3436
assert.equal(configName.indexOf('react-redux/'), 0);
3537
assert.equal(plugin.configs.all.rules[configName], 2);

0 commit comments

Comments
 (0)