Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #23 from AtomLinter/feature/handle-errors
Browse files Browse the repository at this point in the history
Prevent on lint parse errors on empty files
  • Loading branch information
DanPurdy committed Jan 26, 2016
2 parents 49bfe3e + ea26fb3 commit 94db2f4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.0.3
- Unexpected parse errors and sass-lint issues are just reported as lint errors rather than the annoying red box of doom
- this will be updated in 1.1.0 to improve the way these are reported and handled, for now the errors will be logged to the console.

### 1.0.2
- Update eslint-config-airbnb to version 4.0.0

Expand Down
16 changes: 8 additions & 8 deletions lib/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,14 @@ module.exports =
range: [[lineIdx, 0], [lineIdx, colEndIdx]]
]
else
atom.notifications.addError """
**sass-lint had a problem**
Please consider filing an issue with [linter-sass-lint](https://github.com/AtomLinter/linter-sass-lint)
or [sass-lint](https://github.com/sasstools/sass-lint) including the text below and any other
information possible.
#{error.stack}
""", {dismissable: true}
# Leaving this here to allow people to report the errors
console.log('linter-sass-lint', error)
return [
type: 'Error'
text: 'Unexpected parse error in file'
filePath: filePath
range: [[lineIdx, 0], [lineIdx, colEndIdx]]
]
return []

if result then return result.messages.map (msg) ->
Expand Down

0 comments on commit 94db2f4

Please sign in to comment.