@mtth/eslint-plugin 0.1.7 → 0.1.11
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/.github/workflows/ci.yml +0 -2
- package/index.js +29 -11
- package/package.json +4 -4
package/.github/workflows/ci.yml
CHANGED
|
@@ -49,7 +49,6 @@ jobs:
|
|
|
49
49
|
- name: Setup Node
|
|
50
50
|
uses: actions/setup-node@v2
|
|
51
51
|
with:
|
|
52
|
-
node-version: 15.x
|
|
53
52
|
registry-url: https://npm.pkg.github.com
|
|
54
53
|
- name: Install
|
|
55
54
|
run: npm i
|
|
@@ -69,7 +68,6 @@ jobs:
|
|
|
69
68
|
- name: Setup Node
|
|
70
69
|
uses: actions/setup-node@v2
|
|
71
70
|
with:
|
|
72
|
-
node-version: 15.x
|
|
73
71
|
registry-url: https://registry.npmjs.org
|
|
74
72
|
- name: Install
|
|
75
73
|
run: npm i
|
package/index.js
CHANGED
|
@@ -11,21 +11,28 @@ module.exports = {
|
|
|
11
11
|
'plugin:@typescript-eslint/recommended',
|
|
12
12
|
],
|
|
13
13
|
rules: {
|
|
14
|
-
'@typescript-eslint/array-type': [
|
|
15
|
-
'
|
|
16
|
-
|
|
17
|
-
],
|
|
18
|
-
'@typescript-eslint/consistent-type-assertions': [
|
|
19
|
-
'
|
|
20
|
-
|
|
14
|
+
'@typescript-eslint/array-type': ['error', {
|
|
15
|
+
default: 'array',
|
|
16
|
+
readonly: 'generic',
|
|
17
|
+
}],
|
|
18
|
+
'@typescript-eslint/consistent-type-assertions': ['error', {
|
|
19
|
+
assertionStyle: 'as',
|
|
20
|
+
objectLiteralTypeAssertions: 'never',
|
|
21
|
+
}],
|
|
22
|
+
'@typescript-eslint/consistent-type-definitions': ['error',
|
|
23
|
+
'interface',
|
|
21
24
|
],
|
|
22
|
-
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
|
23
25
|
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
24
26
|
'@typescript-eslint/member-delimiter-style': 'error',
|
|
25
27
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
26
28
|
'@typescript-eslint/no-misused-new': 'error',
|
|
27
29
|
'@typescript-eslint/no-this-alias': 'error',
|
|
28
|
-
'@typescript-eslint/no-unused-vars': 'error',
|
|
30
|
+
'@typescript-eslint/no-unused-vars': ['error', {
|
|
31
|
+
argsIgnorePattern: '^_',
|
|
32
|
+
caughtErrors: 'all',
|
|
33
|
+
caughtErrorsIgnorePattern: '^_',
|
|
34
|
+
varsIgnorePattern: '^_',
|
|
35
|
+
}],
|
|
29
36
|
'@typescript-eslint/no-use-before-define': 'off',
|
|
30
37
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
31
38
|
'@typescript-eslint/prefer-function-type': 'error',
|
|
@@ -35,13 +42,24 @@ module.exports = {
|
|
|
35
42
|
'@typescript-eslint/unified-signatures': 'error',
|
|
36
43
|
'arrow-parens': 'error',
|
|
37
44
|
'consistent-return': 'error',
|
|
45
|
+
'comma-dangle': ['error', {
|
|
46
|
+
'arrays': 'always-multiline',
|
|
47
|
+
'objects': 'always-multiline',
|
|
48
|
+
'imports': 'always-multiline',
|
|
49
|
+
'exports': 'always-multiline',
|
|
50
|
+
'functions': 'never',
|
|
51
|
+
}],
|
|
38
52
|
'curly': 'error',
|
|
39
53
|
'default-case-last': 'error',
|
|
40
54
|
'default-param-last': 'error',
|
|
41
55
|
'dot-location': ['error', 'property'],
|
|
42
|
-
'dot-notation': '
|
|
56
|
+
'dot-notation': 'off', // https://234.fyi/1PcbRPGcR
|
|
43
57
|
'eqeqeq': ['error', 'smart'],
|
|
44
|
-
'max-len': ['error', {
|
|
58
|
+
'max-len': ['error', {
|
|
59
|
+
ignorePattern: 'eslint-disable',
|
|
60
|
+
ignoreTrailingComments: true,
|
|
61
|
+
ignoreUrls: true,
|
|
62
|
+
}],
|
|
45
63
|
'no-alert': 'error',
|
|
46
64
|
'no-caller': 'error',
|
|
47
65
|
'no-constructor-return': 'error',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtth/eslint-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Common linting configuration",
|
|
5
5
|
"homepage": "https://github.com/mtth/eslint-plugin",
|
|
6
6
|
"keywords": [
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"email": "mtth@apache.org"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
15
|
-
"@typescript-eslint/parser": "^
|
|
14
|
+
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
|
15
|
+
"@typescript-eslint/parser": "^5.8.1",
|
|
16
16
|
"eslint-plugin-simple-import-sort": "^7.0.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"eslint": "^
|
|
19
|
+
"eslint": "^8.5.0"
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"repository": {
|