Comments (7)
For me, on windows, it's a shell script:
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@"
ret=$?
else
node "$basedir/../eslint/bin/eslint.js" "$@"
ret=$?
fi
exit $ret
from eslint-formatter.
#17 hasn't been released yet.
This is an interesting issue. I wonder why calling node_modules/.bin/eslint
would cause errors. It should just be a symlink to the file in node_modules/eslint/bin
:
lrwxr-xr-x 1 me staff 23B Jun 30 01:56 eslint -> ../eslint/bin/eslint.js
from eslint-formatter.
Look at that, I just learned something new about npm on windows.
I'd happily accept a pull request for this case. I unfortunately don't have any easy way to test and validate that functionality.
from eslint-formatter.
I mean, I'm not sure why on windows it makes a shell file of all things, but hey!
I'll try changing it to search for node_modules/eslint/bin/eslint
instead of node_modules/.bin/eslint
and see if it works for me.
from eslint-formatter.
I'm thinking we'd likely want to continue running the normal .bin/eslint
file on non-windows platforms. I'm kinda leaning towards the "If it aint broke, don't fix it" mentality. Especially since we haven't figured out how to write tests for this repo.
from eslint-formatter.
The default global path on windows is already eslint/bin/eslint
, but the other OSes go to the generic bin folder.
Do you want me to make a pull request that duplicates the eslint_path
setting for local search paths? I imagine it'd look like:
// The location to search for a locally installed eslint package
// If this is not found, it will try to use the global package (see 'eslint_path')
"local_eslint_path": {
"windows": "./node_modules/eslint/bin/eslint",
"linux": "./node_modules/.bin/eslint",
"osx": "./node_modules/.bin/eslint"
},
from eslint-formatter.
Yeah, that seems like a reasonable approach, thanks.
from eslint-formatter.
Related Issues (20)
- Programmatically find Node and ESLint directory HOT 2
- Default eslint_path for Windows 10 Pro 64bit on Sublime Text 3 does not seem to work when there is a "whitespace" (aka a "space") inside profile user name. HOT 2
- Feature request - Exclude folders from formatting
- Files with starting dot in the name are ignored
- Support package.json eslintConfig
- Vue SFC doesn't format missing commas HOT 1
- reload on fix HOT 1
- Jumps to top of file randomly HOT 1
- eslint command-line options support HOT 2
- How to set NODE_ENV or BABEL_ENV in formatter config
- Global name 'data' is not defined HOT 5
- Error panel popping on save HOT 4
- Vue SFC Error HOT 1
- Performance HOT 4
- How to selectively run Eslint-Formatter ("On save" mode) on particular files HOT 1
- Babel 7 upgrade HOT 1
- Slow performance creating new file?
- `eslint_d` instance per Sublime Window causing performance issues
- spawn node ENOENT HOT 1
- Error: Failed to load plugin 'import'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-formatter.