@atlaspack/validator-eslint 2.14.5-canary.20 → 2.14.5-canary.200

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.md CHANGED
@@ -1,5 +1,206 @@
1
1
  # @atlaspack/validator-eslint
2
2
 
3
+ ## 2.14.31
4
+
5
+ ### Patch Changes
6
+
7
+ - [#785](https://github.com/atlassian-labs/atlaspack/pull/785) [`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922) Thanks [@matt-koko](https://github.com/matt-koko)! - We need to re-publish every package in Atlaspack with the corrected types field.
8
+
9
+ - Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922)]:
10
+ - @atlaspack/diagnostic@2.14.4
11
+ - @atlaspack/plugin@2.14.31
12
+ - @atlaspack/utils@2.19.3
13
+
14
+ ## 2.14.30
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies []:
19
+ - @atlaspack/utils@2.19.2
20
+ - @atlaspack/plugin@2.14.30
21
+
22
+ ## 2.14.29
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies []:
27
+ - @atlaspack/utils@2.19.1
28
+ - @atlaspack/plugin@2.14.29
29
+
30
+ ## 2.14.28
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767)]:
35
+ - @atlaspack/utils@2.19.0
36
+ - @atlaspack/plugin@2.14.28
37
+
38
+ ## 2.14.27
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies []:
43
+ - @atlaspack/utils@2.18.4
44
+ - @atlaspack/plugin@2.14.27
45
+
46
+ ## 2.14.26
47
+
48
+ ### Patch Changes
49
+
50
+ - [#742](https://github.com/atlassian-labs/atlaspack/pull/742) [`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd) Thanks [@yamadapc](https://github.com/yamadapc)! - Internal changes and bug fixes to environmentDeduplication flag
51
+
52
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
53
+ - @atlaspack/diagnostic@2.14.3
54
+ - @atlaspack/plugin@2.14.26
55
+ - @atlaspack/utils@2.18.3
56
+
57
+ ## 2.14.25
58
+
59
+ ### Patch Changes
60
+
61
+ - Updated dependencies []:
62
+ - @atlaspack/utils@2.18.2
63
+ - @atlaspack/plugin@2.14.25
64
+
65
+ ## 2.14.24
66
+
67
+ ### Patch Changes
68
+
69
+ - Updated dependencies []:
70
+ - @atlaspack/utils@2.18.1
71
+ - @atlaspack/plugin@2.14.24
72
+
73
+ ## 2.14.23
74
+
75
+ ### Patch Changes
76
+
77
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
78
+ - @atlaspack/utils@2.18.0
79
+ - @atlaspack/plugin@2.14.23
80
+
81
+ ## 2.14.22
82
+
83
+ ### Patch Changes
84
+
85
+ - [#720](https://github.com/atlassian-labs/atlaspack/pull/720) [`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94) Thanks [@alshdavid](https://github.com/alshdavid)! - Migrate to TypeScript
86
+
87
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
88
+ - @atlaspack/diagnostic@2.14.2
89
+ - @atlaspack/plugin@2.14.22
90
+ - @atlaspack/utils@2.17.4
91
+
92
+ ## 2.14.21
93
+
94
+ ### Patch Changes
95
+
96
+ - Updated dependencies []:
97
+ - @atlaspack/utils@2.17.3
98
+ - @atlaspack/plugin@2.14.21
99
+
100
+ ## 2.14.20
101
+
102
+ ### Patch Changes
103
+
104
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
105
+ - @atlaspack/plugin@2.14.20
106
+ - @atlaspack/utils@2.17.2
107
+
108
+ ## 2.14.19
109
+
110
+ ### Patch Changes
111
+
112
+ - Updated dependencies []:
113
+ - @atlaspack/utils@2.17.1
114
+ - @atlaspack/plugin@2.14.19
115
+
116
+ ## 2.14.18
117
+
118
+ ### Patch Changes
119
+
120
+ - Updated dependencies [[`dbb4072`](https://github.com/atlassian-labs/atlaspack/commit/dbb40721ebeb45990a14ba04e6b44e7f836fb32d), [`de23e0c`](https://github.com/atlassian-labs/atlaspack/commit/de23e0ce49d5504fe3947ac26640a3d951087da3), [`18a57cf`](https://github.com/atlassian-labs/atlaspack/commit/18a57cf8a4789b2de5ad8e2676f317a26cc91417), [`a5ed1b4`](https://github.com/atlassian-labs/atlaspack/commit/a5ed1b414498560f393ff491af4da25b6e8dde56)]:
121
+ - @atlaspack/utils@2.17.0
122
+ - @atlaspack/plugin@2.14.18
123
+
124
+ ## 2.14.17
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies []:
129
+ - @atlaspack/utils@2.16.1
130
+ - @atlaspack/plugin@2.14.17
131
+
132
+ ## 2.14.16
133
+
134
+ ### Patch Changes
135
+
136
+ - Updated dependencies [[`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
137
+ - @atlaspack/utils@2.16.0
138
+ - @atlaspack/plugin@2.14.16
139
+
140
+ ## 2.14.15
141
+
142
+ ### Patch Changes
143
+
144
+ - Updated dependencies []:
145
+ - @atlaspack/utils@2.15.3
146
+ - @atlaspack/plugin@2.14.15
147
+
148
+ ## 2.14.14
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies []:
153
+ - @atlaspack/utils@2.15.2
154
+ - @atlaspack/plugin@2.14.14
155
+
156
+ ## 2.14.13
157
+
158
+ ### Patch Changes
159
+
160
+ - Updated dependencies []:
161
+ - @atlaspack/utils@2.15.1
162
+ - @atlaspack/plugin@2.14.13
163
+
164
+ ## 2.14.12
165
+
166
+ ### Patch Changes
167
+
168
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
169
+ - @atlaspack/utils@2.15.0
170
+ - @atlaspack/plugin@2.14.12
171
+
172
+ ## 2.14.11
173
+
174
+ ### Patch Changes
175
+
176
+ - Updated dependencies []:
177
+ - @atlaspack/utils@2.14.11
178
+ - @atlaspack/plugin@2.14.11
179
+
180
+ ## 2.14.10
181
+
182
+ ### Patch Changes
183
+
184
+ - Updated dependencies []:
185
+ - @atlaspack/plugin@2.14.10
186
+ - @atlaspack/utils@2.14.10
187
+
188
+ ## 2.14.9
189
+
190
+ ### Patch Changes
191
+
192
+ - Updated dependencies []:
193
+ - @atlaspack/utils@2.14.9
194
+ - @atlaspack/plugin@2.14.9
195
+
196
+ ## 2.14.8
197
+
198
+ ### Patch Changes
199
+
200
+ - Updated dependencies []:
201
+ - @atlaspack/utils@2.14.8
202
+ - @atlaspack/plugin@2.14.8
203
+
3
204
  ## 2.14.7
4
205
 
5
206
  ### Patch Changes
@@ -33,14 +33,19 @@ function _assert() {
33
33
  return data;
34
34
  }
35
35
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
36
+ // @ts-expect-error TS7016
37
+
36
38
  // For eslint <8.0.0
39
+ // @ts-expect-error TS7034
37
40
  let cliEngine = null;
38
41
  // For eslint >=8.0.0
42
+ // @ts-expect-error TS7034
39
43
  let eslintEngine = null;
40
44
  var _default = exports.default = new (_plugin().Validator)({
41
45
  async validate({
42
46
  asset
43
47
  }) {
48
+ // @ts-expect-error TS7005
44
49
  if (!cliEngine && !eslintEngine) {
45
50
  if (_eslint().default.ESLint) {
46
51
  eslintEngine = new (_eslint().default.ESLint)({});
@@ -50,9 +55,13 @@ var _default = exports.default = new (_plugin().Validator)({
50
55
  }
51
56
  let code = await asset.getCode();
52
57
  let results;
58
+ // @ts-expect-error TS7005
53
59
  if (cliEngine != null) {
60
+ // @ts-expect-error TS7005
54
61
  results = cliEngine.executeOnText(code, asset.filePath).results;
62
+ // @ts-expect-error TS7005
55
63
  } else if (eslintEngine != null) {
64
+ // @ts-expect-error TS7005
56
65
  results = await eslintEngine.lintText(code, {
57
66
  filePath: asset.filePath
58
67
  });
@@ -68,6 +77,7 @@ var _default = exports.default = new (_plugin().Validator)({
68
77
  let codeframe = {
69
78
  filePath: asset.filePath,
70
79
  code: result.source,
80
+ // @ts-expect-error TS7006
71
81
  codeHighlights: result.messages.map(message => {
72
82
  let start = {
73
83
  line: message.line,
@@ -90,8 +100,10 @@ var _default = exports.default = new (_plugin().Validator)({
90
100
  codeFrames: [codeframe]
91
101
  };
92
102
  if (result.errorCount > 0) {
103
+ // @ts-expect-error TS2345
93
104
  validatorResult.errors.push(diagnostic);
94
105
  } else {
106
+ // @ts-expect-error TS2345
95
107
  validatorResult.warnings.push(diagnostic);
96
108
  }
97
109
  }
@@ -0,0 +1,3 @@
1
+ import { Validator } from '@atlaspack/plugin';
2
+ declare const _default: Validator;
3
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/validator-eslint",
3
- "version": "2.14.5-canary.20+30f60175b",
3
+ "version": "2.14.5-canary.200+10ee3fa5b",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,15 +9,16 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/atlassian-labs/atlaspack.git"
11
11
  },
12
- "main": "lib/EslintValidator.js",
13
- "source": "src/EslintValidator.js",
12
+ "main": "./lib/EslintValidator.js",
13
+ "source": "./src/EslintValidator.ts",
14
+ "types": "./lib/types/EslintValidator.d.ts",
14
15
  "engines": {
15
16
  "node": ">= 16.0.0"
16
17
  },
17
18
  "dependencies": {
18
- "@atlaspack/diagnostic": "2.14.1-canary.88+30f60175b",
19
- "@atlaspack/plugin": "2.14.5-canary.20+30f60175b",
20
- "@atlaspack/utils": "2.14.5-canary.20+30f60175b",
19
+ "@atlaspack/diagnostic": "2.14.1-canary.268+10ee3fa5b",
20
+ "@atlaspack/plugin": "2.14.5-canary.200+10ee3fa5b",
21
+ "@atlaspack/utils": "2.14.5-canary.200+10ee3fa5b",
21
22
  "chalk": "^4.1.0"
22
23
  },
23
24
  "devDependencies": {
@@ -27,5 +28,9 @@
27
28
  "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
28
29
  },
29
30
  "type": "commonjs",
30
- "gitHead": "30f60175ba4d272c5fc193973c63bc298584775b"
31
- }
31
+ "scripts": {
32
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src",
33
+ "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
34
+ },
35
+ "gitHead": "10ee3fa5b75a92acde8973673d9b3c5b6f3958e5"
36
+ }
@@ -1,16 +1,19 @@
1
- // @flow
2
1
  import {Validator} from '@atlaspack/plugin';
3
- import {type DiagnosticCodeFrame, escapeMarkdown} from '@atlaspack/diagnostic';
2
+ import {DiagnosticCodeFrame, escapeMarkdown} from '@atlaspack/diagnostic';
3
+ // @ts-expect-error TS7016
4
4
  import eslint from 'eslint';
5
5
  import invariant from 'assert';
6
6
 
7
7
  // For eslint <8.0.0
8
+ // @ts-expect-error TS7034
8
9
  let cliEngine = null;
9
10
  // For eslint >=8.0.0
11
+ // @ts-expect-error TS7034
10
12
  let eslintEngine = null;
11
13
 
12
- export default (new Validator({
14
+ export default new Validator({
13
15
  async validate({asset}) {
16
+ // @ts-expect-error TS7005
14
17
  if (!cliEngine && !eslintEngine) {
15
18
  if (eslint.ESLint) {
16
19
  eslintEngine = new eslint.ESLint({});
@@ -21,9 +24,13 @@ export default (new Validator({
21
24
  let code = await asset.getCode();
22
25
 
23
26
  let results;
27
+ // @ts-expect-error TS7005
24
28
  if (cliEngine != null) {
29
+ // @ts-expect-error TS7005
25
30
  results = cliEngine.executeOnText(code, asset.filePath).results;
31
+ // @ts-expect-error TS7005
26
32
  } else if (eslintEngine != null) {
33
+ // @ts-expect-error TS7005
27
34
  results = await eslintEngine.lintText(code, {filePath: asset.filePath});
28
35
  } else {
29
36
  invariant(false);
@@ -40,6 +47,7 @@ export default (new Validator({
40
47
  let codeframe: DiagnosticCodeFrame = {
41
48
  filePath: asset.filePath,
42
49
  code: result.source,
50
+ // @ts-expect-error TS7006
43
51
  codeHighlights: result.messages.map((message) => {
44
52
  let start = {
45
53
  line: message.line,
@@ -67,12 +75,14 @@ export default (new Validator({
67
75
  };
68
76
 
69
77
  if (result.errorCount > 0) {
78
+ // @ts-expect-error TS2345
70
79
  validatorResult.errors.push(diagnostic);
71
80
  } else {
81
+ // @ts-expect-error TS2345
72
82
  validatorResult.warnings.push(diagnostic);
73
83
  }
74
84
  }
75
85
 
76
86
  return validatorResult;
77
87
  },
78
- }): Validator);
88
+ }) as Validator;
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["src"]
4
+ }