@eway-crm/eslint-config 1.0.8 → 1.0.10

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.
Files changed (3) hide show
  1. package/README.md +31 -17
  2. package/index.js +60 -41
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,18 +1,32 @@
1
- ![eWay-CRM Logo](https://www.eway-crm.com/wp-content/themes/eway/img/email/logo_grey.png)
2
- # eWay-CRM ESLint Rules for TypeScript
3
-
4
- ## Installation
5
-
6
- ```
7
- npm i --save-dev eslint @eway-crm/eslint-config @typescript-eslint/parser @typescript-eslint/eslint-plugin
8
- ```
9
-
10
- ## Configuration
11
-
12
- Add configuration to your ```.eslintrc.json``` project file:
13
-
14
- ```
15
- {
16
- "extends": ["@eway-crm/eslint-config"]
17
- }
1
+ ![eWay-CRM Logo](https://www.eway-crm.com/wp-content/themes/eway/img/email/logo_grey.png)
2
+ # eWay-CRM ESLint Rules for TypeScript
3
+
4
+ ## Installation
5
+
6
+ ```
7
+ npm i --save-dev eslint@8 @eway-crm/eslint-config @typescript-eslint/parser@7 @typescript-eslint/eslint-plugin@7
8
+ ```
9
+
10
+ ## Configuration
11
+
12
+ Add configuration to your ```.eslintrc.json``` project file:
13
+
14
+ ```
15
+ {
16
+ "parser": "@typescript-eslint/parser",
17
+ "parserOptions": {
18
+ "project": [
19
+ "./tsconfig.json"
20
+ ]
21
+ },
22
+ "extends": [
23
+ "@eway-crm/eslint-config"
24
+ ]
25
+ }
26
+ ```
27
+
28
+ Test configuration:
29
+
30
+ ```
31
+ npx eslint src
18
32
  ```
package/index.js CHANGED
@@ -1,41 +1,60 @@
1
- module.exports = {
2
- "extends": [
3
- "plugin:@typescript-eslint/recommended",
4
- "plugin:@typescript-eslint/recommended-requiring-type-checking"
5
- ],
6
- "rules": {
7
- "no-var": "error",
8
- "no-undef-init": "error",
9
- "no-irregular-whitespace": "error",
10
- "no-throw-literal": "error",
11
- "@typescript-eslint/member-delimiter-style": "error",
12
- "@typescript-eslint/no-inferrable-types": "off",
13
- "@typescript-eslint/no-unnecessary-type-assertion": "error",
14
- "@typescript-eslint/restrict-template-expressions": [
15
- "error",
16
- {
17
- "allowNumber": true,
18
- "allowBoolean": true,
19
- "allowNullish": true
20
- }
21
- ],
22
- "semi": "off",
23
- "@typescript-eslint/semi": ["error"],
24
- "@typescript-eslint/no-extra-non-null-assertion": ["error"],
25
- "@typescript-eslint/no-for-in-array": ["error"],
26
- "@typescript-eslint/explicit-function-return-type": "off",
27
- "@typescript-eslint/explicit-module-boundary-types": "off",
28
- "@typescript-eslint/no-unsafe-return": "error",
29
- "@typescript-eslint/no-explicit-any": "error",
30
- "@typescript-eslint/no-non-null-assertion": "off",
31
- "@typescript-eslint/unbound-method": [
32
- "error",
33
- {
34
- "ignoreStatic": true
35
- }
36
- ],
37
- "@typescript-eslint/no-unused-vars": "warn",
38
- "prefer-const": "warn",
39
- "@typescript-eslint/consistent-type-imports": "warn"
40
- }
41
- };
1
+ module.exports = {
2
+ extends: ["plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-requiring-type-checking"],
3
+ rules: {
4
+ "no-var": "error",
5
+ "no-undef-init": "error",
6
+ "no-irregular-whitespace": "error",
7
+ "no-throw-literal": "error",
8
+ "eqeqeq": ["error", "always"],
9
+ "@typescript-eslint/member-delimiter-style": "error",
10
+ "@typescript-eslint/no-inferrable-types": "off",
11
+ "@typescript-eslint/no-unnecessary-type-assertion": "error",
12
+ "@typescript-eslint/restrict-template-expressions": [
13
+ "error",
14
+ {
15
+ allowNumber: true,
16
+ allowBoolean: true,
17
+ allowNullish: true,
18
+ },
19
+ ],
20
+ semi: "off",
21
+ "@typescript-eslint/semi": ["error"],
22
+ "@typescript-eslint/no-extra-non-null-assertion": ["error"],
23
+ "@typescript-eslint/no-for-in-array": ["error"],
24
+ "@typescript-eslint/explicit-function-return-type": "off",
25
+ "@typescript-eslint/explicit-module-boundary-types": "off",
26
+ "@typescript-eslint/no-unsafe-return": "error",
27
+ "@typescript-eslint/no-explicit-any": "error",
28
+ "@typescript-eslint/no-non-null-assertion": "off",
29
+ "@typescript-eslint/unbound-method": [
30
+ "error",
31
+ {
32
+ ignoreStatic: true,
33
+ },
34
+ ],
35
+ "@typescript-eslint/no-unused-vars": "warn",
36
+ "prefer-const": "warn",
37
+ "@typescript-eslint/consistent-type-imports": "warn",
38
+ "object-curly-newline": [
39
+ "error",
40
+ {
41
+ ObjectExpression: {
42
+ multiline: true,
43
+ consistent: true,
44
+ },
45
+ },
46
+ ],
47
+ "no-multiple-empty-lines": [
48
+ "error",
49
+ {
50
+ max: 1,
51
+ maxEOF: 0,
52
+ maxBOF: 0,
53
+ },
54
+ ],
55
+ "key-spacing": ["error", { beforeColon: false, afterColon: true, mode: "strict" }],
56
+ "no-multi-spaces": "error",
57
+ "no-trailing-spaces": "error",
58
+ "padding-line-between-statements": ["error", { blankLine: "never", prev: "return", next: "*" }],
59
+ },
60
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eway-crm/eslint-config",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "ESLint rules for eWay-CRM",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,6 +17,6 @@
17
17
  "@typescript-eslint/eslint-plugin": "^7.1.1",
18
18
  "@typescript-eslint/parser": "^7.1.1",
19
19
  "eslint": "^8.57.0",
20
- "typescript": ">=5.3.3 <5.4.0"
20
+ "typescript": ">=5.3.3 <5.6.0"
21
21
  }
22
22
  }