-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from betrybe/ajusta-mensagem-feedback
Adiciona listagem de avisos
- Loading branch information
Showing
8 changed files
with
508 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
__tests__/fixtures/eslint-results/multipleWarningsAndErrorsOneFile.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
[ | ||
{ | ||
"filePath": "/front-end/src/App.js", | ||
"messages": [ | ||
{ | ||
"ruleId": "no-console", | ||
"severity": 1, | ||
"message": "Unexpected console statement.", | ||
"line": 7, | ||
"column": 3, | ||
"nodeType": "MemberExpression", | ||
"messageId": "unexpected", | ||
"endLine": 7, | ||
"endColumn": 14 | ||
}, | ||
{ | ||
"ruleId": "no-alert", | ||
"severity": 1, | ||
"message": "Unexpected alert.", | ||
"line": 28, | ||
"column": 44, | ||
"nodeType": "CallExpression", | ||
"messageId": "unexpected", | ||
"endLine": 28, | ||
"endColumn": 68 | ||
}, | ||
{ | ||
"ruleId": "eol-last", | ||
"severity": 2, | ||
"message": "Newline required at end of file but not found.", | ||
"line": 33, | ||
"column": 20, | ||
"nodeType": "Program", | ||
"messageId": "missing", | ||
"fix": { | ||
"range": [ | ||
774, | ||
774 | ||
], | ||
"text": "\n" | ||
} | ||
} | ||
], | ||
"errorCount": 1, | ||
"warningCount": 2, | ||
"fixableErrorCount": 1, | ||
"fixableWarningCount": 0, | ||
"source": "import React from 'react';\nimport logo from './logo.svg';\nimport './App.css';\nimport Greeting from './components/Greeting';\n\nfunction App() {\n console.log('Rendering App..');\n\n return (\n <div className=\"App\">\n <header className=\"App-header\">\n <img src={logo} className=\"App-logo\" alt=\"logo\" />\n <p>\n Edit\n <code>src/App.js</code>\n and save to reload.\n </p>\n <a\n className=\"App-link\"\n href=\"https://reactjs.org\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Learn React\n </a>\n </header>\n <Greeting name=\"Alex\" />\n <button type=\"button\" onClick={() => alert('You clicked me!')}>Click me!</button>\n </div>\n );\n}\n\nexport default App;" | ||
}, | ||
{ | ||
"filePath": "/front-end/src/components/Greeting.js", | ||
"messages": [], | ||
"errorCount": 0, | ||
"warningCount": 0, | ||
"fixableErrorCount": 0, | ||
"fixableWarningCount": 0 | ||
}, | ||
{ | ||
"filePath": "/front-end/src/index.js", | ||
"messages": [], | ||
"errorCount": 0, | ||
"warningCount": 0, | ||
"fixableErrorCount": 0, | ||
"fixableWarningCount": 0 | ||
}, | ||
{ | ||
"filePath": "/front-end/src/setupTests.js", | ||
"messages": [], | ||
"errorCount": 0, | ||
"warningCount": 0, | ||
"fixableErrorCount": 0, | ||
"fixableWarningCount": 0 | ||
} | ||
] |
78 changes: 78 additions & 0 deletions
78
__tests__/fixtures/eslint-results/multipleWarningsMultipleFiles.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
[ | ||
{ | ||
"filePath": "/front-end/src/App.js", | ||
"messages": [ | ||
{ | ||
"ruleId": "no-console", | ||
"severity": 1, | ||
"message": "Unexpected console statement.", | ||
"line": 7, | ||
"column": 3, | ||
"nodeType": "MemberExpression", | ||
"messageId": "unexpected", | ||
"endLine": 7, | ||
"endColumn": 14 | ||
}, | ||
{ | ||
"ruleId": "no-alert", | ||
"severity": 1, | ||
"message": "Unexpected alert.", | ||
"line": 28, | ||
"column": 44, | ||
"nodeType": "CallExpression", | ||
"messageId": "unexpected", | ||
"endLine": 28, | ||
"endColumn": 68 | ||
} | ||
], | ||
"errorCount": 0, | ||
"warningCount": 2, | ||
"fixableErrorCount": 0, | ||
"fixableWarningCount": 0, | ||
"source": "import React from 'react';\nimport logo from './logo.svg';\nimport './App.css';\nimport Greeting from './components/Greeting';\n\nfunction App() {\n console.log('Rendering App..');\n\n return (\n <div className=\"App\">\n <header className=\"App-header\">\n <img src={logo} className=\"App-logo\" alt=\"logo\" />\n <p>\n Edit\n <code>src/App.js</code>\n and save to reload.\n </p>\n <a\n className=\"App-link\"\n href=\"https://reactjs.org\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Learn React\n </a>\n </header>\n <Greeting name=\"Alex\" />\n <button type=\"button\" onClick={() => alert('You clicked me!')}>Click me!</button>\n </div>\n );\n}\n\nexport default App;\n" | ||
}, | ||
{ | ||
"filePath": "/front-end/src/components/Greeting.js", | ||
"messages": [ | ||
{ | ||
"ruleId": "comma-dangle", | ||
"severity": 1, | ||
"message": "Missing trailing comma.", | ||
"line": 7, | ||
"column": 36, | ||
"nodeType": "Property", | ||
"messageId": "missing", | ||
"endLine": 8, | ||
"endColumn": 1, | ||
"fix": { | ||
"range": [ | ||
183, | ||
183 | ||
], | ||
"text": "," | ||
} | ||
} | ||
], | ||
"errorCount": 0, | ||
"warningCount": 1, | ||
"fixableErrorCount": 0, | ||
"fixableWarningCount": 1, | ||
"source": "import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Greeting = ({ name }) => <h1>{`Hello, ${name}`}</h1>;\n\nGreeting.propTypes = {\n name: PropTypes.string.isRequired\n};\n\nexport default Greeting;\n" | ||
}, | ||
{ | ||
"filePath": "/front-end/src/index.js", | ||
"messages": [], | ||
"errorCount": 0, | ||
"warningCount": 0, | ||
"fixableErrorCount": 0, | ||
"fixableWarningCount": 0 | ||
}, | ||
{ | ||
"filePath": "/front-end/src/setupTests.js", | ||
"messages": [], | ||
"errorCount": 0, | ||
"warningCount": 0, | ||
"fixableErrorCount": 0, | ||
"fixableWarningCount": 0 | ||
} | ||
] |
58 changes: 58 additions & 0 deletions
58
__tests__/fixtures/eslint-results/multipleWarningsOneFile.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[ | ||
{ | ||
"filePath": "/front-end/src/App.js", | ||
"messages": [ | ||
{ | ||
"ruleId": "no-console", | ||
"severity": 1, | ||
"message": "Unexpected console statement.", | ||
"line": 7, | ||
"column": 3, | ||
"nodeType": "MemberExpression", | ||
"messageId": "unexpected", | ||
"endLine": 7, | ||
"endColumn": 14 | ||
}, | ||
{ | ||
"ruleId": "no-alert", | ||
"severity": 1, | ||
"message": "Unexpected alert.", | ||
"line": 28, | ||
"column": 44, | ||
"nodeType": "CallExpression", | ||
"messageId": "unexpected", | ||
"endLine": 28, | ||
"endColumn": 68 | ||
} | ||
], | ||
"errorCount": 0, | ||
"warningCount": 2, | ||
"fixableErrorCount": 0, | ||
"fixableWarningCount": 0, | ||
"source": "import React from 'react';\nimport logo from './logo.svg';\nimport './App.css';\nimport Greeting from './components/Greeting';\n\nfunction App() {\n console.log('Rendering App..');\n\n return (\n <div className=\"App\">\n <header className=\"App-header\">\n <img src={logo} className=\"App-logo\" alt=\"logo\" />\n <p>\n Edit\n <code>src/App.js</code>\n and save to reload.\n </p>\n <a\n className=\"App-link\"\n href=\"https://reactjs.org\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Learn React\n </a>\n </header>\n <Greeting name=\"Alex\" />\n <button type=\"button\" onClick={() => alert('You clicked me!')}>Click me!</button>\n </div>\n );\n}\n\nexport default App;\n" | ||
}, | ||
{ | ||
"filePath": "/front-end/src/components/Greeting.js", | ||
"messages": [], | ||
"errorCount": 0, | ||
"warningCount": 0, | ||
"fixableErrorCount": 0, | ||
"fixableWarningCount": 0 | ||
}, | ||
{ | ||
"filePath": "/front-end/src/index.js", | ||
"messages": [], | ||
"errorCount": 0, | ||
"warningCount": 0, | ||
"fixableErrorCount": 0, | ||
"fixableWarningCount": 0 | ||
}, | ||
{ | ||
"filePath": "/front-end/src/setupTests.js", | ||
"messages": [], | ||
"errorCount": 0, | ||
"warningCount": 0, | ||
"fixableErrorCount": 0, | ||
"fixableWarningCount": 0 | ||
} | ||
] |
Oops, something went wrong.