Skip to content

Commit 4c50014

Browse files
committed
Add tree-r9 additional rule updates
1 parent 8bca9c9 commit 4c50014

File tree

3 files changed

+23
-22
lines changed

3 files changed

+23
-22
lines changed

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,6 +1321,7 @@ Generated by [AVA](https://ava.li).
13211321
"warn",␊
13221322
{␊
13231323
"allow": [␊
1324+
"warn",␊
13241325
"error",␊
13251326
"trace",␊
13261327
"time"␊
@@ -1886,7 +1887,7 @@ Generated by [AVA](https://ava.li).
18861887
0␊
18871888
],␊
18881889
"no-template-curly-in-string": [␊
1889-
"error"␊
1890+
"warn"␊
18901891
],␊
18911892
"no-ternary": [␊
18921893
"off"␊
@@ -2828,7 +2829,7 @@ Generated by [AVA](https://ava.li).
28282829
],␊
28292830
"sonarjs/cognitive-complexity": [␊
28302831
"warn",␊
2831-
25
2832+
50
28322833
],␊
28332834
"sonarjs/max-switch-cases": [␊
28342835
"warn",␊
@@ -3687,9 +3688,6 @@ Generated by [AVA](https://ava.li).
36873688
10:5 warning Test has no assertions jest/expect-expect␊
36883689
10:13 error Test title is used multiple times in the same describe block jest/no-identical-title␊
36893690
3690-
test/lint-output.js␊
3691-
14:7 warning Unexpected console statement no-console␊
3692-
36933691
/home/vetaz/fs-webdev/eslint-config-tree/format-config.js␊
36943692
test/snapshots/new-lint-final-config.json` import/order␊
36953693
7:40 warning Delete `;` prettier/prettier␊
@@ -3699,6 +3697,6 @@ Generated by [AVA](https://ava.li).
36993697
18:96 warning Delete `;` prettier/prettier␊
37003698
20:2 warning Delete `;` prettier/prettier␊
37013699
3702-
77 problems (35 errors, 42 warnings)␊
3700+
76 problems (35 errors, 41 warnings)␊
37033701
4 errors and 6 warnings potentially fixable with the `--fix` option.␊
37043702
`
-27 Bytes
Binary file not shown.

index.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ module.exports = {
1515
* @property {object} rules - Tree custom rule and additional linter configuration.
1616
*/
1717
rules: {
18+
'no-template-curly-in-string': 'warn',
19+
'no-console': ['warn', { allow: ['warn', 'error', 'trace', 'time'] }], // Allow warn on top of what eslint-config-frontier-react allows
20+
1821
'default-case': ['warn'], // frontier has this as error
1922
'lines-between-class-members': 'warn', // frontier has this as error
2023
'no-case-declarations': 'off', // frontier has this as error
@@ -86,7 +89,7 @@ module.exports = {
8689
'promise/no-return-in-finally': 'warn',
8790
'promise/valid-params': 'warn',
8891

89-
'sonarjs/cognitive-complexity': ['warn', 25],
92+
'sonarjs/cognitive-complexity': ['warn', 50],
9093
'sonarjs/max-switch-cases': ['warn', 10],
9194
'sonarjs/no-all-duplicated-branches': 'warn',
9295
'sonarjs/no-collapsible-if': 'warn',
@@ -163,19 +166,19 @@ module.exports = {
163166
// {'name': '$.each', 'use': 'native forEach'}
164167
// ]
165168
},
166-
167-
// overrides: [
168-
// {
169-
// files: ['*.stories.js', '*.test.js', '**/*mock*/**', '*mock*'],
170-
// rules: {
171-
// 'no-alert': 'off',
172-
// 'no-console': 'off',
173-
// 'no-unused-vars': 'off',
174-
// 'sonarjs/no-duplicate-string': 'off',
175-
// 'sonarjs/no-identical-functions': 'off',
176-
// 'test-selectors/button': 'off',
177-
// 'test-selectors/onChange': 'off',
178-
// },
179-
// },
180-
// ],
169+
overrides: [
170+
{
171+
files: ['*.stories.*', '*.test.*', '**/test/**', '**/*mock*/**', '*mock*'],
172+
rules: {
173+
'no-alert': 'off',
174+
'no-console': 'off',
175+
'no-unused-vars': 'warn',
176+
'sonarjs/cognitive-complexity': 'off',
177+
'sonarjs/no-duplicate-string': 'off',
178+
'sonarjs/no-identical-functions': 'off',
179+
'test-selectors/button': 'off',
180+
'test-selectors/onChange': 'off',
181+
},
182+
},
183+
],
181184
}

0 commit comments

Comments
 (0)