flatlint 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog +9 -0
- package/README.md +7 -7
- package/lib/with-plugins.js +1 -1
- package/package.json +1 -1
- /package/lib/{tklint.js → flatlint.js} +0 -0
package/ChangeLog
ADDED
package/README.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
#
|
|
1
|
+
# FlatLint
|
|
2
2
|
|
|
3
3
|
Token-based JavaScript linter that fixes Syntax Errors
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
npm i
|
|
8
|
+
npm i flatlint
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## API
|
|
12
12
|
|
|
13
13
|
```js
|
|
14
|
-
import {lint, plugins} from '
|
|
14
|
+
import {lint, plugins} from 'flatlint/with-plugins';
|
|
15
15
|
|
|
16
|
-
const [code] =
|
|
16
|
+
const [code] = flatlint(`a && b = c`, {
|
|
17
17
|
plugins,
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -26,9 +26,9 @@ a && (b = c);
|
|
|
26
26
|
Without `fix`:
|
|
27
27
|
|
|
28
28
|
```js
|
|
29
|
-
import {lint, plugins} from '
|
|
29
|
+
import {lint, plugins} from 'flatlint/with-plugins';
|
|
30
30
|
|
|
31
|
-
const [, places] =
|
|
31
|
+
const [, places] = flatlint(`a && b = c`, {
|
|
32
32
|
fix: false,
|
|
33
33
|
plugins,
|
|
34
34
|
});
|
|
@@ -45,7 +45,7 @@ const [, places] = tklint(`a && b = c`, {
|
|
|
45
45
|
When you want to use custom plugins:
|
|
46
46
|
|
|
47
47
|
```js
|
|
48
|
-
import {lint} from '
|
|
48
|
+
import {lint} from 'flatlint';
|
|
49
49
|
|
|
50
50
|
const [code] = lint(`a && b = c`, {
|
|
51
51
|
plugins: [
|
package/lib/with-plugins.js
CHANGED
package/package.json
CHANGED
|
File without changes
|