@@ -6,8 +6,6 @@ It finds namespaces used in a JavaScript file and insert/remove `goog.provide`,
6
6
[ ![ npm version] [ npm-image ]] [ npm-url ]
7
7
![ Node.js Version Support] [ node-version ]
8
8
[ ![ Build Status] [ ci-image ]] [ ci-url ]
9
- [ ![ Dependency Status] [ deps-image ]] [ deps-url ]
10
- [ ![ Coverage Status] [ coverage-image ]] [ coverage-url ]
11
9
![ License] [ license ]
12
10
13
11
## Install
@@ -22,10 +20,10 @@ The following code `goog.require()`s an unused namespace `goog.unused`, also `go
22
20
23
21
``` javascript
24
22
// foo.js (before)
25
- goog .provide (' goog.foo.Bar' );
23
+ goog .provide (" goog.foo.Bar" );
26
24
27
- goog .require (' goog.foo' );
28
- goog .require (' goog.unused' );
25
+ goog .require (" goog.foo" );
26
+ goog .require (" goog.unused" );
29
27
30
28
goog .foo .Bar = function () {
31
29
goog .foo .baz ();
@@ -63,10 +61,10 @@ Fixed: 1 files
63
61
64
62
``` javascript
65
63
// foo.js (fixed)
66
- goog .provide (' goog.foo.Bar' );
64
+ goog .provide (" goog.foo.Bar" );
67
65
68
- goog .require (' goog.foo' );
69
- goog .require (' goog.missing' );
66
+ goog .require (" goog.foo" );
67
+ goog .require (" goog.missing" );
70
68
71
69
goog .foo .Bar = function () {
72
70
goog .foo .baz ();
@@ -165,9 +163,9 @@ fixclosure reads "hint" for lint from special comments in your code.
165
163
fixclosure doesn't remove any ` goog.provide ` and ` goog.require ` with this hint.
166
164
167
165
``` javascript
168
- goog .provide (' goog.foo' ); // fixclosure: ignore
166
+ goog .provide (" goog.foo" ); // fixclosure: ignore
169
167
170
- goog .require (' goog.bar' ); // fixclosure: ignore
168
+ goog .require (" goog.bar" ); // fixclosure: ignore
171
169
```
172
170
173
171
In the above, ` goog.provide('goog.foo') ` will not removed by fixclosure even if it isn't provided in the file.
@@ -214,14 +212,13 @@ The hint affects only _next_ line.
214
212
215
213
MIT License: Teppei Sato
< [email protected] >
216
214
217
- [ npm-image ] : https://img.shields.io /npm/v/fixclosure.svg
215
+ [ npm-image ] : https://badgen.net /npm/v/fixclosure?icon=npm&label=
218
216
[ npm-url ] : https://npmjs.org/package/fixclosure
219
- [ npm-downloads-image ] : https://img.shields.io/npm/dm/fixclosure.svg
220
217
[ ci-image ] : https://github.com/teppeis/fixclosure/workflows/ci/badge.svg
221
218
[ ci-url ] : https://github.com/teppeis/fixclosure/actions?query=workflow%3A%22ci%22
222
- [ deps-image ] : https://david-dm.org/ teppeis/fixclosure.svg
219
+ [ deps-image ] : https://badgen.net/david/dep/ teppeis/fixclosure
223
220
[ deps-url ] : https://david-dm.org/teppeis/fixclosure
224
- [ node-version ] : https://img.shields.io/badge/Node.js%20support-v10+-brightgreen.svg
221
+ [ node-version ] : https://badgen.net/npm/node/fixclosure
225
222
[ coverage-image ] : https://coveralls.io/repos/github/teppeis/fixclosure/badge.svg?branch=master
226
223
[ coverage-url ] : https://coveralls.io/github/teppeis/fixclosure?branch=master
227
- [ license ] : https://img.shields.io /npm/l/eslint-config-teppeis.svg
224
+ [ license ] : https://badgen.net /npm/license/fixclosure
0 commit comments