@sektek/eslint-plugin 1.0.1 → 1.1.0
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/configs/recommended.js +10 -9
- package/configs/typescript.js +18 -0
- package/package.json +4 -3
package/configs/recommended.js
CHANGED
|
@@ -18,7 +18,7 @@ module.exports = {
|
|
|
18
18
|
files: ['.eslintrc.js', '.eslintrc.cjs'],
|
|
19
19
|
rules: {
|
|
20
20
|
'filenames/match-regex': 'off',
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
files: ['*.spec.js', '*.spec.ts'],
|
|
@@ -26,8 +26,8 @@ module.exports = {
|
|
|
26
26
|
'sonarjs/no-identical-functions': 'off',
|
|
27
27
|
'sonarjs/no-duplicate-string': 'off',
|
|
28
28
|
'filenames/match-regex': 'off',
|
|
29
|
-
}
|
|
30
|
-
}
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
31
|
],
|
|
32
32
|
plugins: [
|
|
33
33
|
'eslint-comments',
|
|
@@ -39,18 +39,19 @@ module.exports = {
|
|
|
39
39
|
'sonarjs',
|
|
40
40
|
],
|
|
41
41
|
rules: {
|
|
42
|
+
'filenames/match-regex': ['error', '^[a-z0-9-]+$'],
|
|
43
|
+
'import/newline-after-import': 'error',
|
|
44
|
+
'mocha/no-exclusive-tests': 'error',
|
|
42
45
|
'no-console': 'error',
|
|
43
46
|
'no-eval': 'error',
|
|
44
47
|
'no-duplicate-imports': 'error',
|
|
45
48
|
'no-var': 'error',
|
|
46
49
|
'prefer-const': 'error',
|
|
47
50
|
'prefer-template': 'error',
|
|
48
|
-
'sort-imports': 'error',
|
|
49
|
-
'yoda': 'error',
|
|
50
|
-
'filenames/match-regex': ['error', '^[a-z0-9-]+$'],
|
|
51
51
|
'promise/prefer-await-to-callbacks': 'error',
|
|
52
52
|
'promise/prefer-await-to-then': 'error',
|
|
53
|
-
'
|
|
53
|
+
'sort-imports': ['error', { allowSeparatedGroups: true }],
|
|
54
|
+
yoda: 'error',
|
|
54
55
|
},
|
|
55
56
|
settings: {
|
|
56
57
|
'import/resolver': {
|
|
@@ -58,5 +59,5 @@ module.exports = {
|
|
|
58
59
|
extensions: ['.js', '.ts'],
|
|
59
60
|
},
|
|
60
61
|
},
|
|
61
|
-
}
|
|
62
|
-
}
|
|
62
|
+
},
|
|
63
|
+
};
|
package/configs/typescript.js
CHANGED
|
@@ -5,6 +5,20 @@ module.exports = {
|
|
|
5
5
|
sourceType: 'module',
|
|
6
6
|
},
|
|
7
7
|
plugins: ['@typescript-eslint'],
|
|
8
|
+
overrides: [
|
|
9
|
+
{
|
|
10
|
+
files: ['globals.d.ts'],
|
|
11
|
+
rules: {
|
|
12
|
+
'filenames/match-regex': 'off',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
files: ['*.spec.ts'],
|
|
17
|
+
rules: {
|
|
18
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
],
|
|
8
22
|
settings: {
|
|
9
23
|
'import/resolver': {
|
|
10
24
|
typescript: {
|
|
@@ -15,5 +29,9 @@ module.exports = {
|
|
|
15
29
|
rules: {
|
|
16
30
|
'no-unused-vars': 'off',
|
|
17
31
|
'@typescript-eslint/no-unused-vars': 'error',
|
|
32
|
+
'@typescript-eslint/no-empty-object-type': [
|
|
33
|
+
'error',
|
|
34
|
+
{ allowInterfaces: 'always' },
|
|
35
|
+
],
|
|
18
36
|
},
|
|
19
37
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sektek/eslint-plugin",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Eslint configuration for all @sektek projects",
|
|
5
5
|
"author": "Edward Kelly <eddie@sektek.net>",
|
|
6
6
|
"repository": {
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"scripts": {},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@sektek/prettier-config": "^1.1.3",
|
|
17
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
18
|
-
"@typescript-eslint/parser": "^
|
|
17
|
+
"@typescript-eslint/eslint-plugin": "^8.33.1",
|
|
18
|
+
"@typescript-eslint/parser": "^8.33.1",
|
|
19
19
|
"eslint-config-prettier": "^9.1.0",
|
|
20
20
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
21
21
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@semantic-release/git": "^10.0.1",
|
|
31
|
+
"c8": "^10.1.3",
|
|
31
32
|
"eslint": "^8.56.0",
|
|
32
33
|
"prettier": "^3.1.1"
|
|
33
34
|
},
|