@spscommerce/eslint-config-typescript 0.0.2 → 0.0.3

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.
@@ -1,59 +1,84 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.variables = void 0;
4
+ // ✅ = recommended, 🔧 = fixable
4
5
  exports.variables = {
5
- /** enforce or disallow variable initializations at definition
6
- * https://eslint.org/docs/rules/init-declarations
7
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/init-declarations.md */
8
- 'init-declarations': 'off',
9
- '@typescript-eslint/init-declarations': 'off',
10
- /** disallow the catch clause parameter name being the same as a variable in the outer scope
11
- * https://eslint.org/docs/rules/no-catch-shadow */
12
- 'no-catch-shadow': 'off',
13
- /** disallow deletion of variables
14
- * https://eslint.org/docs/rules/no-delete-var */
15
- 'no-delete-var': 'error',
16
- /** disallow labels that share a name with a variable
17
- * https://eslint.org/docs/rules/no-label-var */
18
- 'no-label-var': 'error',
19
- /** disallow specific globals
20
- * https://eslint.org/docs/rules/no-restricted-globals */
21
- 'no-restricted-globals': [
22
- 'error',
6
+ /**
7
+ * enforce or disallow variable initializations at definition
8
+ * https://eslint.org/docs/rules/init-declarations
9
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/init-declarations.md
10
+ */
11
+ "init-declarations": "off",
12
+ "@typescript-eslint/init-declarations": "off",
13
+ /**
14
+ * disallow the catch clause parameter name being the same as a variable in the outer scope
15
+ * https://eslint.org/docs/rules/no-catch-shadow
16
+ */
17
+ "no-catch-shadow": "off",
18
+ /**
19
+ * disallow deletion of variables ✅
20
+ * https://eslint.org/docs/rules/no-delete-var
21
+ */
22
+ "no-delete-var": "error",
23
+ /**
24
+ * disallow labels that share a name with a variable
25
+ * https://eslint.org/docs/rules/no-label-var
26
+ */
27
+ "no-label-var": "error",
28
+ /**
29
+ * disallow specific globals
30
+ * https://eslint.org/docs/rules/no-restricted-globals
31
+ */
32
+ "no-restricted-globals": [
33
+ "error",
23
34
  {
24
- name: 'isFinite',
25
- message: 'Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite',
35
+ name: "isFinite",
36
+ message: "Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",
26
37
  },
27
38
  {
28
- name: 'isNaN',
29
- message: 'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
39
+ name: "isNaN",
40
+ message: "Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",
30
41
  },
31
42
  ],
32
- /** disallow declaration of variables already declared in the outer scope
33
- * https://eslint.org/docs/rules/no-shadow
34
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md */
35
- 'no-shadow': 'off',
36
- '@typescript-eslint/no-shadow': 'error',
37
- /** disallow shadowing of names such as arguments
38
- * https://eslint.org/docs/rules/no-shadow-restricted-names */
39
- 'no-shadow-restricted-names': 'error',
40
- /** disallow use of undeclared variables unless mentioned in `/*global ` comments
41
- * https://eslint.org/docs/rules/no-undef */
42
- 'no-undef': 'error',
43
- /** disallow use of undefined when initializing variables
44
- * https://eslint.org/docs/rules/no-undef-init */
45
- 'no-undef-init': 'error',
46
- /** disallow use of undefined variable
47
- * https://eslint.org/docs/rules/no-undefined */
48
- 'no-undefined': 'off',
49
- /** disallow declaration of variables that are not used in the code
50
- * https://eslint.org/docs/rules/no-unused-vars
51
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md */
52
- 'no-unused-vars': 'off',
53
- '@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
54
- /** disallow use of variables before they are defined
55
- * https://eslint.org/docs/rules/no-use-before-define
56
- * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md */
57
- 'no-use-before-define': 'off',
58
- '@typescript-eslint/no-use-before-define': 'error',
43
+ /**
44
+ * disallow declaration of variables already declared in the outer scope
45
+ * https://eslint.org/docs/rules/no-shadow
46
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
47
+ */
48
+ "no-shadow": "off",
49
+ "@typescript-eslint/no-shadow": "error",
50
+ /**
51
+ * disallow shadowing of names such as arguments
52
+ * https://eslint.org/docs/rules/no-shadow-restricted-names
53
+ */
54
+ "no-shadow-restricted-names": "error",
55
+ /**
56
+ * disallow use of undeclared variables unless mentioned in `/*global ` comments ✅
57
+ * https://eslint.org/docs/rules/no-undef
58
+ */
59
+ "no-undef": "error",
60
+ /**
61
+ * disallow use of undefined when initializing variables 🔧
62
+ * https://eslint.org/docs/rules/no-undef-init
63
+ */
64
+ "no-undef-init": "error",
65
+ /**
66
+ * disallow use of undefined variable
67
+ * https://eslint.org/docs/rules/no-undefined
68
+ */
69
+ "no-undefined": "off",
70
+ /**
71
+ * disallow declaration of variables that are not used in the code ✅
72
+ * https://eslint.org/docs/rules/no-unused-vars
73
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md
74
+ */
75
+ "no-unused-vars": "off",
76
+ "@typescript-eslint/no-unused-vars": ["error", { ignoreRestSiblings: true }],
77
+ /**
78
+ * disallow use of variables before they are defined
79
+ * https://eslint.org/docs/rules/no-use-before-define
80
+ * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md
81
+ */
82
+ "no-use-before-define": "off",
83
+ "@typescript-eslint/no-use-before-define": "error",
59
84
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spscommerce/eslint-config-typescript",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "SPS official linter configuration for TypeScript.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -31,16 +31,20 @@
31
31
  },
32
32
  "homepage": "https://github.com/SPSCommerce/javascript",
33
33
  "peerDependencies": {
34
- "eslint": "^7.32.0",
35
- "eslint-import-resolver-typescript": "^2.5.0"
36
- },
37
- "dependencies": {
38
34
  "@typescript-eslint/eslint-plugin": "^4.31.2",
39
35
  "@typescript-eslint/parser": "^4.31.2",
36
+ "eslint": "^7.32.0",
37
+ "eslint-import-resolver-typescript": "^2.5.0",
40
38
  "eslint-plugin-import": "^2.24.2"
41
39
  },
40
+ "dependencies": {
41
+ },
42
42
  "devDependencies": {
43
43
  "@types/eslint": "^7.28.0",
44
- "eslint-import-resolver-typescript": "^2.5.0"
44
+ "@typescript-eslint/eslint-plugin": "^4.31.2",
45
+ "@typescript-eslint/parser": "^4.31.2",
46
+ "eslint": "^7.32.0",
47
+ "eslint-import-resolver-typescript": "^2.5.0",
48
+ "eslint-plugin-import": "^2.24.2"
45
49
  }
46
50
  }