-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
The problem I want to solve.
In Meteor the location of a file implies the values of Meteor.isClient
and Meteor.isServer
. It also determines whether some methods are available or not, e.g. Meteor.publish
is only available if the file is located in project/server/
, but not if it's in project/client/
or project/client/server
. To enable rules that correctly understand the context of the file, it is essential to know the root directory of the project, which is usually the same as the topmost .eslintrc
in the directory tree.
My solution to the problem
This is a feature request similar to getFilename
. In #686 the filename was added as metadata that is passed to rules. The filename consists of the full path. It would be useful to be able to get the full path of the topmost .eslintrc
file (e.g. the one that has root: true
). A method for this could be getRootConfigPath
.
Basically, this is just some more metadata for rules. What are your thoughts on this?