Comments (10)
I got the same error on version 0.4.0, goes wrong here: https://github.com/mdevils/node-jscs/blob/master/lib/checker.js#L27. Haven't looked into it any further.
from gulp-jscs.
I thought it is my fault from #14 pull-request, in which I wanted to update jscs depency and I followed @deepak1556's advice here #14 (comment) and I think that all (except tests) went bad after this.
from gulp-jscs.
I think in file: https://github.com/sindresorhus/gulp-jscs/blob/master/index.js#L13
checker.configure(config ? require(config) : configFile.load('.jscsrc', process.cwd()));
Should be:
checker.configure(configFile.load(config || '.jscsrc', process.cwd()));
from gulp-jscs.
What @Thomasdezeeuw suggested shld actually be enough as cli-config.js
does the path resolving based on the directory provided or defaults to process.cwd() https://github.com/mdevils/node-jscs/blob/master/lib/cli-config.js#L19. So even better checker.configure(configFile.load(config || '.jscsrc'))
from gulp-jscs.
I tried checker.configure(configFile.load(config || '.jscsrc', process.cwd()));
and checker.configure(configFile.load(config || '.jscsrc'))
and no one works for me with the same error:
/Users/vstarkov/projects/box/node_modules/gulp/node_modules/orchestrator/index.js:153
throw err;
from gulp-jscs.
Same problem here...
from gulp-jscs.
FYI: this is caused by an breaking change in the update version of jscs. The default file name used to be .jscs.json
. It's now .jscsrc
. Change your file name, and you'll be all set.
from gulp-jscs.
The default file name used to be .jscs.json. It's now .jscsrc. Change your file name, and you'll be all set.
I changed it in my #14 pull-request and shit happens
from gulp-jscs.
thank you
from gulp-jscs.
If anybody still get this error like this:
vstarkov@vstarkov-osx nodeChan(master)$ gulp jscs
[gulp] Using gulpfile /Users/vstarkov/projects/nodeChan/gulpfile.js
[gulp] Starting 'jscs'...
[gulp] 'jscs' errored after 45 ms Unexpected token }
/Users/vstarkov/projects/nodeChan/node_modules/gulp/node_modules/orchestrator/index.js:153
throw err;
^
SyntaxError: Unexpected token }
at Object.parse (native)
at Object.exports.getContent (/Users/vstarkov/projects/nodeChan/node_modules/gulp-jscs/node_modules/jscs/lib/cli-config.js:55:28)
at Object.exports.load (/Users/vstarkov/projects/nodeChan/node_modules/gulp-jscs/node_modules/jscs/lib/cli-config.js:83:20)
at module.exports (/Users/vstarkov/projects/nodeChan/node_modules/gulp-jscs/index.js:13:35)
at Gulp.getType (/Users/vstarkov/projects/nodeChan/gulpfile.js:28:11)
at module.exports (/Users/vstarkov/projects/nodeChan/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:31:7)
at Gulp.Orchestrator._runTask (/Users/vstarkov/projects/nodeChan/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/vstarkov/projects/nodeChan/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/Users/vstarkov/projects/nodeChan/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
at /usr/local/lib/node_modules/gulp/bin/gulp.js:77:20
it is because of 77 line in gulp.js, you can fix this error by installing latest gulp globally and locally.
@sindresorhus maybe this should be noted in README?
from gulp-jscs.
Related Issues (20)
- Incompatibility with harmony-reflect HOT 1
- Support values other than true/false HOT 1
- Stop .pipe() chain on linting error?
- Unclear error when .jscsrc is missing HOT 5
- Cannot read property 'tokTypes' of undefined - urgent
- Allow indented "break" in "switch" statement. HOT 2
- install broken due to downstream dependency left-pad being unpublished HOT 2
- JSCS errors getting swallowed somewhere HOT 6
- Cannot convert undefined or null to object HOT 5
- Update to JSCS 3.0 HOT 1
- file.jscs.errors is an object not an array
- How can I use fix:true with a watch?
- JSCS reporter compatibility HOT 2
- JSCS unreasonably complain about the beginning of a js file HOT 1
- Integration with Sonar rules
- jscs domain has expired
- editorconfig + jscs
- Replace deprecated dependency gulp-util
- Linting solution incompatible with 'engines' field in package.json
- TypeError: Cannot convert undefined or null to object at Function.keys HOT 4
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 gulp-jscs.