We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f7ed93 commit ac58a9aCopy full SHA for ac58a9a
tests/index.test.js
@@ -1,5 +1,15 @@
1
-const { rules } = require('../lib/index');
+const { rules, configs } = require('../lib/index');
2
3
it('should have all the rules', () => {
4
expect(rules).toMatchSnapshot();
5
});
6
+
7
+it('should have a recommended config with recommended rules', () => {
8
+ for (const [name, rule] of Object.entries(rules)) {
9
+ if (rule.meta.docs.recommended) {
10
+ expect(configs.recommended.rules).toHaveProperty(name, 'error');
11
+ } else {
12
+ expect(configs.recommended.rules).not.toHaveProperty(name);
13
+ }
14
15
+});
0 commit comments