Skip to content

Commit 2eabc03

Browse files
committed
Make test work on other machines
1 parent bdb726c commit 2eabc03

File tree

5 files changed

+58
-53
lines changed

5 files changed

+58
-53
lines changed

demo/example.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,10 @@ switch (1) {
111111
default:
112112
break;
113113
}
114+
115+
export const hi = {
116+
/**
117+
* @note - This produces Invalid JSDoc tag name "note".eslintjsdoc/check-tag-names
118+
*/
119+
rawr: 7
120+
};

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

Lines changed: 49 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -10,54 +10,55 @@ Generated by [AVA](https://ava.li).
1010
1111
`␊
1212
example.js␊
13-
8:0 error Inline eslint-disable found bestpractices/no-eslint-disable␊
14-
10:1 warning Unexpected 'FIXME' comment: 'fixMe: Actually make this work' no-warning-comments␊
15-
11:1 warning Unexpected 'TODO' comment: 'todo: Add documentation' no-warning-comments␊
16-
12:1 warning Unexpected 'HACK' comment: 'Hack: Note that these work, regardless...' no-warning-comments␊
17-
13:1 warning Unexpected 'HERE BE DRAGONS' comment: 'Here be Dragons' no-warning-comments␊
18-
15:10 error 'functionWithoutJSDocWarningsBecauseTheSectionWasCompletelyExcluded' is defined but never used no-unused-vars␊
19-
20:1 warning Remove the @description tag to leave a plain block description or add additional description text above the @description line jsdoc/require-description␊
20-
20:1 warning JSDoc @returns declaration present but return expression not available in function jsdoc/require-returns-check␊
21-
20:1 warning JSDoc type missing brace valid-jsdoc␊
22-
22:0 warning Expected @param names to be "params". Got "a, params, b" jsdoc/check-param-names␊
23-
22:0 warning Missing JSDoc @param "a" description jsdoc/require-param-description␊
24-
23:0 warning Missing JSDoc @param "params" description jsdoc/require-param-description␊
25-
23:0 warning Missing JSDoc @param "params" type jsdoc/require-param-type␊
26-
24:0 warning Missing JSDoc @param "b" description jsdoc/require-param-description␊
27-
24:0 warning Missing JSDoc @param "b" type jsdoc/require-param-type␊
28-
25:0 warning Missing JSDoc @returns description jsdoc/require-returns-description␊
29-
25:0 warning Missing JSDoc @returns type jsdoc/require-returns-type␊
30-
30:19 warning Avoid creating new promises promise/avoid-new␊
31-
32:1 warning Expected catch() or return promise/catch-or-return␊
32-
33:3 warning Each then() should return a value or throw promise/always-return␊
33-
33:7 error Unexpected constant condition no-constant-condition␊
34-
34:5 warning Avoid wrapping return values in Promise.resolve promise/no-return-wrap␊
35-
36:5 error 'forgotToDefine' is not defined no-undef␊
36-
40:7 error 'variable' is assigned a value but never used no-unused-vars␊
37-
40:18 warning This conditional operation returns the same value whether the condition is "true" or "false" sonarjs/no-all-duplicated-branches␊
38-
40:18 error Unnecessary use of boolean literals in conditional expression no-unneeded-ternary␊
39-
40:19 error Unexpected constant condition no-constant-condition␊
40-
42:5 warning Correct one of the identical sub-expressions on both sides of operator "&&" sonarjs/no-identical-expressions␊
41-
42:16 warning Unexpected use of undefined no-undefined␊
42-
42:40 warning Unexpected use of undefined no-undefined␊
43-
42:53 error 'params' is not defined no-undef␊
44-
43:3 warning This function expects 1 argument, but 2 were provided sonarjs/no-extra-arguments␊
45-
44:28 error Module path/to/legacyModule is deprecated. Use module x instead deprecate/import␊
46-
46:3 error Function deprecatedFunction is deprecated. Use function x from package y instead deprecate/function␊
47-
46:3 error 'deprecatedFunction' is not defined no-undef␊
48-
48:3 error Member expression $.each is deprecated. Use native forEach instead deprecate/member-expression␊
49-
48:3 error '$' is not defined no-undef␊
50-
50:3 error Unexpected 'debugger' statement no-debugger␊
51-
50:3 error Unreachable code no-unreachable␊
52-
63:10 warning Update this function so that its implementation is not identical to the one on line 55 sonarjs/no-identical-functions␊
53-
71:1 warning Remove this conditional structure or edit its code blocks so that they're not all the same sonarjs/no-all-duplicated-branches␊
54-
71:5 warning {"message":"This always evaluates to truthy. Consider refactoring this code.","secondaryLocations":[]} sonarjs/no-gratuitous-expressions␊
55-
71:5 error Unexpected constant condition no-constant-condition␊
56-
78:1 warning Reduce the number of non-empty switch cases from 11 to at most 10 sonarjs/max-switch-cases␊
57-
82:5 warning Expected a default case default-case␊
58-
82:5 warning Refactor the code to eliminate this nested "switch" sonarjs/no-nested-switch␊
59-
87:7 error This case's code block is the same as the block for the case on line 83 sonarjs/no-duplicated-branches␊
60-
87:7 error Duplicate case label no-duplicate-case␊
13+
8:0 error Found eslint-disable without " -- comment" bestpractices/no-eslint-disable␊
14+
10:1 warning Unexpected 'FIXME' comment: 'fixMe: Actually make this work' no-warning-comments␊
15+
11:1 warning Unexpected 'TODO' comment: 'todo: Add documentation' no-warning-comments␊
16+
12:1 warning Unexpected 'HACK' comment: 'Hack: Note that these work, regardless...' no-warning-comments␊
17+
13:1 warning Unexpected 'HERE BE DRAGONS' comment: 'Here be Dragons' no-warning-comments␊
18+
15:10 error 'functionWithoutJSDocWarningsBecauseTheSectionWasCompletelyExcluded' is defined but never used no-unused-vars␊
19+
20:1 warning Remove the @description tag to leave a plain block description or add additional description text above the @description line jsdoc/require-description␊
20+
20:1 warning JSDoc @returns declaration present but return expression not available in function jsdoc/require-returns-check␊
21+
20:1 warning JSDoc type missing brace valid-jsdoc␊
22+
22:0 warning Expected @param names to be "params". Got "a, params, b" jsdoc/check-param-names␊
23+
22:0 warning Missing JSDoc @param "a" description jsdoc/require-param-description␊
24+
23:0 warning Missing JSDoc @param "params" description jsdoc/require-param-description␊
25+
23:0 warning Missing JSDoc @param "params" type jsdoc/require-param-type␊
26+
24:0 warning Missing JSDoc @param "b" description jsdoc/require-param-description␊
27+
24:0 warning Missing JSDoc @param "b" type jsdoc/require-param-type␊
28+
25:0 warning Missing JSDoc @returns description jsdoc/require-returns-description␊
29+
25:0 warning Missing JSDoc @returns type jsdoc/require-returns-type␊
30+
30:19 warning Avoid creating new promises promise/avoid-new␊
31+
32:1 warning Expected catch() or return promise/catch-or-return␊
32+
33:3 warning Each then() should return a value or throw promise/always-return␊
33+
33:7 error Unexpected constant condition no-constant-condition␊
34+
34:5 warning Avoid wrapping return values in Promise.resolve promise/no-return-wrap␊
35+
36:5 error 'forgotToDefine' is not defined no-undef␊
36+
40:7 error 'variable' is assigned a value but never used no-unused-vars␊
37+
40:18 warning This conditional operation returns the same value whether the condition is "true" or "false" sonarjs/no-all-duplicated-branches␊
38+
40:18 error Unnecessary use of boolean literals in conditional expression no-unneeded-ternary␊
39+
40:19 error Unexpected constant condition no-constant-condition␊
40+
42:5 warning Correct one of the identical sub-expressions on both sides of operator "&&" sonarjs/no-identical-expressions␊
41+
42:16 warning Unexpected use of undefined no-undefined␊
42+
42:40 warning Unexpected use of undefined no-undefined␊
43+
42:53 error 'params' is not defined no-undef␊
44+
43:3 warning This function expects 1 argument, but 2 were provided sonarjs/no-extra-arguments␊
45+
44:28 error Module path/to/legacyModule is deprecated. Use module x instead deprecate/import␊
46+
46:3 error Function deprecatedFunction is deprecated. Use function x from package y instead deprecate/function␊
47+
46:3 error 'deprecatedFunction' is not defined no-undef␊
48+
48:3 error Member expression $.each is deprecated. Use native forEach instead deprecate/member-expression␊
49+
48:3 error '$' is not defined no-undef␊
50+
50:3 error Unexpected 'debugger' statement no-debugger␊
51+
50:3 error Unreachable code no-unreachable␊
52+
63:10 warning Update this function so that its implementation is not identical to the one on line 55 sonarjs/no-identical-functions␊
53+
71:1 warning Remove this conditional structure or edit its code blocks so that they're not all the same sonarjs/no-all-duplicated-branches␊
54+
71:5 warning {"message":"This always evaluates to truthy. Consider refactoring this code.","secondaryLocations":[]} sonarjs/no-gratuitous-expressions␊
55+
71:5 error Unexpected constant condition no-constant-condition␊
56+
78:1 warning Reduce the number of non-empty switch cases from 11 to at most 10 sonarjs/max-switch-cases␊
57+
82:5 warning Expected a default case default-case␊
58+
82:5 warning Refactor the code to eliminate this nested "switch" sonarjs/no-nested-switch␊
59+
87:7 error This case's code block is the same as the block for the case on line 83 sonarjs/no-duplicated-branches␊
60+
87:7 error Duplicate case label no-duplicate-case␊
61+
117:0 warning Invalid JSDoc tag name "note" jsdoc/check-tag-names␊
6162
6263
example.json␊
6364
4:6 error Property keys must be doublequoted json/undefined␊
@@ -75,9 +76,6 @@ Generated by [AVA](https://ava.li).
7576
test/lint-output.js␊
7677
12:7 warning Unexpected console statement no-console␊
7778
78-
/Users/clif/sandbox/frontier/common/eslint-config-tree/index.js␊
79-
52:0 warning Invalid JSDoc tag name "note" jsdoc/check-tag-names␊
80-
8179
✖ 59 problems (25 errors, 34 warnings)␊
8280
0 errors and 2 warnings potentially fixable with the `--fix` option.␊
8381
`
-28 Bytes
Binary file not shown.

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module.exports = {
4949
parser: 'babel-eslint',
5050
/**
5151
* @property {object} plugins - Tree additional linter plugins.
52-
* @note - Code Climate does not yet support bestpractices, deprecate, no-only-tests, no-skip-tests, sonarjs, and test-selectors, and breaks if they are present. You will need to add these plugins individually in your .eslintrc.js file. The first time you add a file, Code Climate will complain about not being able to find the definitions for these extra rules once for every new file. Obnoxious, but the best we have, for now.
52+
Code Climate does not yet support bestpractices, deprecate, no-only-tests, no-skip-tests, sonarjs, and test-selectors, and breaks if they are present. You will need to add these plugins individually in your .eslintrc.js file. The first time you add a file, Code Climate will complain about not being able to find the definitions for these extra rules once for every new file. Obnoxious, but the best we have, for now.
5353
*/
5454
plugins: [
5555
// 'eslint-plugin-bestpractices',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"preinstall": "git config --global url.https://github.com/.insteadOf git://github.com/",
6161
"postinstall": "npm rebuild husky",
6262
"test": "npm run lint:snapshot; ava",
63-
"test:format": "sed -i '' 's|^.*eslint-config-tree/demo/||g' demo/test/snapshots/new-lint-results.txt",
63+
"test:format": "sed -i 's|^.*/demo/||g' demo/test/snapshots/new-lint-results.txt",
6464
"test:update": "npm run lint:snapshot; ava --update-snapshots"
6565
}
6666
}

0 commit comments

Comments
 (0)