@eclipse-glsp/eslint-config 0.9.0-next.13e5422c → 0.9.0-next.cd85cefd

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,107 +1,101 @@
1
+ const year = new Date().getFullYear();
1
2
  module.exports = {
2
3
  rules: {
3
4
  // https://eslint.org/docs/rules/
4
5
  // Possible Errors
5
- "no-inner-declarations": "off",
6
+ 'no-inner-declarations': 'off',
6
7
  // Best Practices
7
- curly: "error",
8
- "eol-last": "error",
9
- eqeqeq: ["error", "smart"],
10
- "guard-for-in": "error",
11
- "no-caller": "error",
12
- "no-eval": "error",
13
- "no-redeclare": [
14
- "error",
8
+ curly: 'error',
9
+ 'eol-last': 'error',
10
+ eqeqeq: ['error', 'smart'],
11
+ 'guard-for-in': 'error',
12
+ 'no-caller': 'error',
13
+ 'no-eval': 'error',
14
+ 'no-redeclare': [
15
+ 'error',
15
16
  {
16
- builtinGlobals: false,
17
- },
17
+ builtinGlobals: false
18
+ }
18
19
  ],
19
- "no-restricted-imports": [
20
- "error",
21
- "..",
22
- "../index",
23
- "../..",
24
- "../../index",
25
- ],
26
- "no-sequences": "error",
27
- "no-throw-literal": "error",
28
- "no-unused-expressions": [
29
- "error",
20
+ 'no-restricted-imports': ['error', '..', '../index', '../..', '../../index'],
21
+ 'no-sequences': 'error',
22
+ 'no-throw-literal': 'error',
23
+ 'no-unused-expressions': [
24
+ 'error',
30
25
  {
31
26
  allowShortCircuit: true,
32
- allowTernary: true,
33
- },
27
+ allowTernary: true
28
+ }
34
29
  ],
35
30
  // Variables
36
- "no-unused-vars": "off", // typescript-eslint rule activated instead
37
- "no-use-before-define": "off", // typescript-eslint rule activated instead
31
+ 'no-unused-vars': 'off', // typescript-eslint rule activated instead
32
+ 'no-use-before-define': 'off', // typescript-eslint rule activated instead
38
33
  // Stylistic Issues
39
- "max-len": [
40
- "error",
34
+ 'max-len': [
35
+ 'error',
41
36
  {
42
- code: 180,
43
- },
37
+ code: 180
38
+ }
44
39
  ],
45
- "no-multiple-empty-lines": [
46
- "error",
40
+ 'no-multiple-empty-lines': [
41
+ 'error',
47
42
  {
48
- max: 1,
49
- },
43
+ max: 1
44
+ }
50
45
  ],
51
- "no-underscore-dangle": "off",
52
- quotes: "off", // typescript-eslint rule activated instead
53
- "space-before-function-paren": [
54
- "error",
46
+ 'no-underscore-dangle': 'off',
47
+ quotes: 'off', // typescript-eslint rule activated instead
48
+ 'space-before-function-paren': [
49
+ 'error',
55
50
  {
56
- anonymous: "always",
57
- named: "never",
58
- asyncArrow: "always",
59
- },
51
+ anonymous: 'always',
52
+ named: 'never',
53
+ asyncArrow: 'always'
54
+ }
60
55
  ],
61
- "one-var": ["error", "never"],
56
+ 'one-var': ['error', 'never'],
62
57
  // ECMAScript6
63
- "arrow-body-style": ["error", "as-needed"],
64
- "arrow-parens": ["error", "as-needed"],
65
- "no-var": "error",
66
- "prefer-const": [
67
- "error",
58
+ 'arrow-body-style': ['error', 'as-needed'],
59
+ 'arrow-parens': ['error', 'as-needed'],
60
+ 'no-var': 'error',
61
+ 'prefer-const': [
62
+ 'error',
68
63
  {
69
- destructuring: "all",
70
- },
64
+ destructuring: 'all'
65
+ }
71
66
  ],
72
67
  // @typescript-eslint/eslint-plugin
73
- "@typescript-eslint/class-name-casing": "error",
74
- "@typescript-eslint/consistent-type-definitions": "error",
75
- "@typescript-eslint/no-explicit-any": "off",
76
- "@typescript-eslint/no-misused-new": "error",
77
- "@typescript-eslint/no-empty-interface": "off",
78
- "@typescript-eslint/interface-name-prefix": "off",
79
- "@typescript-eslint/no-namespace": "off",
80
- "@typescript-eslint/no-use-before-define": "off",
81
- "@typescript-eslint/no-unused-vars": [
82
- "error",
68
+ '@typescript-eslint/class-name-casing': 'error',
69
+ '@typescript-eslint/consistent-type-definitions': 'error',
70
+ '@typescript-eslint/no-explicit-any': 'off',
71
+ '@typescript-eslint/no-misused-new': 'error',
72
+ '@typescript-eslint/no-empty-interface': 'off',
73
+ '@typescript-eslint/interface-name-prefix': 'off',
74
+ '@typescript-eslint/no-namespace': 'off',
75
+ '@typescript-eslint/no-use-before-define': 'off',
76
+ '@typescript-eslint/no-unused-vars': [
77
+ 'error',
83
78
  {
84
- args: "none",
85
- },
79
+ args: 'none'
80
+ }
86
81
  ],
87
- "@typescript-eslint/quotes": [
88
- "error",
89
- "single",
82
+ '@typescript-eslint/quotes': [
83
+ 'error',
84
+ 'single',
90
85
  {
91
- avoidEscape: true,
92
- },
86
+ avoidEscape: true
87
+ }
93
88
  ],
94
- "@typescript-eslint/semi": ["error", "always"],
89
+ '@typescript-eslint/semi': ['error', 'always'],
95
90
  // eslint-plugin-header
96
- "header/header": [
91
+ 'header/header': [
97
92
  2,
98
- "block",
93
+ 'block',
99
94
  [
100
95
  {
101
- pattern:
102
- "[\n\r]+ \\* Copyright \\([cC]\\) \\d{4}(-\\d{4})? .*[\n\r]+",
103
- template: `*****3**************************************************************************
104
- * Copyright (c) 2021 EclipseSource and others.
96
+ pattern: '[\n\r]+ \\* Copyright \\([cC]\\) \\d{4}(-\\d{4})? .*[\n\r]+',
97
+ template: `*******************************************************************************
98
+ * Copyright (c) ${year} EclipseSource and others.
105
99
  *
106
100
  * This program and the accompanying materials are made available under the
107
101
  * terms of the Eclipse Public License v. 2.0 which is available at
@@ -114,14 +108,14 @@ module.exports = {
114
108
  * https://www.gnu.org/software/classpath/license.html.
115
109
  *
116
110
  * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
117
- *******************************************************************************`,
118
- },
119
- ],
111
+ *******************************************************************************`
112
+ }
113
+ ]
120
114
  ],
121
115
  // eslint-plugin-import
122
- "import/export": "off", // we have multiple exports due to namespaces, enums and classes that share the same name
123
- "import/no-deprecated": "error",
116
+ 'import/export': 'off', // we have multiple exports due to namespaces, enums and classes that share the same name
117
+ 'import/no-deprecated': 'error',
124
118
  // eslint-plugin-no-null
125
- "no-null/no-null": "error",
126
- },
119
+ 'no-null/no-null': 'error'
120
+ }
127
121
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-glsp/eslint-config",
3
- "version": "0.9.0-next.13e5422c",
3
+ "version": "0.9.0-next.cd85cefd",
4
4
  "description": "Shared ESLint configuration for GLSP projects",
5
5
  "license": "(EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0)",
6
6
  "keywords": [
@@ -27,24 +27,17 @@
27
27
  "access": "public"
28
28
  },
29
29
  "dependencies": {
30
+ "@eclipse-glsp/prettier-config": "0.9.0-next.cd85cefd",
30
31
  "@typescript-eslint/eslint-plugin": "^2.16.0",
31
32
  "@typescript-eslint/parser": "^2.16.0",
32
33
  "eslint": "^6.8.0",
33
34
  "eslint-config-prettier": "^8.3.0",
34
- "eslint-plugin-header": "^3.0.0",
35
+ "eslint-plugin-header": "^3.1.1",
35
36
  "eslint-plugin-import": "^2.20.0",
36
37
  "eslint-plugin-no-null": "^1.0.2"
37
38
  },
38
39
  "devDependencies": {
39
40
  "typescript": "^3.9.2"
40
41
  },
41
- "peerDependencies": {
42
- "@typescript-eslint/eslint-plugin": ">=2.16.0",
43
- "@typescript-eslint/parser": ">=2.16.0",
44
- "eslint": ">=6.8.0",
45
- "eslint-config-prettier": ">=8.3.0",
46
- "eslint-plugin-header": ">=3.0.0",
47
- "eslint-plugin-import": ">=2.20.0",
48
- "eslint-plugin-no-null": ">=1.0.2"
49
- }
42
+ "prettier": "@eclipse-glsp/prettier-config"
50
43
  }