eslint-plugin-prefer-let 3.0.0-9bf1e83 → 3.0.1

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,6 +1,14 @@
1
1
  # eslint-plugin-prefer-let
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2c09840: Exclude the docs and tests folder for a slimmer NPM package
8
+ - 4afad3f: Add `package.repository` to have link to sources
9
+
3
10
  ## 3.0.0
11
+
4
12
  ### Major Changes
5
13
 
6
14
  - 1c687b4: Bump version to 3.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-prefer-let",
3
- "version": "3.0.0-9bf1e83",
3
+ "version": "3.0.1",
4
4
  "description": "Rule to prefer using `let` to bind names to values",
5
5
  "keywords": [
6
6
  "eslint",
@@ -15,11 +15,12 @@
15
15
  "requireindex": "~1.2.0"
16
16
  },
17
17
  "devDependencies": {
18
- "eslint": "^8.1.0",
18
+ "eslint": "^8.0.1",
19
19
  "mocha": "^9.1.3"
20
20
  },
21
21
  "engines": {
22
22
  "node": ">=0.10.0"
23
23
  },
24
- "license": "ISC"
24
+ "license": "ISC",
25
+ "repository": "thefrontside/javascript"
25
26
  }
@@ -1,36 +0,0 @@
1
- # Use `let` declarations to bind names to values (prefer-let)
2
-
3
- Please describe the origin of the rule here.
4
-
5
-
6
- ## Rule Details
7
-
8
- This rule aims to...
9
-
10
- The following patterns are considered warnings:
11
-
12
- ```js
13
-
14
- // fill me in
15
-
16
- ```
17
-
18
- The following patterns are not warnings:
19
-
20
- ```js
21
-
22
- // fill me in
23
-
24
- ```
25
-
26
- ### Options
27
-
28
- If there are any options, describe them here. Otherwise, delete this section.
29
-
30
- ## When Not To Use It
31
-
32
- Give a short description of when it would be appropriate to turn off this rule.
33
-
34
- ## Further Reading
35
-
36
- If there are other links that describe the issue this rule addresses, please include them here in a bulleted list.
@@ -1,104 +0,0 @@
1
- /**
2
- * @fileoverview Use `let` declarations to bind names to values
3
- * @author Charles Lowell
4
- */
5
- "use strict";
6
-
7
- //------------------------------------------------------------------------------
8
- // Requirements
9
- //------------------------------------------------------------------------------
10
-
11
- var rule = require("../../../lib/rules/prefer-let");
12
-
13
- var RuleTester = require("eslint").RuleTester;
14
-
15
- RuleTester.setDefaultConfig({
16
- parserOptions: {
17
- ecmaVersion: 6,
18
- sourceType: "module"
19
- }
20
- });
21
-
22
-
23
- //------------------------------------------------------------------------------
24
- // Tests
25
- //------------------------------------------------------------------------------
26
-
27
- var ruleTester = new RuleTester();
28
- ruleTester.run("prefer-let", rule, {
29
-
30
- valid: [
31
- {
32
- code: "const PI = 3.14;"
33
- },
34
- {
35
- code: "const { foo, bar } = {};"
36
- },
37
- {
38
- code: `export const AlsoObject = Object;`
39
- },
40
- {
41
- parserOptions: {
42
- sourceType: "script"
43
- },
44
- env: {
45
- node: true
46
- },
47
- code: "const PI = 3.14;"
48
- }
49
- ],
50
-
51
- invalid: [
52
- {
53
- code: "function y() { const x = 'y'; return x; }",
54
- output: "function y() { let x = 'y'; return x; }",
55
- errors: [{
56
- message: "`const` declaration outside top-level scope",
57
- type: "VariableDeclaration"
58
- }]
59
- },
60
- {
61
- code: "function y() { const {x, y} = {x: 'x', y: 'y'}}",
62
- output: "function y() { let {x, y} = {x: 'x', y: 'y'}}",
63
- errors: [{
64
- message: "`const` declaration outside top-level scope",
65
- type: "VariableDeclaration"
66
- }]
67
- },
68
- {
69
- code: "var x = 'y';",
70
- errors: [{
71
- message: "prefer `let` over `var` to declare value bindings",
72
- type: "VariableDeclaration"
73
- }]
74
- },
75
- {
76
- code: "function y() { var x = 'y'};",
77
- errors: [{
78
- message: "prefer `let` over `var` to declare value bindings",
79
- type: "VariableDeclaration"
80
- }]
81
- },
82
- {
83
- code: "function y() { var { x, y } = {}; }",
84
- errors: [{
85
- message: "prefer `let` over `var` to declare value bindings",
86
- type: "VariableDeclaration"
87
- }]
88
- },
89
- {
90
- parserOptions: {
91
- sourceType: "script"
92
- },
93
- env: {
94
- node: true
95
- },
96
- code: "function y() { const x = 'y'; return x; }",
97
- output: "function y() { let x = 'y'; return x; }",
98
- errors: [{
99
- message: "`const` declaration outside top-level scope",
100
- type: "VariableDeclaration"
101
- }]
102
- }
103
- ]
104
- });