Comments (11)
If i'm honest the implementation for finding the correct config file to use and how it uses it isn't quite right at the moment. Will get around to sorting this out though if nobody puts in a pull request :)
from atom-jshint.
Is it supposed to be .jshint
or .jshintrc
?
from atom-jshint.
It is supposed to be .jshintrc filesβ
Sent from Mailbox
On Fri, May 9, 2014 at 7:45 AM, Adam Tuttle [email protected]
wrote:
Is it supposed to be
.jshint
or.jshintrc
?Reply to this email directly or view it on GitHub:
#30 (comment)
from atom-jshint.
@Joezo I see how config is searched for and loaded here
I wouldn't mind taking a stab at trying to improve it. Did you have anything specific in mind?
from atom-jshint.
Ideally when a file is saved (or being edited) a search would start from the directory of the file open and continue up the tree until a .jshintrc
file is found. This way if you have a different configuration for jshint in a test directory than you do for your project overall, those rules would be respected instead
from atom-jshint.
But this loading and searching for configuration would need to occur each time the active file is changed or saved, not just when atom opens.
from atom-jshint.
I'm not sure the search for config would need to happen each time a file is saved, just when is it opened would suffice? We could keep a hash of what config file is relevant to each open file so that we don't even need to search every time we switch file. Obviously we would need to if a new file was opened. The only concern there is if a file is moved, or a new config file is placed in the folder after the we've already searched. I'm really open to suggestions though and as long as the code works and doesn't slow things down i'd be happy to accept PRs. Please do have a go!
from atom-jshint.
Keeping the hash is a good call. If the hash has a full file path to a config to use then when a file is moved it would be invalidated and a new config would need to be found for it. And when a new .jshintrc is created somewhere in he project the cache could just be invalidated so that searches could take this into account.
from atom-jshint.
Sounds like a good plan to me π
from atom-jshint.
Just found this: https://github.com/tkellen/node-liftoff -- maybe it would be useful here?
from atom-jshint.
This is now resolved and will be usable in the next release
from atom-jshint.
Related Issues (20)
- Uncaught Error: channel closed HOT 3
- Uncaught Error: channel closed
- Uncaught Error: channel closed HOT 5
- Not working HOT 3
- Uncaught TypeError: Invalid Point: (20, NaN)
- Can't parse config file
- Uncaught Error: channel closed
- Uncaught Error: channel closed HOT 2
- [Non-issue] Variable Assignment In For Loops HOT 1
- Labels break JSHint
- Installing β[email protected]β failed.
- Deprecated selector in `atom-jshint\styles\atom-jshint.less` HOT 6
- Uncaught Error: watch ~/workspace/freelancer/vid2gif/backend/.jshintrc ENOSPC
- Deprecated selector in `atom-jshint/styles/atom-jshint.less` HOT 2
- Uncaught Error: Cannot decorate a destroyed marker
- Deprecated calls on all file type
- E002 Bad Option Value
- Who would like to Fork this and continue the dev from there? HOT 7
- Uncaught Error: Channel closed
- none errors HOT 1
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 atom-jshint.