Skip to content

Commit fc219cb

Browse files
committed
Some more babylon rules added
1 parent a55bf39 commit fc219cb

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

demo/test/snapshots/lint-output.js.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Generated by [AVA](https://ava.li).
271271
"never"␊
272272
],␊
273273
"consistent-return": [␊
274-
"error"␊
274+
"off"␊
275275
],␊
276276
"consistent-this": [␊
277277
"off"␊
@@ -2214,10 +2214,10 @@ Generated by [AVA](https://ava.li).
22142214
}␊
22152215
],␊
22162216
"promise/always-return": [␊
2217-
"warn"␊
2217+
"off"␊
22182218
],␊
22192219
"promise/avoid-new": [␊
2220-
"warn"␊
2220+
"off"␊
22212221
],␊
22222222
"promise/catch-or-return": [␊
22232223
"warn",␊
@@ -3632,11 +3632,8 @@ Generated by [AVA](https://ava.li).
36323632
25:1 warning Missing JSDoc @returns description jsdoc/require-returns-description␊
36333633
25:1 warning Missing JSDoc @returns type jsdoc/require-returns-type␊
36343634
27:71 error 'params' is defined but never used no-unused-vars␊
3635-
29:19 warning Avoid creating new promises promise/avoid-new␊
36363635
31:1 warning Expected catch() or return promise/catch-or-return␊
36373636
31:17 error 'a' is defined but never used no-unused-vars␊
3638-
31:20 error Expected to return a value at the end of arrow function consistent-return␊
3639-
32:3 warning Each then() should return a value or throw promise/always-return␊
36403637
32:7 warning Unexpected constant condition no-constant-condition␊
36413638
33:5 warning Avoid wrapping return values in Promise.resolve promise/no-return-wrap␊
36423639
35:5 error 'forgotToDefine' is not defined no-undef␊
@@ -3697,6 +3694,9 @@ Generated by [AVA](https://ava.li).
36973694
18:96 warning Delete `;` prettier/prettier␊
36983695
20:2 warning Delete `;` prettier/prettier␊
36993696
3700-
✖ 76 problems (35 errors, 41 warnings)␊
3701-
4 errors and 6 warnings potentially fixable with the `--fix` option.␊
3697+
/home/vetaz/fs-webdev/eslint-config-tree/index.js␊
3698+
46:5 warning Delete `⏎····` prettier/prettier␊
3699+
3700+
✖ 74 problems (34 errors, 40 warnings)␊
3701+
4 errors and 7 warnings potentially fixable with the `--fix` option.␊
37023702
`
-76 Bytes
Binary file not shown.

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ module.exports = {
1515
* @property {object} rules - Tree custom rule and additional linter configuration.
1616
*/
1717
rules: {
18+
'consistent-return': 'off', // Annoying in useEffects
19+
'promise/always-return': 'off', // This is off in babylon by Rose 2 years ago. I think it should be off too.
20+
'promise/avoid-new': 'off', // This has been off in babylon for 15 months already
21+
1822
'no-template-curly-in-string': 'warn',
1923
'no-console': ['warn', { allow: ['warn', 'error', 'trace', 'time'] }], // Allow warn on top of what eslint-config-frontier-react allows
2024

@@ -39,15 +43,14 @@ module.exports = {
3943

4044
'bestpractices/no-eslint-disable': 'warn',
4145

42-
'promise/always-return': 'warn',
46+
4347
'promise/no-return-wrap': 'warn',
4448
'promise/param-names': 'warn',
4549
'promise/catch-or-return': ['warn', { allowFinally: true }],
4650
'promise/no-native': 'off',
4751
'promise/no-nesting': 'warn',
4852
'promise/no-promise-in-callback': 'warn',
4953
'promise/no-callback-in-promise': 'warn',
50-
'promise/avoid-new': 'warn',
5154
'promise/no-new-statics': 'warn',
5255
'promise/no-return-in-finally': 'warn',
5356
'promise/valid-params': 'warn',

0 commit comments

Comments
 (0)