Skip to content

Commit

Permalink
Revert README changes removing Sublime workaround. path.resolve did…
Browse files Browse the repository at this point in the history
… not fix.

This reverts commit 2f82fd1.
  • Loading branch information
benmosher committed Dec 9, 2015
1 parent 64ba5c0 commit 5bcfe75
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All the goodness that the ES2015+ static module syntax intends to provide, marked up in your editor.

**IF YOU ARE USING THIS WITH SUBLIME**: see the [bottom section](#sublimelinter-eslint) for important info.

## Rules

* Ensure imports point to a file/module that can be resolved. ([`no-unresolved`](#no-unresolved))
Expand Down Expand Up @@ -408,3 +410,36 @@ settings:

import/parser: esprima-fb # default is 'babylon'. change if needed.
```

## SublimeLinter-eslint

Recently, SublimeLinter-eslint introduced a change to support `.eslintignore` files
which altered the way file paths are passed to ESLint when linting during editing.

See roadhump/SublimeLinter-eslint#58 for more details, but essentially, you may find
you need to add the following to a `.sublimelinterrc` file:

```json
{
"linters": {
"eslint": {
"args": ["--stdin-filename", "@"]
}
}
}
```

I also found that I needed to set `rc_search_limit` to `null`, which removes the file
hierarchy search limit when looking up the directory tree for `.sublimelinterrc`:

In Package Settings / SublimeLinter / User Settings:
```json
{
"user": {
"rc_search_limit": null
}
}
```

I believe this defaults to `3`, so you may not need to alter it depending on your
project folder max depth.

0 comments on commit 5bcfe75

Please sign in to comment.