mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Also fixes a bug in audit-argument-checks where it would show errors in non-meteor blocks. BREAKING CHANGE: Envs specified through comments are now restricted to client and server.
17 lines
389 B
JavaScript
17 lines
389 B
JavaScript
import stripPathPrefix from './stripPathPrefix'
|
|
const getRootPath = require('./getRootPath')
|
|
|
|
export default function (filename) {
|
|
// '<input>' is ESLint's default filename when the real one is not known
|
|
if (filename === '<input>') {
|
|
return false
|
|
}
|
|
|
|
const rootPath = getRootPath(filename)
|
|
|
|
if (!rootPath) {
|
|
return false
|
|
}
|
|
return stripPathPrefix(rootPath, filename)
|
|
}
|