Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit cf38df0

Browse files
JamesHenrynzakas
authored andcommitted
Chore: Update README.md (#3)
1 parent 8a142ca commit cf38df0

File tree

2 files changed

+21
-46
lines changed

2 files changed

+21
-46
lines changed

README.md

Lines changed: 20 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1-
Escope ([escope](http://github.com/estools/escope)) is
2-
[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
3-
scope analyzer extracted from [esmangle project](http://github.com/estools/esmangle).
1+
# ESLint Scope
42

5-
[![Build Status](https://travis-ci.org/estools/escope.png?branch=master)](https://travis-ci.org/estools/escope)
3+
ESLint Scope is the [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) scope analyzer used in ESLint. It is a fork of [escope](http://github.com/estools/escope).
64

7-
### Example
5+
## Usage
6+
7+
Install:
8+
9+
```
10+
npm i eslint-scope --save
11+
```
12+
13+
Example:
814

915
```js
10-
var escope = require('escope');
16+
var eslintScope = require('eslint-scope');
1117
var esprima = require('esprima');
1218
var estraverse = require('estraverse');
1319

1420
var ast = esprima.parse(code);
15-
var scopeManager = escope.analyze(ast);
21+
var scopeManager = eslintScope.analyze(ast);
1622

1723
var currentScope = scopeManager.acquire(ast); // global scope
1824

@@ -34,46 +40,15 @@ estraverse.traverse(ast, {
3440
});
3541
```
3642

37-
### Document
38-
39-
Generated JSDoc is [here](http://estools.github.io/escope/).
40-
41-
### Demos and Tools
42-
43-
Demonstration is [here](http://mazurov.github.io/escope-demo/) by [Sasha Mazurov](https://github.com/mazurov) (twitter: [@mazurov](http://twitter.com/mazurov)). [issue](https://github.com/estools/escope/issues/14)
44-
45-
![Demo](https://f.cloud.github.com/assets/75759/462920/7aa6dd40-b4f5-11e2-9f07-9f4e8d0415f9.gif)
46-
47-
48-
And there are tools constructed on Escope.
49-
50-
- [Esmangle](https://github.com/estools/esmangle) is a minifier / mangler / optimizer.
51-
- [Eslevels](https://github.com/mazurov/eslevels) is a scope levels analyzer and [SublimeText plugin for scope context coloring](https://github.com/mazurov/sublime-levels) is constructed on it.
52-
- [Esgoggles](https://github.com/keeyipchan/esgoggles) is JavaScript code browser.
53-
54-
55-
### License
43+
## Contributing
5644

57-
Copyright (C) 2012-2013 [Yusuke Suzuki](http://github.com/Constellation)
58-
(twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.
45+
Issues and pull requests will be triaged and responded to as quickly as possible. We operate under the [ESLint Contributor Guidelines](http://eslint.org/docs/developer-guide/contributing), so please be sure to read them before contributing. If you're not sure where to dig in, check out the [issues](https://github.com/eslint/eslint-scope/issues).
5946

60-
Redistribution and use in source and binary forms, with or without
61-
modification, are permitted provided that the following conditions are met:
47+
## Build Commands
6248

63-
* Redistributions of source code must retain the above copyright
64-
notice, this list of conditions and the following disclaimer.
49+
* `npm test` - run all linting and tests
50+
* `npm run lint` - run all linting
6551

66-
* Redistributions in binary form must reproduce the above copyright
67-
notice, this list of conditions and the following disclaimer in the
68-
documentation and/or other materials provided with the distribution.
52+
## License
6953

70-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
71-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
72-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
73-
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
74-
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
75-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
76-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
77-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
78-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
79-
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54+
ESLint Scope is licensed under a permissive BSD 2-clause license.

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ gulp.task('browserify', [ 'build' ], function () {
9494
.pipe(gulp.dest('build'))
9595
});
9696

97-
gulp.task('test', [ 'build' ], function () {
97+
gulp.task('test', [ 'lint', 'build' ], function () {
9898
return gulp.src(TEST)
9999
.pipe(mocha({
100100
reporter: 'spec',

0 commit comments

Comments
 (0)