ember-eslint-parser 0.1.1 → 0.2.0
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/package.json +3 -2
- package/src/preprocessor/noop.js +8 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-eslint-parser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"repository": {
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"author": "",
|
|
12
12
|
"exports": {
|
|
13
|
-
".": "./src/parser/gjs-gts-parser.js"
|
|
13
|
+
".": "./src/parser/gjs-gts-parser.js",
|
|
14
|
+
"./noop": "./src/preprocessor/noop.js"
|
|
14
15
|
},
|
|
15
16
|
"main": "src/parser/gjs-gts-parser.js",
|
|
16
17
|
"files": [
|
package/src/preprocessor/noop.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* this preprocessor is setup by our recommended rules for gjs/gts, so it will always be called for it
|
|
4
4
|
* the flow is the following:
|
|
5
5
|
* 1. gjs/gts files goes through our parses, which calls registerParsedFile, if its not correctly setup, registerParsedFile will not be called
|
|
6
|
-
* 2. postprocess checks if the file is registered and if not throws an error
|
|
6
|
+
* 2. postprocess checks if the file is registered and if not throws an error
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -16,16 +16,13 @@ module.exports = {
|
|
|
16
16
|
preprocess: null,
|
|
17
17
|
postprocess: (messages, fileName) => {
|
|
18
18
|
const msgs = messages.flat();
|
|
19
|
-
if (
|
|
20
|
-
msgs
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
msgs[0].message +=
|
|
27
|
-
'To lint Gjs/Gts files please follow the setup guide at https://github.com/ember-cli/eslint-plugin-ember#gtsgjs';
|
|
28
|
-
}
|
|
19
|
+
if (!parsedFiles.has(fileName)) {
|
|
20
|
+
msgs[0] = msgs[0] || {
|
|
21
|
+
message: '',
|
|
22
|
+
};
|
|
23
|
+
msgs[0].message += '\n';
|
|
24
|
+
msgs[0].message +=
|
|
25
|
+
'To lint Gjs/Gts files please follow the setup guide at https://github.com/ember-cli/eslint-plugin-ember#gtsgjs';
|
|
29
26
|
}
|
|
30
27
|
parsedFiles.delete(fileName); // required for tests
|
|
31
28
|
return msgs;
|