eslint-plugin-qwik 0.0.18-dev123 → 0.0.18

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/index.js CHANGED
@@ -1,17 +1,14 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
3
  exports.configs = exports.rules = void 0;
4
- var noPropsDestructuting_1 = require("./lib/noPropsDestructuting");
5
4
  var noUseAfterAwait_1 = require("./lib/noUseAfterAwait");
6
5
  exports.rules = {
7
- 'no-props-destructuring': noPropsDestructuting_1.noPropsDestructuring,
8
6
  'no-use-after-await': noUseAfterAwait_1.noUseAfterAwait
9
7
  };
10
8
  exports.configs = {
11
9
  recommended: {
12
10
  plugins: ['qwik'],
13
11
  rules: {
14
- 'qwik/no-props-destructuring': 'error',
15
12
  'qwik/no-use-after-await': 'error'
16
13
  }
17
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-qwik",
3
- "version": "0.0.18-dev123",
3
+ "version": "0.0.18",
4
4
  "description": "An Open-Source sub-framework designed with a focus on server-side-rendering, lazy-loading, and styling/animation.",
5
5
  "main": "index.js",
6
6
  "author": "",
package/qwik.unit.js CHANGED
@@ -16,20 +16,6 @@ var testConfig = {
16
16
  sourceType: 'module'
17
17
  }
18
18
  };
19
- describe('no-props-destructuring', function () {
20
- var ruleTester = new RuleTester(testConfig);
21
- ruleTester.run('my-rule', index_1.rules['no-props-destructuring'], {
22
- valid: [
23
- "export const HelloWorld = component$((props) => {\n return $(({prop}) => {\n return (\n <Host>\n {prop}\n {props}\n </Host>\n );\n });\n });",
24
- ],
25
- invalid: [
26
- {
27
- code: "export const HelloWorld = component$(({prop}) => {\n return $(() => {\n return (\n <Host>\n {prop}\n </Host>\n );\n });\n });",
28
- errors: ['Props destructuring is not a good practice in Qwik']
29
- },
30
- ]
31
- });
32
- });
33
19
  describe('no-use-after-await', function () {
34
20
  var ruleTester = new RuleTester(testConfig);
35
21
  ruleTester.run('my-rule', index_1.rules['no-use-after-await'], {
@@ -1,32 +0,0 @@
1
- "use strict";
2
- /* eslint-disable no-console */
3
- /**
4
- * @license
5
- * Copyright Builder.io, Inc. All Rights Reserved.
6
- *
7
- * Use of this source code is governed by an MIT-style license that can be
8
- * found in the LICENSE file at https://github.com/BuilderIO/qwik/blob/main/LICENSE
9
- */
10
- exports.__esModule = true;
11
- exports.noPropsDestructuring = void 0;
12
- exports.noPropsDestructuring = {
13
- meta: {
14
- type: 'problem',
15
- docs: {
16
- description: 'Object destructuring is not recomended for component$',
17
- category: 'Variables',
18
- recommended: true,
19
- url: 'https://github.com/BuilderIO/qwik'
20
- }
21
- },
22
- create: function (context) {
23
- return {
24
- "CallExpression[callee.name='component$'][arguments.0.params.0.type='ObjectPattern']": function (node) {
25
- context.report({
26
- node: node.arguments[0].params[0],
27
- message: 'Props destructuring is not a good practice in Qwik'
28
- });
29
- }
30
- };
31
- }
32
- };